From c94404986c09ae2895a6465286abfaadc6243cbb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 9 Aug 2018 14:16:12 +0100 Subject: [PATCH] 3.12 Beta 2 Release --- dist/phaser-arcade-physics.js | 12966 +++++++++++++++------------ dist/phaser-arcade-physics.min.js | 2 +- dist/phaser-core.js | 10334 ++++++++++++--------- dist/phaser-core.min.js | 2 +- dist/phaser.js | 13412 ++++++++++++++++------------ dist/phaser.min.js | 2 +- 6 files changed, 20816 insertions(+), 15902 deletions(-) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index 3ad3ed7b7..2a628b14f 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -46,19 +46,34 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -76,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1035); +/******/ return __webpack_require__(__webpack_require__.s = 1040); /******/ }) /************************************************************************/ /******/ ([ @@ -2004,11 +2019,11 @@ module.exports = PluginCache; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(31); +var Contains = __webpack_require__(32); var GetPoint = __webpack_require__(137); var GetPoints = __webpack_require__(297); -var Line = __webpack_require__(97); -var Random = __webpack_require__(161); +var Line = __webpack_require__(98); +var Random = __webpack_require__(162); /** * @classdesc @@ -2574,6 +2589,47 @@ module.exports = GetAdvancedValue; /* 13 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(600), + Animation: __webpack_require__(306), + BlendMode: __webpack_require__(599), + ComputedSize: __webpack_require__(598), + Crop: __webpack_require__(597), + Depth: __webpack_require__(596), + Flip: __webpack_require__(595), + GetBounds: __webpack_require__(594), + Mask: __webpack_require__(593), + Origin: __webpack_require__(592), + Pipeline: __webpack_require__(294), + ScaleMode: __webpack_require__(591), + ScrollFactor: __webpack_require__(590), + Size: __webpack_require__(589), + Texture: __webpack_require__(588), + TextureCrop: __webpack_require__(587), + Tint: __webpack_require__(586), + ToJSON: __webpack_require__(585), + Transform: __webpack_require__(584), + TransformMatrix: __webpack_require__(27), + Visible: __webpack_require__(583) + +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -2729,47 +2785,6 @@ PluginCache.register('GameObjectCreator', GameObjectCreator, 'make'); module.exports = GameObjectCreator; -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Components - */ - -module.exports = { - - Alpha: __webpack_require__(595), - Animation: __webpack_require__(306), - BlendMode: __webpack_require__(594), - ComputedSize: __webpack_require__(593), - Crop: __webpack_require__(592), - Depth: __webpack_require__(591), - Flip: __webpack_require__(590), - GetBounds: __webpack_require__(589), - Mask: __webpack_require__(588), - Origin: __webpack_require__(587), - Pipeline: __webpack_require__(294), - ScaleMode: __webpack_require__(586), - ScrollFactor: __webpack_require__(585), - Size: __webpack_require__(584), - Texture: __webpack_require__(583), - TextureCrop: __webpack_require__(582), - Tint: __webpack_require__(581), - ToJSON: __webpack_require__(580), - Transform: __webpack_require__(579), - TransformMatrix: __webpack_require__(32), - Visible: __webpack_require__(578) - -}; - - /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { @@ -2781,7 +2796,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var DataManager = __webpack_require__(59); var EventEmitter = __webpack_require__(8); @@ -3691,9 +3706,9 @@ module.exports = FILE_CONST; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(109); -var MergeXHRSettings = __webpack_require__(108); -var XHRLoader = __webpack_require__(176); +var GetURL = __webpack_require__(110); +var MergeXHRSettings = __webpack_require__(109); +var XHRLoader = __webpack_require__(177); var XHRSettings = __webpack_require__(75); /** @@ -4450,237 +4465,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -/** - * Global consts. - * - * @ignore - */ - -var CONST = { - - /** - * Phaser Release Version - * - * @name Phaser.VERSION - * @readOnly - * @type {string} - * @since 3.0.0 - */ - VERSION: '3.12.0-beta1', - - BlendModes: __webpack_require__(52), - - ScaleModes: __webpack_require__(60), - - /** - * AUTO Detect Renderer. - * - * @name Phaser.AUTO - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - AUTO: 0, - - /** - * Canvas Renderer. - * - * @name Phaser.CANVAS - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - CANVAS: 1, - - /** - * WebGL Renderer. - * - * @name Phaser.WEBGL - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - WEBGL: 2, - - /** - * Headless Renderer. - * - * @name Phaser.HEADLESS - * @readOnly - * @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 - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - FOREVER: -1, - - /** - * Direction constant. - * - * @name Phaser.NONE - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - NONE: 4, - - /** - * Direction constant. - * - * @name Phaser.UP - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - UP: 5, - - /** - * Direction constant. - * - * @name Phaser.DOWN - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - DOWN: 6, - - /** - * Direction constant. - * - * @name Phaser.LEFT - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - LEFT: 7, - - /** - * Direction constant. - * - * @name Phaser.RIGHT - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - RIGHT: 8 - -}; - -module.exports = CONST; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var GetFastValue = __webpack_require__(1); - -/** - * @typedef {object} GetTilesWithinFilteringOptions - * - * @property {boolean} [isNotEmpty=false] - If true, only return tiles that don't have -1 for an index. - * @property {boolean} [isColliding=false] - If true, only return tiles that collide on at least one side. - * @property {boolean} [hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. - */ - -/** - * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. - * - * @function Phaser.Tilemaps.Components.GetTilesWithin - * @private - * @since 3.0.0 - * - * @param {integer} tileX - [description] - * @param {integer} tileY - [description] - * @param {integer} width - [description] - * @param {integer} height - [description] - * @param {object} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles. - * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * - * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. - */ -var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer) -{ - if (tileX === undefined) { tileX = 0; } - if (tileY === undefined) { tileY = 0; } - if (width === undefined) { width = layer.width; } - if (height === undefined) { height = layer.height; } - - var isNotEmpty = GetFastValue(filteringOptions, 'isNotEmpty', false); - var isColliding = GetFastValue(filteringOptions, 'isColliding', false); - var hasInterestingFace = GetFastValue(filteringOptions, 'hasInterestingFace', false); - - // Clip x, y to top left of map, while shrinking width/height to match. - if (tileX < 0) - { - width += tileX; - tileX = 0; - } - if (tileY < 0) - { - height += tileY; - tileY = 0; - } - - // Clip width and height to bottom right of map. - if (tileX + width > layer.width) - { - width = Math.max(layer.width - tileX, 0); - } - if (tileY + height > layer.height) - { - height = Math.max(layer.height - tileY, 0); - } - - var results = []; - - for (var ty = tileY; ty < tileY + height; ty++) - { - for (var tx = tileX; tx < tileX + width; tx++) - { - var tile = layer.data[ty][tx]; - if (tile !== null) - { - if (isNotEmpty && tile.index === -1) { continue; } - if (isColliding && !tile.collides) { continue; } - if (hasInterestingFace && !tile.hasInterestingFace) { continue; } - results.push(tile); - } - } - } - - return results; -}; - -module.exports = GetTilesWithin; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var Smoothing = __webpack_require__(133); // The pool into which the canvas elements are placed. @@ -4931,6 +4716,236 @@ var CanvasPool = function () module.exports = CanvasPool(); +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Global consts. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @readOnly + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.12.0-beta2', + + BlendModes: __webpack_require__(52), + + ScaleModes: __webpack_require__(60), + + /** + * AUTO Detect Renderer. + * + * @name Phaser.AUTO + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Canvas Renderer. + * + * @name Phaser.CANVAS + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * WebGL Renderer. + * + * @name Phaser.WEBGL + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * Headless Renderer. + * + * @name Phaser.HEADLESS + * @readOnly + * @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 + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var GetFastValue = __webpack_require__(1); + +/** + * @typedef {object} GetTilesWithinFilteringOptions + * + * @property {boolean} [isNotEmpty=false] - If true, only return tiles that don't have -1 for an index. + * @property {boolean} [isColliding=false] - If true, only return tiles that collide on at least one side. + * @property {boolean} [hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. + */ + +/** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * + * @function Phaser.Tilemaps.Components.GetTilesWithin + * @private + * @since 3.0.0 + * + * @param {integer} tileX - [description] + * @param {integer} tileY - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] + * @param {object} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles. + * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. + * + * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. + */ +var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer) +{ + if (tileX === undefined) { tileX = 0; } + if (tileY === undefined) { tileY = 0; } + if (width === undefined) { width = layer.width; } + if (height === undefined) { height = layer.height; } + + var isNotEmpty = GetFastValue(filteringOptions, 'isNotEmpty', false); + var isColliding = GetFastValue(filteringOptions, 'isColliding', false); + var hasInterestingFace = GetFastValue(filteringOptions, 'hasInterestingFace', false); + + // Clip x, y to top left of map, while shrinking width/height to match. + if (tileX < 0) + { + width += tileX; + tileX = 0; + } + if (tileY < 0) + { + height += tileY; + tileY = 0; + } + + // Clip width and height to bottom right of map. + if (tileX + width > layer.width) + { + width = Math.max(layer.width - tileX, 0); + } + if (tileY + height > layer.height) + { + height = Math.max(layer.height - tileY, 0); + } + + var results = []; + + for (var ty = tileY; ty < tileY + height; ty++) + { + for (var tx = tileX; tx < tileX + width; tx++) + { + var tile = layer.data[ty][tx]; + if (tile !== null) + { + if (isNotEmpty && tile.index === -1) { continue; } + if (isColliding && !tile.collides) { continue; } + if (hasInterestingFace && !tile.hasInterestingFace) { continue; } + results.push(tile); + } + } + } + + return results; +}; + +module.exports = GetTilesWithin; + + /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { @@ -5153,899 +5168,6 @@ module.exports = PropertyValueSet; /***/ }), /* 27 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|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 - -}; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var CONST = __webpack_require__(18); -var File = __webpack_require__(19); -var FileTypesManager = __webpack_require__(6); -var GetFastValue = __webpack_require__(1); -var GetValue = __webpack_require__(3); -var IsPlainObject = __webpack_require__(7); - -/** - * @typedef {object} Phaser.Loader.FileTypes.JSONFileConfig - * - * @property {string} key - The key of the file. Must be unique within both the Loader and the JSON Cache. - * @property {string|any} [url] - The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. - * @property {string} [extension='json'] - The default file extension to use if no url is provided. - * @property {string} [dataKey] - If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. - * @property {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - */ - -/** - * @classdesc - * A single JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. - * - * @class JSONFile - * @extends Phaser.Loader.File - * @memberOf Phaser.Loader.FileTypes - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @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 {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - */ -var JSONFile = new Class({ - - Extends: File, - - initialize: - - // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object - // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing - - function JSONFile (loader, key, url, xhrSettings, dataKey) - { - var extension = 'json'; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - dataKey = GetFastValue(config, 'dataKey', dataKey); - } - - var fileConfig = { - type: 'json', - cache: loader.cacheManager.json, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings, - config: dataKey - }; - - File.call(this, loader, fileConfig); - - if (IsPlainObject(url)) - { - // Object provided instead of a URL, so no need to actually load it (populate data with value) - if (dataKey) - { - this.data = GetValue(url, dataKey); - } - else - { - this.data = url; - } - - this.state = CONST.FILE_POPULATED; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.JSONFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - if (this.state !== CONST.FILE_POPULATED) - { - this.state = CONST.FILE_PROCESSING; - - var json = JSON.parse(this.xhrLoader.responseText); - - var key = this.config; - - if (typeof key === 'string') - { - this.data = GetValue(json, key, json); - } - else - { - this.data = json; - } - } - - this.onProcessComplete(); - } - -}); - -/** - * 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 () - * { - * this.load.json('wavedata', 'files/AlienWaveData.json'); - * } - * ``` - * - * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, - * or if it's already running, when the next free load slot becomes available. This happens automatically if you - * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued - * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. - * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the - * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been - * loaded. - * - * The key must be a unique String. It is used to add the file to the global 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', - * url: 'files/AlienWaveData.json' - * }); - * ``` - * - * See the documentation for `Phaser.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 ... - * var data = this.cache.json.get('wavedata'); - * ``` - * - * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files - * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and - * this is what you would use to retrieve the text from the JSON Cache. - * - * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. - * - * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" - * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` 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 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": { - * "baddies": { - * "aliens": {}, - * "boss": {} - * } - * }, - * "level2": {}, - * "level3": {} - * } - * ``` - * - * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. - * - * Note: The ability to load this type of file will only be available if the JSON 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#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent - * @since 3.0.0 - * - * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig|Phaser.Loader.FileTypes.JSONFileConfig[])} 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 {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - * @param {XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. - * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. - */ -FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) -{ - if (Array.isArray(key)) - { - for (var i = 0; i < key.length; i++) - { - // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object - this.addFile(new JSONFile(this, key[i])); - } - } - else - { - this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); - } - - return this; -}); - -module.exports = JSONFile; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Tests if the start and end indexes are a safe range for the given array. - * - * @function Phaser.Utils.Array.SafeRange - * @since 3.4.0 - * - * @param {array} array - The array to check. - * @param {integer} startIndex - The start index. - * @param {integer} endIndex - The end index. - * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. - * - * @return {boolean} True if the range is safe, otherwise false. - */ -var SafeRange = function (array, startIndex, endIndex, throwError) -{ - var len = array.length; - - if (startIndex < 0 || - startIndex > len || - startIndex >= endIndex || - endIndex > len || - startIndex + endIndex > len) - { - if (throwError) - { - throw new Error('Range Error: Values outside acceptable range'); - } - - return false; - } - else - { - return true; - } -}; - -module.exports = SafeRange; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var GetColor = __webpack_require__(158); -var GetColor32 = __webpack_require__(287); - -/** - * @classdesc - * The Color class holds a single color value and allows for easy modification and reading of it. - * - * @class Color - * @memberOf Phaser.Display - * @constructor - * @since 3.0.0 - * - * @param {integer} [red=0] - The red color value. A number between 0 and 255. - * @param {integer} [green=0] - The green color value. A number between 0 and 255. - * @param {integer} [blue=0] - The blue color value. A number between 0 and 255. - * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. - */ -var Color = new Class({ - - initialize: - - function Color (red, green, blue, alpha) - { - if (red === undefined) { red = 0; } - if (green === undefined) { green = 0; } - if (blue === undefined) { blue = 0; } - if (alpha === undefined) { alpha = 255; } - - /** - * The internal red color value. - * - * @name Phaser.Display.Color#r - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.r = 0; - - /** - * The internal green color value. - * - * @name Phaser.Display.Color#g - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.g = 0; - - /** - * The internal blue color value. - * - * @name Phaser.Display.Color#b - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.b = 0; - - /** - * The internal alpha color value. - * - * @name Phaser.Display.Color#a - * @type {number} - * @private - * @default 255 - * @since 3.0.0 - */ - this.a = 255; - - /** - * An array containing the calculated color values for WebGL use. - * - * @name Phaser.Display.Color#gl - * @type {number[]} - * @since 3.0.0 - */ - this.gl = [ 0, 0, 0, 1 ]; - - /** - * Pre-calculated internal color value. - * - * @name Phaser.Display.Color#_color - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._color = 0; - - /** - * Pre-calculated internal color32 value. - * - * @name Phaser.Display.Color#_color32 - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._color32 = 0; - - /** - * Pre-calculated internal color rgb string value. - * - * @name Phaser.Display.Color#_rgba - * @type {string} - * @private - * @default '' - * @since 3.0.0 - */ - this._rgba = ''; - - this.setTo(red, green, blue, alpha); - }, - - /** - * Sets this color to be transparent. Sets all values to zero. - * - * @method Phaser.Display.Color#transparent - * @since 3.0.0 - * - * @return {Phaser.Display.Color} This Color object. - */ - transparent: function () - { - this.red = 0; - this.green = 0; - this.blue = 0; - this.alpha = 0; - - return this.update(); - }, - - /** - * Sets the color of this Color component. - * - * @method Phaser.Display.Color#setTo - * @since 3.0.0 - * - * @param {integer} red - The red color value. A number between 0 and 255. - * @param {integer} green - The green color value. A number between 0 and 255. - * @param {integer} blue - The blue color value. A number between 0 and 255. - * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. - * - * @return {Phaser.Display.Color} This Color object. - */ - setTo: function (red, green, blue, alpha) - { - if (alpha === undefined) { alpha = 255; } - - this.red = red; - this.green = green; - this.blue = blue; - this.alpha = alpha; - - return this.update(); - }, - - /** - * Sets the red, green, blue and alpha GL values of this Color component. - * - * @method Phaser.Display.Color#setGLTo - * @since 3.0.0 - * - * @param {number} red - The red color value. A number between 0 and 1. - * @param {number} green - The green color value. A number between 0 and 1. - * @param {number} blue - The blue color value. A number between 0 and 1. - * @param {number} [alpha=1] - The alpha value. A number between 0 and 1. - * - * @return {Phaser.Display.Color} This Color object. - */ - setGLTo: function (red, green, blue, alpha) - { - if (alpha === undefined) { alpha = 1; } - - this.redGL = red; - this.greenGL = green; - this.blueGL = blue; - this.alphaGL = alpha; - - return this.update(); - }, - - /** - * Sets the color based on the color object given. - * - * @method Phaser.Display.Color#setFromRGB - * @since 3.0.0 - * - * @param {InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255. - * - * @return {Phaser.Display.Color} This Color object. - */ - setFromRGB: function (color) - { - this.red = color.r; - this.green = color.g; - this.blue = color.b; - - if (color.hasOwnProperty('a')) - { - this.alpha = color.a; - } - - return this.update(); - }, - - /** - * Updates the internal cache values. - * - * @method Phaser.Display.Color#update - * @since 3.0.0 - * - * @return {Phaser.Display.Color} This Color object. - */ - update: function () - { - this._color = GetColor(this.r, this.g, this.b); - this._color32 = GetColor32(this.r, this.g, this.b, this.a); - this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (this.a / 255) + ')'; - - return this; - }, - - /** - * Returns a new Color component using the values from this one. - * - * @method Phaser.Display.Color#clone - * @since 3.0.0 - * - * @return {Phaser.Display.Color} A new Color object. - */ - clone: function () - { - return new Color(this.r, this.g, this.b, this.a); - }, - - /** - * The color of this Color component, not including the alpha channel. - * - * @name Phaser.Display.Color#color - * @type {number} - * @readOnly - * @since 3.0.0 - */ - color: { - - get: function () - { - return this._color; - } - - }, - - /** - * The color of this Color component, including the alpha channel. - * - * @name Phaser.Display.Color#color32 - * @type {number} - * @readOnly - * @since 3.0.0 - */ - color32: { - - get: function () - { - return this._color32; - } - - }, - - /** - * The color of this Color component as a string which can be used in CSS color values. - * - * @name Phaser.Display.Color#rgba - * @type {string} - * @readOnly - * @since 3.0.0 - */ - rgba: { - - get: function () - { - return this._rgba; - } - - }, - - /** - * The red color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#redGL - * @type {number} - * @since 3.0.0 - */ - redGL: { - - get: function () - { - return this.gl[0]; - }, - - set: function (value) - { - this.gl[0] = Math.min(Math.abs(value), 1); - - this.r = Math.floor(this.gl[0] * 255); - - this.update(); - } - - }, - - /** - * The green color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#greenGL - * @type {number} - * @since 3.0.0 - */ - greenGL: { - - get: function () - { - return this.gl[1]; - }, - - set: function (value) - { - this.gl[1] = Math.min(Math.abs(value), 1); - - this.g = Math.floor(this.gl[1] * 255); - - this.update(); - } - - }, - - /** - * The blue color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#blueGL - * @type {number} - * @since 3.0.0 - */ - blueGL: { - - get: function () - { - return this.gl[2]; - }, - - set: function (value) - { - this.gl[2] = Math.min(Math.abs(value), 1); - - this.b = Math.floor(this.gl[2] * 255); - - this.update(); - } - - }, - - /** - * The alpha color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#alphaGL - * @type {number} - * @since 3.0.0 - */ - alphaGL: { - - get: function () - { - return this.gl[3]; - }, - - set: function (value) - { - this.gl[3] = Math.min(Math.abs(value), 1); - - this.a = Math.floor(this.gl[3] * 255); - - this.update(); - } - - }, - - /** - * The red color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#red - * @type {number} - * @since 3.0.0 - */ - red: { - - get: function () - { - return this.r; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.r = Math.min(value, 255); - - this.gl[0] = value / 255; - - this.update(); - } - - }, - - /** - * The green color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#green - * @type {number} - * @since 3.0.0 - */ - green: { - - get: function () - { - return this.g; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.g = Math.min(value, 255); - - this.gl[1] = value / 255; - - this.update(); - } - - }, - - /** - * The blue color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#blue - * @type {number} - * @since 3.0.0 - */ - blue: { - - get: function () - { - return this.b; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.b = Math.min(value, 255); - - this.gl[2] = value / 255; - - this.update(); - } - - }, - - /** - * The alpha color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#alpha - * @type {number} - * @since 3.0.0 - */ - alpha: { - - get: function () - { - return this.a; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.a = Math.min(value, 255); - - this.gl[3] = value / 255; - - this.update(); - } - - } - -}); - -module.exports = Color; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Geom.Rectangle.Contains - * @since 3.0.0 - * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {boolean} [description] - */ -var Contains = function (rect, x, y) -{ - if (rect.width <= 0 || rect.height <= 0) - { - return false; - } - - return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); -}; - -module.exports = Contains; - - -/***/ }), -/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6916,6 +6038,899 @@ var TransformMatrix = new Class({ module.exports = TransformMatrix; +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|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 + +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(18); +var File = __webpack_require__(19); +var FileTypesManager = __webpack_require__(6); +var GetFastValue = __webpack_require__(1); +var GetValue = __webpack_require__(3); +var IsPlainObject = __webpack_require__(7); + +/** + * @typedef {object} Phaser.Loader.FileTypes.JSONFileConfig + * + * @property {string} key - The key of the file. Must be unique within both the Loader and the JSON Cache. + * @property {string|any} [url] - The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. + * @property {string} [extension='json'] - The default file extension to use if no url is provided. + * @property {string} [dataKey] - If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. + * @property {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ + +/** + * @classdesc + * A single JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. + * + * @class JSONFile + * @extends Phaser.Loader.File + * @memberOf Phaser.Loader.FileTypes + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. + * @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 {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + */ +var JSONFile = new Class({ + + Extends: File, + + initialize: + + // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object + // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing + + function JSONFile (loader, key, url, xhrSettings, dataKey) + { + var extension = 'json'; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + dataKey = GetFastValue(config, 'dataKey', dataKey); + } + + var fileConfig = { + type: 'json', + cache: loader.cacheManager.json, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings, + config: dataKey + }; + + File.call(this, loader, fileConfig); + + if (IsPlainObject(url)) + { + // Object provided instead of a URL, so no need to actually load it (populate data with value) + if (dataKey) + { + this.data = GetValue(url, dataKey); + } + else + { + this.data = url; + } + + this.state = CONST.FILE_POPULATED; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.JSONFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + if (this.state !== CONST.FILE_POPULATED) + { + this.state = CONST.FILE_PROCESSING; + + var json = JSON.parse(this.xhrLoader.responseText); + + var key = this.config; + + if (typeof key === 'string') + { + this.data = GetValue(json, key, json); + } + else + { + this.data = json; + } + } + + this.onProcessComplete(); + } + +}); + +/** + * 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 () + * { + * this.load.json('wavedata', 'files/AlienWaveData.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global 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', + * url: 'files/AlienWaveData.json' + * }); + * ``` + * + * See the documentation for `Phaser.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 ... + * var data = this.cache.json.get('wavedata'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the JSON Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` 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 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": { + * "baddies": { + * "aliens": {}, + * "boss": {} + * } + * }, + * "level2": {}, + * "level3": {} + * } + * ``` + * + * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. + * + * Note: The ability to load this type of file will only be available if the JSON 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#json + * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig|Phaser.Loader.FileTypes.JSONFileConfig[])} 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 {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + * @param {XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + * + * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + */ +FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) +{ + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object + this.addFile(new JSONFile(this, key[i])); + } + } + else + { + this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); + } + + return this; +}); + +module.exports = JSONFile; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Tests if the start and end indexes are a safe range for the given array. + * + * @function Phaser.Utils.Array.SafeRange + * @since 3.4.0 + * + * @param {array} array - The array to check. + * @param {integer} startIndex - The start index. + * @param {integer} endIndex - The end index. + * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. + * + * @return {boolean} True if the range is safe, otherwise false. + */ +var SafeRange = function (array, startIndex, endIndex, throwError) +{ + var len = array.length; + + if (startIndex < 0 || + startIndex > len || + startIndex >= endIndex || + endIndex > len || + startIndex + endIndex > len) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var GetColor = __webpack_require__(159); +var GetColor32 = __webpack_require__(288); + +/** + * @classdesc + * The Color class holds a single color value and allows for easy modification and reading of it. + * + * @class Color + * @memberOf Phaser.Display + * @constructor + * @since 3.0.0 + * + * @param {integer} [red=0] - The red color value. A number between 0 and 255. + * @param {integer} [green=0] - The green color value. A number between 0 and 255. + * @param {integer} [blue=0] - The blue color value. A number between 0 and 255. + * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. + */ +var Color = new Class({ + + initialize: + + function Color (red, green, blue, alpha) + { + if (red === undefined) { red = 0; } + if (green === undefined) { green = 0; } + if (blue === undefined) { blue = 0; } + if (alpha === undefined) { alpha = 255; } + + /** + * The internal red color value. + * + * @name Phaser.Display.Color#r + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.r = 0; + + /** + * The internal green color value. + * + * @name Phaser.Display.Color#g + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.g = 0; + + /** + * The internal blue color value. + * + * @name Phaser.Display.Color#b + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.b = 0; + + /** + * The internal alpha color value. + * + * @name Phaser.Display.Color#a + * @type {number} + * @private + * @default 255 + * @since 3.0.0 + */ + this.a = 255; + + /** + * An array containing the calculated color values for WebGL use. + * + * @name Phaser.Display.Color#gl + * @type {number[]} + * @since 3.0.0 + */ + this.gl = [ 0, 0, 0, 1 ]; + + /** + * Pre-calculated internal color value. + * + * @name Phaser.Display.Color#_color + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._color = 0; + + /** + * Pre-calculated internal color32 value. + * + * @name Phaser.Display.Color#_color32 + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._color32 = 0; + + /** + * Pre-calculated internal color rgb string value. + * + * @name Phaser.Display.Color#_rgba + * @type {string} + * @private + * @default '' + * @since 3.0.0 + */ + this._rgba = ''; + + this.setTo(red, green, blue, alpha); + }, + + /** + * Sets this color to be transparent. Sets all values to zero. + * + * @method Phaser.Display.Color#transparent + * @since 3.0.0 + * + * @return {Phaser.Display.Color} This Color object. + */ + transparent: function () + { + this.red = 0; + this.green = 0; + this.blue = 0; + this.alpha = 0; + + return this.update(); + }, + + /** + * Sets the color of this Color component. + * + * @method Phaser.Display.Color#setTo + * @since 3.0.0 + * + * @param {integer} red - The red color value. A number between 0 and 255. + * @param {integer} green - The green color value. A number between 0 and 255. + * @param {integer} blue - The blue color value. A number between 0 and 255. + * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. + * + * @return {Phaser.Display.Color} This Color object. + */ + setTo: function (red, green, blue, alpha) + { + if (alpha === undefined) { alpha = 255; } + + this.red = red; + this.green = green; + this.blue = blue; + this.alpha = alpha; + + return this.update(); + }, + + /** + * Sets the red, green, blue and alpha GL values of this Color component. + * + * @method Phaser.Display.Color#setGLTo + * @since 3.0.0 + * + * @param {number} red - The red color value. A number between 0 and 1. + * @param {number} green - The green color value. A number between 0 and 1. + * @param {number} blue - The blue color value. A number between 0 and 1. + * @param {number} [alpha=1] - The alpha value. A number between 0 and 1. + * + * @return {Phaser.Display.Color} This Color object. + */ + setGLTo: function (red, green, blue, alpha) + { + if (alpha === undefined) { alpha = 1; } + + this.redGL = red; + this.greenGL = green; + this.blueGL = blue; + this.alphaGL = alpha; + + return this.update(); + }, + + /** + * Sets the color based on the color object given. + * + * @method Phaser.Display.Color#setFromRGB + * @since 3.0.0 + * + * @param {InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255. + * + * @return {Phaser.Display.Color} This Color object. + */ + setFromRGB: function (color) + { + this.red = color.r; + this.green = color.g; + this.blue = color.b; + + if (color.hasOwnProperty('a')) + { + this.alpha = color.a; + } + + return this.update(); + }, + + /** + * Updates the internal cache values. + * + * @method Phaser.Display.Color#update + * @since 3.0.0 + * + * @return {Phaser.Display.Color} This Color object. + */ + update: function () + { + this._color = GetColor(this.r, this.g, this.b); + this._color32 = GetColor32(this.r, this.g, this.b, this.a); + this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (this.a / 255) + ')'; + + return this; + }, + + /** + * Returns a new Color component using the values from this one. + * + * @method Phaser.Display.Color#clone + * @since 3.0.0 + * + * @return {Phaser.Display.Color} A new Color object. + */ + clone: function () + { + return new Color(this.r, this.g, this.b, this.a); + }, + + /** + * The color of this Color component, not including the alpha channel. + * + * @name Phaser.Display.Color#color + * @type {number} + * @readOnly + * @since 3.0.0 + */ + color: { + + get: function () + { + return this._color; + } + + }, + + /** + * The color of this Color component, including the alpha channel. + * + * @name Phaser.Display.Color#color32 + * @type {number} + * @readOnly + * @since 3.0.0 + */ + color32: { + + get: function () + { + return this._color32; + } + + }, + + /** + * The color of this Color component as a string which can be used in CSS color values. + * + * @name Phaser.Display.Color#rgba + * @type {string} + * @readOnly + * @since 3.0.0 + */ + rgba: { + + get: function () + { + return this._rgba; + } + + }, + + /** + * The red color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#redGL + * @type {number} + * @since 3.0.0 + */ + redGL: { + + get: function () + { + return this.gl[0]; + }, + + set: function (value) + { + this.gl[0] = Math.min(Math.abs(value), 1); + + this.r = Math.floor(this.gl[0] * 255); + + this.update(); + } + + }, + + /** + * The green color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#greenGL + * @type {number} + * @since 3.0.0 + */ + greenGL: { + + get: function () + { + return this.gl[1]; + }, + + set: function (value) + { + this.gl[1] = Math.min(Math.abs(value), 1); + + this.g = Math.floor(this.gl[1] * 255); + + this.update(); + } + + }, + + /** + * The blue color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#blueGL + * @type {number} + * @since 3.0.0 + */ + blueGL: { + + get: function () + { + return this.gl[2]; + }, + + set: function (value) + { + this.gl[2] = Math.min(Math.abs(value), 1); + + this.b = Math.floor(this.gl[2] * 255); + + this.update(); + } + + }, + + /** + * The alpha color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#alphaGL + * @type {number} + * @since 3.0.0 + */ + alphaGL: { + + get: function () + { + return this.gl[3]; + }, + + set: function (value) + { + this.gl[3] = Math.min(Math.abs(value), 1); + + this.a = Math.floor(this.gl[3] * 255); + + this.update(); + } + + }, + + /** + * The red color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#red + * @type {number} + * @since 3.0.0 + */ + red: { + + get: function () + { + return this.r; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.r = Math.min(value, 255); + + this.gl[0] = value / 255; + + this.update(); + } + + }, + + /** + * The green color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#green + * @type {number} + * @since 3.0.0 + */ + green: { + + get: function () + { + return this.g; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.g = Math.min(value, 255); + + this.gl[1] = value / 255; + + this.update(); + } + + }, + + /** + * The blue color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#blue + * @type {number} + * @since 3.0.0 + */ + blue: { + + get: function () + { + return this.b; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.b = Math.min(value, 255); + + this.gl[2] = value / 255; + + this.update(); + } + + }, + + /** + * The alpha color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this.a; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.a = Math.min(value, 255); + + this.gl[3] = value / 255; + + this.update(); + } + + } + +}); + +module.exports = Color; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {boolean} [description] + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + /***/ }), /* 33 */ /***/ (function(module, exports) { @@ -7010,9 +7025,9 @@ module.exports = Clone; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); -var SpriteRender = __webpack_require__(529); +var SpriteRender = __webpack_require__(534); /** * @classdesc @@ -7795,7 +7810,7 @@ module.exports = Wrap; */ var GetTileAt = __webpack_require__(142); -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the @@ -8737,7 +8752,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(510))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(515))) /***/ }), /* 58 */ @@ -9719,7 +9734,7 @@ module.exports = GetBoolean; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * [description] @@ -9816,7 +9831,7 @@ module.exports = FromPercent; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var Rectangle = __webpack_require__(393); /** @@ -10675,10 +10690,10 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Contains = __webpack_require__(61); -var GetPoint = __webpack_require__(233); -var GetPoints = __webpack_require__(232); -var Line = __webpack_require__(97); -var Random = __webpack_require__(160); +var GetPoint = __webpack_require__(235); +var GetPoints = __webpack_require__(234); +var Line = __webpack_require__(98); +var Random = __webpack_require__(161); /** * @classdesc @@ -11109,7 +11124,7 @@ module.exports = Triangle; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var ImageRender = __webpack_require__(432); @@ -11677,17 +11692,17 @@ module.exports = Length; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); -var GetProps = __webpack_require__(170); -var GetTargets = __webpack_require__(103); +var GetProps = __webpack_require__(171); +var GetTargets = __webpack_require__(104); var GetValue = __webpack_require__(3); -var GetValueOp = __webpack_require__(102); -var Tween = __webpack_require__(100); -var TweenData = __webpack_require__(99); +var GetValueOp = __webpack_require__(103); +var Tween = __webpack_require__(101); +var TweenData = __webpack_require__(100); /** * [description] @@ -12060,8 +12075,8 @@ module.exports = InputPluginCache; // Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. -var CheckMatrix = __webpack_require__(119); -var TransposeMatrix = __webpack_require__(188); +var CheckMatrix = __webpack_require__(120); +var TransposeMatrix = __webpack_require__(189); /** * [description] @@ -13767,7 +13782,7 @@ module.exports = AddToDOM; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(266); +var FromPoints = __webpack_require__(267); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(4); @@ -15121,6 +15136,1817 @@ module.exports = Vector3; /* 88 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Components = __webpack_require__(13); +var DegToRad = __webpack_require__(39); +var EventEmitter = __webpack_require__(8); +var Rectangle = __webpack_require__(11); +var TransformMatrix = __webpack_require__(27); +var ValueToColor = __webpack_require__(134); +var Vector2 = __webpack_require__(4); + +/** + * @typedef {object} JSONCameraBounds + * @property {number} x - The horizontal position of camera + * @property {number} y - The vertical position of camera + * @property {number} width - The width size of camera + * @property {number} height - The height size of camera + */ + +/** + * @typedef {object} JSONCamera + * + * @property {string} name - The name of the camera + * @property {number} x - The horizontal position of camera + * @property {number} y - The vertical position of camera + * @property {number} width - The width size of camera + * @property {number} height - The height size of camera + * @property {number} zoom - The zoom of camera + * @property {number} rotation - The rotation of camera + * @property {boolean} roundPixels - The round pixels st status of camera + * @property {number} scrollX - The horizontal scroll of camera + * @property {number} scrollY - The vertical scroll of camera + * @property {string} backgroundColor - The background color of camera + * @property {(JSONCameraBounds|undefined)} [bounds] - The bounds of camera + */ + +/** + * @classdesc + * A Base Camera class. + * + * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, + * and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. + * + * The Base Camera is extended by the Camera class, which adds in special effects including Fade, + * Flash and Camera Shake, as well as the ability to follow Game Objects. + * + * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow + * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate + * to when they were added to the Camera class. + * + * @class BaseCamera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.12.0 + * + * @extends Phaser.Events.EventEmitter + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.Visible + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var BaseCamera = new Class({ + + Extends: EventEmitter, + + Mixins: [ + Components.Alpha, + Components.Visible + ], + + initialize: + + function BaseCamera (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + EventEmitter.call(this); + + /** + * A reference to the Scene this camera belongs to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene; + + /** + * A reference to the Game Scene Manager. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager + * @type {Phaser.Scenes.SceneManager} + * @since 3.12.0 + */ + this.sceneManager; + + /** + * A reference to the Game Config. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#config + * @type {object} + * @readOnly + * @since 3.12.0 + */ + this.config; + + /** + * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion. + * This value is a bitmask. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#id + * @type {integer} + * @readOnly + * @since 3.11.0 + */ + this.id = 0; + + /** + * The name of the Camera. This is left empty for your own use. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The resolution of the Game, used in most Camera calculations. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#resolution + * @type {number} + * @readOnly + * @since 3.12.0 + */ + this.resolution = 1; + + /** + * Should this camera round its pixel values to integers? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.roundPixels = false; + + /** + * Is this Camera visible or not? + * + * A visible camera will render and perform input tests. + * An invisible camera will not render anything and will skip input tests. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#visible + * @type {boolean} + * @default true + * @since 3.10.0 + this.visible = true; + */ + + /** + * Is this Camera using a bounds to restrict scrolling movement? + * + * Set this property along with the bounds via `Camera.setBounds`. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.useBounds = false; + + /** + * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at. + * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. + * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. + * You can use it for culling or intersection checks. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#worldView + * @type {Phaser.Geom.Rectangle} + * @readOnly + * @since 3.11.0 + */ + this.worldView = new Rectangle(); + + /** + * Is this Camera dirty? + * + * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. + * + * This flag is cleared during the `postRenderCamera` method of the renderer. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#dirty + * @type {boolean} + * @default true + * @since 3.11.0 + */ + this.dirty = true; + + /** + * The x position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollX` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#x + * @type {number} + * @private + * @since 3.0.0 + */ + this._x = x; + + /** + * The y position of the Camera, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollY` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#y + * @type {number} + * @private + * @since 3.0.0 + */ + this._y = y; + + /** + * Internal Camera X value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cx + * @type {number} + * @private + * @since 3.12.0 + */ + this._cx = 0; + + /** + * Internal Camera Y value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cy + * @type {number} + * @private + * @since 3.12.0 + */ + this._cy = 0; + + /** + * Internal Camera Width value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cw + * @type {number} + * @private + * @since 3.12.0 + */ + this._cw = 0; + + /** + * Internal Camera Height value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_ch + * @type {number} + * @private + * @since 3.12.0 + */ + this._ch = 0; + + /** + * The width of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_width + * @type {number} + * @private + * @since 3.11.0 + */ + this._width = width; + + /** + * The height of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_height + * @type {number} + * @private + * @since 3.11.0 + */ + this._height = height; + + /** + * The bounds the camera is restrained to during scrolling. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds + * @type {Phaser.Geom.Rectangle} + * @private + * @since 3.0.0 + */ + this._bounds = new Rectangle(); + + /** + * The horizontal scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._scrollX = 0; + + /** + * The vertical scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._scrollY = 0; + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * + * A value of 0.5 would zoom the Camera out, so you can now see twice as much + * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel + * now takes up 2 pixels when rendered. + * + * Set to 1 to return to the default zoom level. + * + * Be careful to never set this value to zero. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom + * @type {number} + * @private + * @default 1 + * @since 3.11.0 + */ + this._zoom = 1; + + /** + * The rotation of the Camera in radians. + * + * 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. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._rotation = 0; + + /** + * A local transform matrix used for internal calculations. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#matrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @private + * @since 3.0.0 + */ + this.matrix = new TransformMatrix(); + + /** + * Does this Camera have a transparent background? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#transparent + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.transparent = true; + + /** + * The background color of this Camera. Only used if `transparent` is `false`. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor + * @type {Phaser.Display.Color} + * @since 3.0.0 + */ + this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); + + /** + * The Camera alpha value. Setting this property impacts every single object that this Camera + * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out, + * or via the chainable `setAlpha` method instead. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#alpha + * @type {number} + * @default 1 + * @since 3.11.0 + this.alpha = 1; + */ + + /** + * Should the camera cull Game Objects before checking them for input hit tests? + * In some special cases it may be beneficial to disable this. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.disableCull = false; + + /** + * A temporary array of culled objects. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects + * @type {Phaser.GameObjects.GameObject[]} + * @default [] + * @private + * @since 3.0.0 + */ + this.culledObjects = []; + + /** + * The mid-point of the Camera in 'world' coordinates. + * + * Use it to obtain exactly where in the world the center of the camera is currently looking. + * + * This value is updated in the preRender method, after the scroll values and follower + * have been processed. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint + * @type {Phaser.Math.Vector2} + * @readOnly + * @since 3.11.0 + */ + this.midPoint = new Vector2(width / 2, height / 2); + + /** + * The horizontal origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#originX + * @type {number} + * @default 0.5 + * @since 3.11.0 + */ + this.originX = 0.5; + + /** + * The vertical origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#originY + * @type {number} + * @default 0.5 + * @since 3.11.0 + */ + this.originY = 0.5; + + /** + * Does this Camera have a custom viewport? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport + * @type {boolean} + * @private + * @default false + * @since 3.12.0 + */ + this._customViewport = false; + }, + + /** + * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha + * @since 3.11.0 + * + * @param {number} [value=1] - The Camera alpha value. + * + * @return {this} This Camera instance. + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + */ + + /** + * Sets the rotation origin of this Camera. + * + * The values are given in the range 0 to 1 and are only used when calculating Camera rotation. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin + * @since 3.11.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Camera instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this; + }, + + /** + * Calculates what the Camera.scrollX and scrollY values would need to be in order to move + * the Camera so it is centered on the given x and y coordinates, without actually moving + * the Camera there. The results are clamped based on the Camera bounds, if set. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll + * @since 3.11.0 + * + * @param {number} x - The horizontal coordinate to center on. + * @param {number} y - The vertical coordinate to center on. + * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. + * + * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` abd `y` properties. + */ + getScroll: function (x, y, out) + { + if (out === undefined) { out = new Vector2(); } + + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + out.x = x - originX; + out.y = y - originY; + + if (this.useBounds) + { + out.x = this.clampX(out.x); + out.y = this.clampY(out.y); + } + + return out; + }, + + /** + * Moves the Camera so that it is centered on the given coordinates, bounds allowing. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn + * @since 3.11.0 + * + * @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. + */ + centerOn: function (x, y) + { + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + this.midPoint.set(x, y); + + this.scrollX = x - originX; + this.scrollY = y - originY; + + if (this.useBounds) + { + this.scrollX = this.clampX(this.scrollX); + this.scrollY = this.clampY(this.scrollY); + } + + return this; + }, + + /** + * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + centerToBounds: function () + { + if (this.useBounds) + { + var bounds = this._bounds; + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + this.midPoint.set(bounds.centerX, bounds.centerY); + + this.scrollX = bounds.centerX - originX; + this.scrollY = bounds.centerY - originY; + } + + return this; + }, + + /** + * Moves the Camera so that it is re-centered based on its viewport size. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + centerToSize: function () + { + this.scrollX = this.width * 0.5; + this.scrollY = this.height * 0.5; + + return this; + }, + + /** + * Takes an array of Game Objects and returns a new array featuring only those objects + * visible by this camera. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#cull + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return] + * + * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull. + * + * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera. + */ + cull: function (renderableObjects) + { + if (this.disableCull) + { + return renderableObjects; + } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return renderableObjects; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var culledObjects = this.culledObjects; + var length = renderableObjects.length; + + determinant = 1 / determinant; + + culledObjects.length = 0; + + for (var index = 0; index < length; ++index) + { + var object = renderableObjects[index]; + + if (!object.hasOwnProperty('width') || object.parentContainer) + { + culledObjects.push(object); + continue; + } + + var objectW = object.width; + var objectH = object.height; + var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); + var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); + var tx = (objectX * mva + objectY * mvc + mve); + var ty = (objectX * mvb + objectY * mvd + mvf); + var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); + var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); + var cullW = cameraW + objectW; + var cullH = cameraH + objectH; + + if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && + tw > -objectW && th > -objectH && tw < cullW && th < cullH) + { + culledObjects.push(object); + } + } + + return culledObjects; + }, + + /** + * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform. + * You can optionally provide a Vector2, or similar object, to store the results in. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {number} x - The x position to convert to world space. + * @param {number} y - The y position to convert to world space. + * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties. + */ + getWorldPoint: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + output.x = x; + output.y = y; + + return output; + } + + determinant = 1 / determinant; + + var ima = mvd * determinant; + var imb = -mvb * determinant; + var imc = -mvc * determinant; + var imd = mva * determinant; + var ime = (mvc * mvf - mvd * mve) * determinant; + var imf = (mvb * mve - mva * mvf) * determinant; + + var c = Math.cos(this.rotation); + var s = Math.sin(this.rotation); + + var zoom = this.zoom; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + + var res = this.resolution; + + var sx = x * res + ((scrollX * c - scrollY * s) * zoom); + var sy = y * res + ((scrollX * s + scrollY * c) * zoom); + + /* Apply transform to point */ + output.x = (sx * ima + sy * imc + ime); + output.y = (sx * imb + sy * imd + imf); + + return output; + }, + + /** + * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings + * so that they are ignored by this Camera. This means they will not be rendered by this Camera. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#ignore + * @since 3.0.0 + * + * @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. + */ + ignore: function (entries) + { + var id = this.id; + + if (!Array.isArray(entries)) + { + entries = [ entries ]; + } + + for (var i = 0; i < entries.length; i++) + { + var entry = entries[i]; + + if (Array.isArray(entry)) + { + this.ignore(entry); + } + else if (entry.isParent) + { + this.ignore(entry.getChildren()); + } + else + { + entry.cameraFilter |= id; + } + } + + return this; + }, + + /** + * Internal preRender step. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#preRender + * @protected + * @since 3.0.0 + * + * @param {number} baseScale - The base scale, as set in the Camera Manager. + * @param {number} resolution - The game resolution. + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + + var halfWidth = width * 0.5; + var halfHeight = height * 0.5; + + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + + var originX = width * this.originX; + var originY = height * this.originY; + + var sx = this.scrollX; + var sy = this.scrollY; + + if (this.useBounds) + { + sx = this.clampX(sx); + sy = this.clampY(sy); + } + + if (this.roundPixels) + { + originX = Math.round(originX); + originY = Math.round(originY); + } + + // Values are in pixels and not impacted by zooming the Camera + this.scrollX = sx; + this.scrollY = sy; + + var midX = sx + halfWidth; + var midY = sy + halfHeight; + + // The center of the camera, in world space, so taking zoom into account + // Basically the pixel value of what it's looking at in the middle of the cam + this.midPoint.set(midX, midY); + + var displayWidth = width / zoom; + var displayHeight = height / zoom; + + this.worldView.setTo( + midX - (displayWidth / 2), + midY - (displayHeight / 2), + displayWidth, + displayHeight + ); + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + }, + + /** + * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#clampX + * @since 3.11.0 + * + * @param {number} x - The value to horizontally scroll clamp. + * + * @return {number} The adjusted value to use as scrollX. + */ + clampX: function (x) + { + var bounds = this._bounds; + + var dw = this.displayWidth; + + var bx = bounds.x + ((dw - this.width) / 2); + var bw = Math.max(bx, bx + bounds.width - dw); + + if (x < bx) + { + x = bx; + } + else if (x > bw) + { + x = bw; + } + + return x; + }, + + /** + * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#clampY + * @since 3.11.0 + * + * @param {number} y - The value to vertically scroll clamp. + * + * @return {number} The adjusted value to use as scrollY. + */ + clampY: function (y) + { + var bounds = this._bounds; + + var dh = this.displayHeight; + + var by = bounds.y + ((dh - this.height) / 2); + var bh = Math.max(by, by + bounds.height - dh); + + if (y < by) + { + y = by; + } + else if (y > bh) + { + y = bh; + } + + return y; + }, + + /* + var gap = this._zoomInversed; + return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap); + */ + + /** + * If this Camera has previously had movement bounds set on it, this will remove them. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + removeBounds: function () + { + this.useBounds = false; + + this.dirty = true; + + this._bounds.setEmpty(); + + return this; + }, + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle + * @since 3.0.0 + * + * @param {number} [value=0] - The cameras angle of rotation, given in degrees. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setAngle: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = DegToRad(value); + + return this; + }, + + /** + * Sets the background color for this Camera. + * + * By default a Camera has a transparent background but it can be given a solid color, with any level + * of transparency, via this method. + * + * The color value can be specified using CSS color notation, hex or numbers. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor + * @since 3.0.0 + * + * @param {(string|number|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. + */ + setBackgroundColor: function (color) + { + if (color === undefined) { color = 'rgba(0,0,0,0)'; } + + this.backgroundColor = ValueToColor(color); + + this.transparent = (this.backgroundColor.alpha === 0); + + return this; + }, + + /** + * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. + * + * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the + * edges and into blank space. It does not limit the placement of Game Objects, or where + * the Camera viewport can be positioned. + * + * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. + * + * Clear the bounds entirely by calling `Camera.removeBounds`. + * + * If you set bounds that are smaller than the viewport it will stop the Camera from being + * able to scroll. The bounds can be positioned where-ever you wish. By default they are from + * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of + * the Camera bounds. However, you can position them anywhere. So if you wanted a game world + * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y + * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find + * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds + * @since 3.0.0 + * + * @param {integer} x - The top-left x coordinate of the bounds. + * @param {integer} y - The top-left y coordinate of the bounds. + * @param {integer} width - The width of the bounds, in pixels. + * @param {integer} height - The height of the bounds, in pixels. + * @param {boolean} [centerOn] - If `true` the Camera will automatically be centered on the new bounds. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setBounds: function (x, y, width, height, centerOn) + { + this._bounds.setTo(x, y, width, height); + + this.dirty = true; + this.useBounds = true; + + if (centerOn) + { + this.centerToBounds(); + } + else + { + this.scrollX = this.clampX(this.scrollX); + this.scrollY = this.clampY(this.scrollY); + } + + return this; + }, + + /** + * Sets the name of this Camera. + * This value is for your own use and isn't used internally. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setName + * @since 3.0.0 + * + * @param {string} [value=''] - The name of the Camera. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setName: function (value) + { + if (value === undefined) { value = ''; } + + this.name = value; + + return this; + }, + + /** + * Set the position of the Camera viewport within the game. + * + * This does not change where the camera is 'looking'. See `setScroll` to control that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition + * @since 3.0.0 + * + * @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. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation + * @since 3.0.0 + * + * @param {number} [value=0] - The rotation of the Camera, in radians. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setRotation: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = value; + + return this; + }, + + /** + * Should the Camera round pixel values to whole integers when rendering Game Objects? + * + * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels + * @since 3.0.0 + * + * @param {boolean} value - `true` to round Camera pixels, `false` to not. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setRoundPixels: function (value) + { + this.roundPixels = value; + + return this; + }, + + /** + * Sets the Scene the Camera is bound to. + * + * Also populates the `resolution` property and updates the internal size values. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setScene + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene the camera is bound to. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setScene: function (scene) + { + this.scene = scene; + + this.config = scene.sys.game.config; + this.sceneManager = scene.sys.game.scene; + + var res = this.config.resolution; + + this.resolution = res; + + this._cx = this._x * res; + this._cy = this._y * res; + this._cw = this._width * res; + this._ch = this._height * res; + + return this; + }, + + /** + * Set the position of where the Camera is looking within the game. + * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. + * Use this method, or the scroll properties, to move your camera around the game world. + * + * This does not change where the camera viewport is placed. See `setPosition` to control that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll + * @since 3.0.0 + * + * @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. + */ + setScroll: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollX = x; + this.scrollY = y; + + return this; + }, + + /** + * Set the size of the Camera viewport. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setSize + * @since 3.0.0 + * + * @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. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * This method sets the position and size of the Camera viewport in a single call. + * + * If you're trying to change where the Camera is looking at in your game, then see + * the method `Camera.setScroll` instead. This method is for changing the viewport + * itself, not what the camera can see. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport + * @since 3.0.0 + * + * @param {number} x - The top-left x coordinate of the Camera viewport. + * @param {number} y - The top-left y coordinate of the Camera viewport. + * @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. + */ + setViewport: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Set the zoom value of the Camera. + * + * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. + * Changing to a larger value, such as 2, will cause the camera to 'zoom in'. + * + * A value of 1 means 'no zoom' and is the default. + * + * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom + * @since 3.0.0 + * + * @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. + */ + setZoom: function (value) + { + if (value === undefined) { value = 1; } + + if (value === 0) + { + value = 0.001; + } + + this.zoom = value; + + return this; + }, + + /** + * Sets the visibility of this Camera. + * + * An invisible Camera will skip rendering and input tests of everything it can see. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible + * @since 3.10.0 + * + * @param {boolean} value - The visible state of the Camera. + * + * @return {this} This Camera instance. + setVisible: function (value) + { + this.visible = value; + + return this; + }, + */ + + /** + * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON + * @since 3.0.0 + * + * @return {JSONCamera} A well-formed object suitable for conversion to JSON. + */ + toJSON: function () + { + var output = { + 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 + }; + + if (this.useBounds) + { + output['bounds'] = { + x: this._bounds.x, + y: this._bounds.y, + width: this._bounds.width, + height: this._bounds.height + }; + } + + return output; + }, + + /** + * Internal method called automatically by the Camera Manager. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#update + * @protected + * @since 3.0.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 () + { + // NOOP + }, + + /** + * Internal method called automatically when the viewport changes. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem + * @private + * @since 3.12.0 + */ + updateSystem: function () + { + if (!this.config) + { + return; + } + + var custom = false; + + if (this._x !== 0 || this._y !== 0) + { + custom = true; + } + else + { + var gameWidth = this.config.width; + var gameHeight = this.config.height; + + if (gameWidth !== this._width || gameHeight !== this._height) + { + custom = true; + } + } + + var sceneManager = this.sceneManager; + + if (custom && !this._customViewport) + { + // We need a custom viewport for this Camera + sceneManager.customViewports++; + } + else if (!custom && this._customViewport) + { + // We're turning off a custom viewport for this Camera + sceneManager.customViewports--; + } + + this.dirty = true; + this._customViewport = custom; + }, + + /** + * This event is fired when a camera is destroyed by the Camera Manager. + * + * @event CameraDestroyEvent + * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed. + */ + + /** + * Destroys this Camera instance. You rarely need to call this directly. + * + * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as + * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#destroy + * @fires CameraDestroyEvent + * @since 3.0.0 + */ + destroy: function () + { + this.emit('cameradestroy', this); + + this.removeAllListeners(); + + this.matrix.destroy(); + + this.culledObjects = []; + + if (this._customViewport) + { + // We're turning off a custom viewport for this Camera + this.sceneManager.customViewports--; + } + + this._bounds = null; + + this.scene = null; + this.config = null; + this.sceneManager = null; + }, + + /** + * The x position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollX` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#x + * @type {number} + * @since 3.0.0 + */ + x: { + + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + this._cx = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The y position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollY` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#y + * @type {number} + * @since 3.0.0 + */ + y: { + + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + this._cy = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The width of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#width + * @type {number} + * @since 3.0.0 + */ + width: { + + get: function () + { + return this._width; + }, + + set: function (value) + { + this._width = value; + this._cw = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The height of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#height + * @type {number} + * @since 3.0.0 + */ + height: { + + get: function () + { + return this._height; + }, + + set: function (value) + { + this._height = value; + this._ch = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The horizontal scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + scrollX: { + + get: function () + { + return this._scrollX; + }, + + set: function (value) + { + this._scrollX = value; + this.dirty = true; + } + + }, + + /** + * The vertical scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + scrollY: { + + get: function () + { + return this._scrollY; + }, + + set: function (value) + { + this._scrollY = value; + this.dirty = true; + } + + }, + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * + * A value of 0.5 would zoom the Camera out, so you can now see twice as much + * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel + * now takes up 2 pixels when rendered. + * + * Set to 1 to return to the default zoom level. + * + * Be careful to never set this value to zero. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#zoom + * @type {number} + * @default 1 + * @since 3.0.0 + */ + zoom: { + + get: function () + { + return this._zoom; + }, + + set: function (value) + { + this._zoom = value; + this.dirty = true; + } + + }, + + /** + * The rotation of the Camera in radians. + * + * 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. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#rotation + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + rotation: { + + get: function () + { + return this._rotation; + }, + + set: function (value) + { + this._rotation = value; + this.dirty = true; + } + + }, + + /** + * The x position of the center of the Camera's viewport, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#centerX + * @type {number} + * @readOnly + * @since 3.10.0 + */ + centerX: { + + get: function () + { + return this.x + (0.5 * this.width); + } + + }, + + /** + * The y position of the center of the Camera's viewport, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#centerY + * @type {number} + * @readOnly + * @since 3.10.0 + */ + centerY: { + + get: function () + { + return this.y + (0.5 * this.height); + } + + }, + + /** + * The displayed width of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width + * would be 1600, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a width of 800 and zoom of 2 would have a display width + * of 400 pixels. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth + * @type {number} + * @readOnly + * @since 3.11.0 + */ + displayWidth: { + + get: function () + { + return this.width / this.zoom; + } + + }, + + /** + * The displayed height of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height + * would be 1200, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a height of 600 and zoom of 2 would have a display height + * of 300 pixels. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight + * @type {number} + * @readOnly + * @since 3.11.0 + */ + displayHeight: { + + get: function () + { + return this.height / this.zoom; + } + + } + +}); + +module.exports = BaseCamera; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -15131,7 +16957,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(33); var GetPoint = __webpack_require__(301); var GetPoints = __webpack_require__(299); -var Random = __webpack_require__(164); +var Random = __webpack_require__(165); /** * @classdesc @@ -15481,7 +17307,7 @@ module.exports = Circle; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -15509,7 +17335,7 @@ module.exports = GetCenterY; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -15544,7 +17370,7 @@ module.exports = SetCenterY; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports) { /** @@ -15579,7 +17405,7 @@ module.exports = SetCenterX; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports) { /** @@ -15607,7 +17433,7 @@ module.exports = GetCenterX; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16426,7 +18252,7 @@ module.exports = List; /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17240,7 +19066,7 @@ module.exports = Frame; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17282,7 +19108,7 @@ module.exports = Merge; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports) { /** @@ -17320,7 +19146,7 @@ module.exports = Shuffle; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17331,8 +19157,8 @@ module.exports = Shuffle; var Class = __webpack_require__(0); var GetPoint = __webpack_require__(296); -var GetPoints = __webpack_require__(163); -var Random = __webpack_require__(162); +var GetPoints = __webpack_require__(164); +var Random = __webpack_require__(163); var Vector2 = __webpack_require__(4); /** @@ -17645,7 +19471,7 @@ module.exports = Line; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -17673,7 +19499,7 @@ module.exports = Perimeter; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports) { /** @@ -17826,7 +19652,7 @@ module.exports = TweenData; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17836,7 +19662,7 @@ module.exports = TweenData; */ var Class = __webpack_require__(0); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); var TWEEN_CONST = __webpack_require__(62); @@ -19221,7 +21047,7 @@ module.exports = Tween; /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -19264,7 +21090,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -19437,7 +21263,7 @@ module.exports = GetValueOp; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19484,7 +21310,7 @@ module.exports = GetTargets; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19686,7 +21512,7 @@ module.exports = MapData; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19906,7 +21732,7 @@ module.exports = LayerData; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -19937,8 +21763,8 @@ module.exports = IsInLayerBounds; /***/ }), -/* 107 */, -/* 108 */ +/* 108 */, +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19986,7 +21812,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports) { /** @@ -20027,7 +21853,7 @@ module.exports = GetURL; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -20504,7 +22330,7 @@ module.exports = KeyCodes; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20514,14 +22340,14 @@ module.exports = KeyCodes; */ var AddToDOM = __webpack_require__(85); -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); var GameObject = __webpack_require__(15); var GetTextSize = __webpack_require__(420); var GetValue = __webpack_require__(3); -var RemoveFromDOM = __webpack_require__(261); +var RemoveFromDOM = __webpack_require__(153); var TextRender = __webpack_require__(419); var TextStyle = __webpack_require__(416); @@ -21708,7 +23534,7 @@ module.exports = Text; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -21737,7 +23563,7 @@ module.exports = HasValue; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21746,12 +23572,12 @@ module.exports = HasValue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Actions = __webpack_require__(607); +var Actions = __webpack_require__(612); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(248); +var Range = __webpack_require__(250); var Set = __webpack_require__(70); var Sprite = __webpack_require__(35); @@ -22959,7 +24785,7 @@ module.exports = Group; /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23001,7 +24827,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23012,8 +24838,8 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Contains = __webpack_require__(55); -var GetPoint = __webpack_require__(186); -var GetPoints = __webpack_require__(185); +var GetPoint = __webpack_require__(187); +var GetPoints = __webpack_require__(186); var Random = __webpack_require__(136); /** @@ -23369,7 +25195,7 @@ module.exports = Ellipse; /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -23412,7 +25238,7 @@ module.exports = { /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23421,11 +25247,11 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(126); +var BaseCamera = __webpack_require__(88); var Class = __webpack_require__(0); -var Commands = __webpack_require__(116); -var Components = __webpack_require__(14); -var Ellipse = __webpack_require__(244); +var Commands = __webpack_require__(117); +var Components = __webpack_require__(13); +var Ellipse = __webpack_require__(246); var GameObject = __webpack_require__(15); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); @@ -24907,6 +26733,7 @@ var Graphics = new Class({ generateTexture: function (key, width, height) { var sys = this.scene.sys; + var renderer = sys.game.renderer; if (width === undefined) { width = sys.game.config.width; } if (height === undefined) { height = sys.game.config.height; } @@ -24952,11 +26779,12 @@ var Graphics = new Class({ if (ctx) { - this.renderCanvas(sys.game.renderer, this, 0.0, Graphics.TargetCamera, null, ctx); + // var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip) + this.renderCanvas(renderer, this, 0, Graphics.TargetCamera, null, ctx, false); - if (sys.game.renderer.gl && texture) + if (renderer.gl && texture) { - texture.source[0].glTexture = sys.game.renderer.canvasToTexture(ctx.canvas, texture.source[0].glTexture); + texture.source[0].glTexture = renderer.canvasToTexture(ctx.canvas, texture.source[0].glTexture); } } @@ -24984,13 +26812,13 @@ var Graphics = new Class({ * @type {Phaser.Cameras.Scene2D.Camera} * @since 3.1.0 */ -Graphics.TargetCamera = new Camera(0, 0, 0, 0); +Graphics.TargetCamera = new BaseCamera(); module.exports = Graphics; /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -25074,7 +26902,7 @@ module.exports = SetTransform; /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -25132,7 +26960,7 @@ module.exports = CheckMatrix; /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25142,8 +26970,8 @@ module.exports = CheckMatrix; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(94); -var TextureSource = __webpack_require__(190); +var Frame = __webpack_require__(95); +var TextureSource = __webpack_require__(191); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -25604,7 +27432,7 @@ module.exports = Texture; /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25615,11 +27443,11 @@ module.exports = Texture; var Class = __webpack_require__(0); var CONST = __webpack_require__(80); -var DefaultPlugins = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(124); var GetPhysicsPlugins = __webpack_require__(490); var GetScenePlugins = __webpack_require__(489); var NOOP = __webpack_require__(2); -var Settings = __webpack_require__(199); +var Settings = __webpack_require__(200); /** * @classdesc @@ -26287,7 +28115,7 @@ module.exports = Systems; /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26298,7 +28126,7 @@ module.exports = Systems; var OS = __webpack_require__(57); var Browser = __webpack_require__(81); -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Determines the features of the browser running this Phaser Game instance. @@ -26484,7 +28312,7 @@ module.exports = init(); /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -26513,6 +28341,7 @@ var DefaultPlugins = { */ Global: [ + 'game', 'anims', 'cache', 'facebook', @@ -26579,7 +28408,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -26609,7 +28438,7 @@ module.exports = Linear; /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26618,18 +28447,18 @@ module.exports = Linear; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Back = __webpack_require__(282); -var Bounce = __webpack_require__(281); -var Circular = __webpack_require__(280); -var Cubic = __webpack_require__(279); -var Elastic = __webpack_require__(278); -var Expo = __webpack_require__(277); -var Linear = __webpack_require__(276); -var Quadratic = __webpack_require__(275); -var Quartic = __webpack_require__(274); -var Quintic = __webpack_require__(273); -var Sine = __webpack_require__(272); -var Stepped = __webpack_require__(271); +var Back = __webpack_require__(283); +var Bounce = __webpack_require__(282); +var Circular = __webpack_require__(281); +var Cubic = __webpack_require__(280); +var Elastic = __webpack_require__(279); +var Expo = __webpack_require__(278); +var Linear = __webpack_require__(277); +var Quadratic = __webpack_require__(276); +var Quartic = __webpack_require__(275); +var Quintic = __webpack_require__(274); +var Sine = __webpack_require__(273); +var Stepped = __webpack_require__(272); // EaseMap module.exports = { @@ -26689,732 +28518,6 @@ module.exports = { }; -/***/ }), -/* 126 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BaseCamera = __webpack_require__(289); -var CenterOn = __webpack_require__(157); -var Clamp = __webpack_require__(20); -var Class = __webpack_require__(0); -var Effects = __webpack_require__(210); -var Linear = __webpack_require__(124); -var Rectangle = __webpack_require__(11); -var Vector2 = __webpack_require__(4); - -/** - * @classdesc - * A Camera. - * - * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, - * and can be positioned, rotated, zoomed and scrolled accordingly. - * - * A Camera consists of two elements: The viewport and the scroll values. - * - * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are - * created the same size as your game, but their position and size can be set to anything. This means if you - * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, - * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). - * - * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this - * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the - * viewport, and changing the viewport has no impact on the scrolling. - * - * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, - * allowing you to filter Game Objects out on a per-Camera basis. - * - * A Camera also has built-in special effects including Fade, Flash and Camera Shake. - * - * @class Camera - * @extends Phaser.Cameras.Scene2D.BaseCamera - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.0.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var Camera = new Class({ - - Extends: BaseCamera, - - initialize: - - function Camera (x, y, width, height) - { - BaseCamera.call(this, x, y, width, height); - - /** - * Does this Camera allow the Game Objects it renders to receive input events? - * - * @name Phaser.Cameras.Scene2D.Camera#inputEnabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.inputEnabled = true; - - /** - * The Camera Fade effect handler. - * To fade this camera see the `Camera.fade` methods. - * - * @name Phaser.Cameras.Scene2D.Camera#fadeEffect - * @type {Phaser.Cameras.Scene2D.Effects.Fade} - * @since 3.5.0 - */ - this.fadeEffect = new Effects.Fade(this); - - /** - * The Camera Flash effect handler. - * To flash this camera see the `Camera.flash` method. - * - * @name Phaser.Cameras.Scene2D.Camera#flashEffect - * @type {Phaser.Cameras.Scene2D.Effects.Flash} - * @since 3.5.0 - */ - this.flashEffect = new Effects.Flash(this); - - /** - * The Camera Shake effect handler. - * To shake this camera see the `Camera.shake` method. - * - * @name Phaser.Cameras.Scene2D.Camera#shakeEffect - * @type {Phaser.Cameras.Scene2D.Effects.Shake} - * @since 3.5.0 - */ - this.shakeEffect = new Effects.Shake(this); - - /** - * The Camera Pan effect handler. - * To pan this camera see the `Camera.pan` method. - * - * @name Phaser.Cameras.Scene2D.Camera#panEffect - * @type {Phaser.Cameras.Scene2D.Effects.Pan} - * @since 3.11.0 - */ - this.panEffect = new Effects.Pan(this); - - /** - * The Camera Zoom effect handler. - * To zoom this camera see the `Camera.zoom` method. - * - * @name Phaser.Cameras.Scene2D.Camera#zoomEffect - * @type {Phaser.Cameras.Scene2D.Effects.Zoom} - * @since 3.11.0 - */ - this.zoomEffect = new Effects.Zoom(this); - - /** - * The linear interpolation value to use when following a target. - * - * Can also be set via `setLerp` or as part of the `startFollow` call. - * - * The default values of 1 means the camera will instantly snap to the target coordinates. - * A lower value, such as 0.1 means the camera will more slowly track the target, giving - * a smooth transition. You can set the horizontal and vertical values independently, and also - * adjust this value in real-time during your game. - * - * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. - * - * @name Phaser.Cameras.Scene2D.Camera#lerp - * @type {Phaser.Math.Vector2} - * @since 3.9.0 - */ - this.lerp = new Vector2(1, 1); - - /** - * The values stored in this property are subtracted from the Camera targets position, allowing you to - * offset the camera from the actual target x/y coordinates by this amount. - * Can also be set via `setFollowOffset` or as part of the `startFollow` call. - * - * @name Phaser.Cameras.Scene2D.Camera#followOffset - * @type {Phaser.Math.Vector2} - * @since 3.9.0 - */ - this.followOffset = new Vector2(); - - /** - * The Camera dead zone. - * - * The deadzone is only used when the camera is following a target. - * - * It defines a rectangular region within which if the target is present, the camera will not scroll. - * If the target moves outside of this area, the camera will begin scrolling in order to follow it. - * - * The `lerp` values that you can set for a follower target also apply when using a deadzone. - * - * You can directly set this property to be an instance of a Rectangle. Or, you can use the - * `setDeadzone` method for a chainable approach. - * - * The rectangle you provide can have its dimensions adjusted dynamically, however, please - * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point. - * - * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property - * to `null`. - * - * @name Phaser.Cameras.Scene2D.Camera#deadzone - * @type {?Phaser.Geom.Rectangle} - * @since 3.11.0 - */ - this.deadzone = null; - - /** - * Internal follow target reference. - * - * @name Phaser.Cameras.Scene2D.Camera#_follow - * @type {?any} - * @private - * @default null - * @since 3.0.0 - */ - this._follow = null; - }, - - /** - * Sets the Camera dead zone. - * - * The deadzone is only used when the camera is following a target. - * - * It defines a rectangular region within which if the target is present, the camera will not scroll. - * If the target moves outside of this area, the camera will begin scrolling in order to follow it. - * - * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point - * of the camera. This allows you to use the object for additional game related checks, such as - * testing if an object is within it or not via a Rectangle.contains call. - * - * The `lerp` values that you can set for a follower target also apply when using a deadzone. - * - * Calling this method with no arguments will reset an active deadzone. - * - * @method Phaser.Cameras.Scene2D.Camera#setDeadzone - * @since 3.11.0 - * - * @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. - */ - setDeadzone: function (width, height) - { - if (width === undefined) - { - this.deadzone = null; - } - else - { - if (this.deadzone) - { - this.deadzone.width = width; - this.deadzone.height = height; - } - else - { - this.deadzone = new Rectangle(0, 0, width, height); - } - - if (this._follow) - { - var originX = this.width / 2; - var originY = this.height / 2; - - var fx = this._follow.x - this.followOffset.x; - var fy = this._follow.y - this.followOffset.y; - - this.midPoint.set(fx, fy); - - this.scrollX = fx - originX; - this.scrollY = fy - originY; - } - - CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y); - } - - return this; - }, - - /** - * Fades the Camera in from the given color over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeIn - * @since 3.3.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeIn: function (duration, red, green, blue, callback, context) - { - return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context); - }, - - /** - * Fades the Camera out to the given color over the duration specified. - * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeOut - * @since 3.3.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeOut: function (duration, red, green, blue, callback, context) - { - return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context); - }, - - /** - * Fades the Camera from the given color to transparent over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeFrom - * @since 3.5.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeFrom: function (duration, red, green, blue, force, callback, context) - { - return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context); - }, - - /** - * Fades the Camera from transparent to the given color over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fade - * @since 3.0.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fade: function (duration, red, green, blue, force, callback, context) - { - return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context); - }, - - /** - * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#flash - * @since 3.0.0 - * - * @param {integer} [duration=250] - The duration of the effect in milliseconds. - * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - flash: function (duration, red, green, blue, force, callback, context) - { - return this.flashEffect.start(duration, red, green, blue, force, callback, context); - }, - - /** - * Shakes the Camera by the given intensity over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#shake - * @since 3.0.0 - * - * @param {integer} [duration=100] - The duration of the effect in milliseconds. - * @param {number} [intensity=0.05] - The intensity of the shake. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - shake: function (duration, intensity, force, callback, context) - { - return this.shakeEffect.start(duration, intensity, force, callback, context); - }, - - /** - * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, - * over the duration and with the ease specified. - * - * @method Phaser.Cameras.Scene2D.Camera#pan - * @since 3.11.0 - * - * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to. - * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to. - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {CameraPanCallback} [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} 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 zoom the Camera to the given scale, over the duration and with the ease specified. - * - * @method Phaser.Cameras.Scene2D.Camera#zoomTo - * @since 3.11.0 - * - * @param {number} zoom - The target Camera zoom value. - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {CameraPanCallback} [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} This Camera instance. - */ - zoomTo: function (zoom, duration, ease, force, callback, context) - { - return this.zoomEffect.start(zoom, duration, ease, force, callback, context); - }, - - /** - * Internal preRender step. - * - * @method Phaser.Cameras.Scene2D.Camera#preRender - * @protected - * @since 3.0.0 - * - * @param {number} baseScale - The base scale, as set in the Camera Manager. - * @param {number} resolution - The game resolution. - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - - var halfWidth = width * 0.5; - var halfHeight = height * 0.5; - - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - - var originX = width * this.originX; - var originY = height * this.originY; - - var follow = this._follow; - var deadzone = this.deadzone; - - var sx = this.scrollX; - var sy = this.scrollY; - - if (deadzone) - { - CenterOn(deadzone, this.midPoint.x, this.midPoint.y); - } - - if (follow) - { - var fx = (follow.x - this.followOffset.x); - var fy = (follow.y - this.followOffset.y); - - if (deadzone) - { - if (fx < deadzone.x) - { - sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x); - } - else if (fx > deadzone.right) - { - sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x); - } - - if (fy < deadzone.y) - { - sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y); - } - else if (fy > deadzone.bottom) - { - sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y); - } - } - else - { - sx = Linear(sx, fx - originX, this.lerp.x); - sy = Linear(sy, fy - originY, this.lerp.y); - } - } - - if (this.useBounds) - { - sx = this.clampX(sx); - sy = this.clampY(sy); - } - - if (this.roundPixels) - { - originX = Math.round(originX); - originY = Math.round(originY); - } - - // Values are in pixels and not impacted by zooming the Camera - this.scrollX = sx; - this.scrollY = sy; - - var midX = sx + halfWidth; - var midY = sy + halfHeight; - - // The center of the camera, in world space, so taking zoom into account - // Basically the pixel value of what it's looking at in the middle of the cam - this.midPoint.set(midX, midY); - - var displayWidth = width / zoom; - var displayHeight = height / zoom; - - this.worldView.setTo( - midX - (displayWidth / 2), - midY - (displayHeight / 2), - displayWidth, - displayHeight - ); - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - - this.shakeEffect.preRender(); - }, - - /** - * Sets the linear interpolation value to use when following a target. - * - * The default values of 1 means the camera will instantly snap to the target coordinates. - * A lower value, such as 0.1 means the camera will more slowly track the target, giving - * a smooth transition. You can set the horizontal and vertical values independently, and also - * adjust this value in real-time during your game. - * - * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. - * - * @method Phaser.Cameras.Scene2D.Camera#setLerp - * @since 3.9.0 - * - * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target. - * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target. - * - * @return {this} This Camera instance. - */ - setLerp: function (x, y) - { - if (x === undefined) { x = 1; } - if (y === undefined) { y = x; } - - this.lerp.set(x, y); - - return this; - }, - - /** - * Sets the horizontal and vertical offset of the camera from its follow target. - * The values are subtracted from the targets position during the Cameras update step. - * - * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset - * @since 3.9.0 - * - * @param {number} [x=0] - The horizontal offset from the camera follow target.x position. - * @param {number} [y=0] - The vertical offset from the camera follow target.y position. - * - * @return {this} This Camera instance. - */ - setFollowOffset: function (x, y) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - - this.followOffset.set(x, y); - - return this; - }, - - /** - * Sets the Camera to follow a Game Object. - * - * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object - * in its center. - * - * You can set the linear interpolation value used in the follow code. - * Use low lerp values (such as 0.1) to automatically smooth the camera motion. - * - * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel - * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to - * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom - * value on the camera. So be sure to keep the camera zoom to integers. - * - * @method Phaser.Cameras.Scene2D.Camera#startFollow - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow. - * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering? - * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. - * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. - * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position. - * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position. - * - * @return {this} This Camera instance. - */ - startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY) - { - if (roundPixels === undefined) { roundPixels = false; } - if (lerpX === undefined) { lerpX = 1; } - if (lerpY === undefined) { lerpY = lerpX; } - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = offsetX; } - - this._follow = target; - - this.roundPixels = roundPixels; - - lerpX = Clamp(lerpX, 0, 1); - lerpY = Clamp(lerpY, 0, 1); - - this.lerp.set(lerpX, lerpY); - - this.followOffset.set(offsetX, offsetY); - - var originX = this.width / 2; - var originY = this.height / 2; - - var fx = target.x - offsetX; - var fy = target.y - offsetY; - - this.midPoint.set(fx, fy); - - this.scrollX = fx - originX; - this.scrollY = fy - originY; - - return this; - }, - - /** - * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`. - * - * @method Phaser.Cameras.Scene2D.Camera#stopFollow - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - stopFollow: function () - { - this._follow = null; - - return this; - }, - - /** - * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to - * remove the fade. - * - * @method Phaser.Cameras.Scene2D.Camera#resetFX - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - resetFX: function () - { - this.panEffect.reset(); - this.shakeEffect.reset(); - this.flashEffect.reset(); - this.fadeEffect.reset(); - - return this; - }, - - /** - * Internal method called automatically by the Camera Manager. - * - * @method Phaser.Cameras.Scene2D.Camera#update - * @protected - * @since 3.0.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.visible) - { - this.panEffect.update(time, delta); - this.zoomEffect.update(time, delta); - this.shakeEffect.update(time, delta); - this.flashEffect.update(time, delta); - this.fadeEffect.update(time, delta); - } - }, - - /** - * Destroys this Camera instance. You rarely need to call this directly. - * - * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as - * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. - * - * @method Phaser.Cameras.Scene2D.Camera#destroy - * @fires CameraDestroyEvent - * @since 3.0.0 - */ - destroy: function () - { - BaseCamera.prototype.destroy.call(this); - - this.resetFX(); - - this._follow = null; - this.deadzone = null; - } - -}); - -module.exports = Camera; - - /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { @@ -27888,12 +28991,12 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(253); +var Earcut = __webpack_require__(255); var GetFastValue = __webpack_require__(1); -var ModelViewProjection = __webpack_require__(499); -var ShaderSourceFS = __webpack_require__(498); -var ShaderSourceVS = __webpack_require__(497); -var TransformMatrix = __webpack_require__(32); +var ModelViewProjection = __webpack_require__(500); +var ShaderSourceFS = __webpack_require__(499); +var ShaderSourceVS = __webpack_require__(498); +var TransformMatrix = __webpack_require__(27); var Utils = __webpack_require__(21); var WebGLPipeline = __webpack_require__(132); @@ -29683,6 +30786,7 @@ var WebGLPipeline = new Class({ setFloat1: function (name, x) { this.renderer.setFloat1(this.program, name, x); + return this; }, @@ -29700,8 +30804,8 @@ var WebGLPipeline = new Class({ */ setFloat2: function (name, x, y) { - this.renderer.setFloat2(this.program, name, x, y); + return this; }, @@ -29720,8 +30824,8 @@ var WebGLPipeline = new Class({ */ setFloat3: function (name, x, y, z) { - this.renderer.setFloat3(this.program, name, x, y, z); + return this; }, @@ -29741,8 +30845,8 @@ var WebGLPipeline = new Class({ */ setFloat4: function (name, x, y, z, w) { - this.renderer.setFloat4(this.program, name, x, y, z, w); + return this; }, @@ -29760,6 +30864,7 @@ var WebGLPipeline = new Class({ setInt1: function (name, x) { this.renderer.setInt1(this.program, name, x); + return this; }, @@ -29778,6 +30883,7 @@ var WebGLPipeline = new Class({ setInt2: function (name, x, y) { this.renderer.setInt2(this.program, name, x, y); + return this; }, @@ -29797,6 +30903,7 @@ var WebGLPipeline = new Class({ setInt3: function (name, x, y, z) { this.renderer.setInt3(this.program, name, x, y, z); + return this; }, @@ -29817,6 +30924,7 @@ var WebGLPipeline = new Class({ setInt4: function (name, x, y, z, w) { this.renderer.setInt4(this.program, name, x, y, z, w); + return this; }, @@ -29836,6 +30944,7 @@ var WebGLPipeline = new Class({ setMatrix2: function (name, transpose, matrix) { this.renderer.setMatrix2(this.program, name, transpose, matrix); + return this; }, @@ -29856,6 +30965,7 @@ var WebGLPipeline = new Class({ setMatrix3: function (name, transpose, matrix) { this.renderer.setMatrix3(this.program, name, transpose, matrix); + return this; }, @@ -29874,6 +30984,7 @@ var WebGLPipeline = new Class({ setMatrix4: function (name, transpose, matrix) { this.renderer.setMatrix4(this.program, name, transpose, matrix); + return this; } @@ -30024,10 +31135,10 @@ module.exports = Smoothing(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HexStringToColor = __webpack_require__(288); -var IntegerToColor = __webpack_require__(286); -var ObjectToColor = __webpack_require__(284); -var RGBStringToColor = __webpack_require__(283); +var HexStringToColor = __webpack_require__(289); +var IntegerToColor = __webpack_require__(287); +var ObjectToColor = __webpack_require__(285); +var RGBStringToColor = __webpack_require__(284); /** * Converts the given source color value into an instance of a Color class. @@ -30197,7 +31308,7 @@ module.exports = Random; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); var Point = __webpack_require__(5); /** @@ -30807,7 +31918,7 @@ module.exports = TileToWorldX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var IsInLayerBounds = __webpack_require__(106); +var IsInLayerBounds = __webpack_require__(107); /** * Gets a tile at the given tile coordinates from the given layer. @@ -30870,47 +31981,47 @@ module.exports = GetTileAt; module.exports = { - CalculateFacesAt: __webpack_require__(226), + CalculateFacesAt: __webpack_require__(228), CalculateFacesWithin: __webpack_require__(41), - Copy: __webpack_require__(674), - CreateFromTiles: __webpack_require__(673), - CullTiles: __webpack_require__(672), - Fill: __webpack_require__(671), - FilterTiles: __webpack_require__(670), - FindByIndex: __webpack_require__(669), - FindTile: __webpack_require__(668), - ForEachTile: __webpack_require__(667), + Copy: __webpack_require__(679), + CreateFromTiles: __webpack_require__(678), + CullTiles: __webpack_require__(677), + Fill: __webpack_require__(676), + FilterTiles: __webpack_require__(675), + FindByIndex: __webpack_require__(674), + FindTile: __webpack_require__(673), + ForEachTile: __webpack_require__(672), GetTileAt: __webpack_require__(142), - GetTileAtWorldXY: __webpack_require__(666), - GetTilesWithin: __webpack_require__(23), - GetTilesWithinShape: __webpack_require__(665), - GetTilesWithinWorldXY: __webpack_require__(664), + GetTileAtWorldXY: __webpack_require__(671), + GetTilesWithin: __webpack_require__(24), + GetTilesWithinShape: __webpack_require__(670), + GetTilesWithinWorldXY: __webpack_require__(669), HasTileAt: __webpack_require__(325), - HasTileAtWorldXY: __webpack_require__(663), - IsInLayerBounds: __webpack_require__(106), - PutTileAt: __webpack_require__(225), - PutTileAtWorldXY: __webpack_require__(662), - PutTilesAt: __webpack_require__(661), - Randomize: __webpack_require__(660), + HasTileAtWorldXY: __webpack_require__(668), + IsInLayerBounds: __webpack_require__(107), + PutTileAt: __webpack_require__(227), + PutTileAtWorldXY: __webpack_require__(667), + PutTilesAt: __webpack_require__(666), + Randomize: __webpack_require__(665), RemoveTileAt: __webpack_require__(324), - RemoveTileAtWorldXY: __webpack_require__(659), - RenderDebug: __webpack_require__(658), + RemoveTileAtWorldXY: __webpack_require__(664), + RenderDebug: __webpack_require__(663), ReplaceByIndex: __webpack_require__(326), - SetCollision: __webpack_require__(657), - SetCollisionBetween: __webpack_require__(656), - SetCollisionByExclusion: __webpack_require__(655), - SetCollisionByProperty: __webpack_require__(654), - SetCollisionFromCollisionGroup: __webpack_require__(653), - SetTileIndexCallback: __webpack_require__(652), - SetTileLocationCallback: __webpack_require__(651), - Shuffle: __webpack_require__(650), - SwapByIndex: __webpack_require__(649), + SetCollision: __webpack_require__(662), + SetCollisionBetween: __webpack_require__(661), + SetCollisionByExclusion: __webpack_require__(660), + SetCollisionByProperty: __webpack_require__(659), + SetCollisionFromCollisionGroup: __webpack_require__(658), + SetTileIndexCallback: __webpack_require__(657), + SetTileLocationCallback: __webpack_require__(656), + Shuffle: __webpack_require__(655), + SwapByIndex: __webpack_require__(654), TileToWorldX: __webpack_require__(141), - TileToWorldXY: __webpack_require__(648), + TileToWorldXY: __webpack_require__(653), TileToWorldY: __webpack_require__(140), - WeightedRandomize: __webpack_require__(647), + WeightedRandomize: __webpack_require__(652), WorldToTileX: __webpack_require__(54), - WorldToTileXY: __webpack_require__(646), + WorldToTileXY: __webpack_require__(651), WorldToTileY: __webpack_require__(53) }; @@ -31038,7 +32149,7 @@ var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(262); +var ParseXML = __webpack_require__(263); /** * @typedef {object} Phaser.Loader.FileTypes.XMLFileConfig @@ -31347,9 +32458,9 @@ module.exports = LineToLine; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); -var MeshRender = __webpack_require__(868); +var MeshRender = __webpack_require__(873); /** * @classdesc @@ -31519,11 +32630,11 @@ module.exports = Mesh; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); -var GetBitmapTextSize = __webpack_require__(922); -var ParseFromAtlas = __webpack_require__(921); -var Render = __webpack_require__(920); +var GetBitmapTextSize = __webpack_require__(927); +var ParseFromAtlas = __webpack_require__(926); +var Render = __webpack_require__(925); /** * The font data for an individual character of a Bitmap Font. @@ -32199,7 +33310,7 @@ module.exports = { CountAllMatching: __webpack_require__(465), Each: __webpack_require__(464), EachInRange: __webpack_require__(463), - FindClosestInSorted: __webpack_require__(215), + FindClosestInSorted: __webpack_require__(217), GetAll: __webpack_require__(462), GetFirst: __webpack_require__(461), GetRandom: __webpack_require__(150), @@ -32208,19 +33319,19 @@ module.exports = { MoveUp: __webpack_require__(458), NumberArray: __webpack_require__(457), NumberArrayStep: __webpack_require__(456), - QuickSelect: __webpack_require__(187), - Range: __webpack_require__(248), - Remove: __webpack_require__(202), + QuickSelect: __webpack_require__(188), + Range: __webpack_require__(250), + Remove: __webpack_require__(203), RemoveAt: __webpack_require__(455), RemoveBetween: __webpack_require__(454), RemoveRandomElement: __webpack_require__(453), Replace: __webpack_require__(452), RotateLeft: __webpack_require__(293), RotateRight: __webpack_require__(292), - SafeRange: __webpack_require__(29), + SafeRange: __webpack_require__(30), SendToBack: __webpack_require__(451), SetAll: __webpack_require__(450), - Shuffle: __webpack_require__(96), + Shuffle: __webpack_require__(97), SpliceOne: __webpack_require__(56), StableSort: __webpack_require__(83), Swap: __webpack_require__(449) @@ -32240,7 +33351,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(500); +var ShaderSourceFS = __webpack_require__(501); var TextureTintPipeline = __webpack_require__(131); var LIGHT_COUNT = 10; @@ -32827,6 +33938,35 @@ module.exports = ForwardDiffuseLightPipeline; /* 153 */ /***/ (function(module, exports) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Attempts to remove the element from its parentNode in the DOM. + * + * @function Phaser.DOM.RemoveFromDOM + * @since 3.0.0 + * + * @param {HTMLElement} element - The DOM element to remove from its parent node. + */ +var RemoveFromDOM = function (element) +{ + if (element.parentNode) + { + element.parentNode.removeChild(element); + } +}; + +module.exports = RemoveFromDOM; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -32853,7 +33993,7 @@ module.exports = Between; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32883,7 +34023,7 @@ module.exports = RadToDeg; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33428,7 +34568,7 @@ module.exports = Vector4; /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33441,7 +34581,7 @@ var Class = __webpack_require__(0); var GameObject = __webpack_require__(15); var Sprite = __webpack_require__(35); var Vector2 = __webpack_require__(4); -var Vector4 = __webpack_require__(155); +var Vector4 = __webpack_require__(156); /** * @classdesc @@ -33694,7 +34834,7 @@ module.exports = Sprite3D; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -33731,7 +34871,7 @@ module.exports = CenterOn; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -33761,7 +34901,7 @@ module.exports = GetColor; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -33808,7 +34948,7 @@ module.exports = SmoothStep; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33864,7 +35004,7 @@ module.exports = Random; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33902,7 +35042,7 @@ module.exports = Random; /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33942,7 +35082,7 @@ module.exports = Random; /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34007,7 +35147,7 @@ module.exports = GetPoints; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34051,7 +35191,7 @@ module.exports = Random; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34061,13 +35201,13 @@ module.exports = Random; */ var BlendModes = __webpack_require__(52); -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); /** * @classdesc @@ -34354,7 +35494,7 @@ module.exports = Zone; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35223,7 +36363,7 @@ module.exports = Timeline; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35233,15 +36373,15 @@ module.exports = Timeline; */ var Clone = __webpack_require__(34); -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); -var GetTargets = __webpack_require__(103); -var GetTweens = __webpack_require__(169); +var GetTargets = __webpack_require__(104); +var GetTweens = __webpack_require__(170); var GetValue = __webpack_require__(3); -var Timeline = __webpack_require__(166); +var Timeline = __webpack_require__(167); var TweenBuilder = __webpack_require__(72); /** @@ -35375,7 +36515,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35384,15 +36524,15 @@ module.exports = TimelineBuilder; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); var GetValue = __webpack_require__(3); -var GetValueOp = __webpack_require__(102); -var Tween = __webpack_require__(100); -var TweenData = __webpack_require__(99); +var GetValueOp = __webpack_require__(103); +var Tween = __webpack_require__(101); +var TweenData = __webpack_require__(100); /** * [description] @@ -35503,7 +36643,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35549,7 +36689,7 @@ module.exports = GetTweens; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35607,7 +36747,7 @@ module.exports = GetProps; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35924,7 +37064,7 @@ module.exports = TimerEvent; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36105,8 +37245,8 @@ module.exports = BasePlugin; /***/ }), -/* 173 */, -/* 174 */ +/* 174 */, +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36118,7 +37258,7 @@ module.exports = BasePlugin; var Class = __webpack_require__(0); var File = __webpack_require__(19); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(109); +var GetURL = __webpack_require__(110); var IsPlainObject = __webpack_require__(7); /** @@ -36302,7 +37442,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36312,11 +37452,11 @@ module.exports = HTML5AudioFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(174); +var HTML5AudioFile = __webpack_require__(175); var IsPlainObject = __webpack_require__(7); /** @@ -36582,7 +37722,7 @@ module.exports = AudioFile; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36591,7 +37731,7 @@ module.exports = AudioFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MergeXHRSettings = __webpack_require__(108); +var MergeXHRSettings = __webpack_require__(109); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -36650,7 +37790,7 @@ module.exports = XHRLoader; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36955,7 +38095,7 @@ module.exports = KeyCombo; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37189,7 +38329,7 @@ module.exports = Key; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37198,8 +38338,8 @@ module.exports = Key; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Axis = __webpack_require__(181); -var Button = __webpack_require__(180); +var Axis = __webpack_require__(182); +var Button = __webpack_require__(181); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var Vector2 = __webpack_require__(4); @@ -37947,7 +39087,7 @@ module.exports = Gamepad; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38088,7 +39228,7 @@ module.exports = Button; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38213,7 +39353,7 @@ module.exports = Axis; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -38309,7 +39449,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38318,8 +39458,8 @@ module.exports = CreateInteractiveObject; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(116); -var SetTransform = __webpack_require__(118); +var Commands = __webpack_require__(117); +var SetTransform = __webpack_require__(119); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -38555,7 +39695,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -38587,7 +39727,7 @@ module.exports = Circumference; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38596,8 +39736,8 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(184); -var CircumferencePoint = __webpack_require__(114); +var Circumference = __webpack_require__(185); +var CircumferencePoint = __webpack_require__(115); var FromPercent = __webpack_require__(65); var MATH_CONST = __webpack_require__(16); @@ -38641,7 +39781,7 @@ module.exports = GetPoints; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38650,7 +39790,7 @@ module.exports = GetPoints; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CircumferencePoint = __webpack_require__(114); +var CircumferencePoint = __webpack_require__(115); var FromPercent = __webpack_require__(65); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -38684,7 +39824,7 @@ module.exports = GetPoint; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -38802,7 +39942,7 @@ module.exports = QuickSelect; /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -38848,7 +39988,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38876,7 +40016,7 @@ module.exports = { /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38885,7 +40025,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); var IsSizePowerOfTwo = __webpack_require__(84); var ScaleModes = __webpack_require__(60); @@ -39150,7 +40290,7 @@ module.exports = TextureSource; /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39159,16 +40299,16 @@ module.exports = TextureSource; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var CanvasTexture = __webpack_require__(487); var Class = __webpack_require__(0); -var Color = __webpack_require__(30); -var CONST = __webpack_require__(22); +var Color = __webpack_require__(31); +var CONST = __webpack_require__(23); var EventEmitter = __webpack_require__(8); -var GenerateTexture = __webpack_require__(268); +var GenerateTexture = __webpack_require__(269); var GetValue = __webpack_require__(3); -var Parser = __webpack_require__(189); -var Texture = __webpack_require__(120); +var Parser = __webpack_require__(190); +var Texture = __webpack_require__(121); /** * @callback EachTextureCallback @@ -39383,6 +40523,8 @@ var TextureManager = new Class({ * * @param {string} key - The unique string-based key of the Texture. * @param {*} data - The Base64 encoded data. + * + * @return {this} This Texture Manager instance. */ addBase64: function (key, data) { @@ -39410,6 +40552,8 @@ var TextureManager = new Class({ image.src = data; } + + return this; }, /** @@ -40257,7 +41401,7 @@ module.exports = TextureManager; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41224,7 +42368,7 @@ module.exports = WebAudioSound; /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41236,7 +42380,7 @@ module.exports = WebAudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); -var WebAudioSound = __webpack_require__(192); +var WebAudioSound = __webpack_require__(193); /** * @classdesc @@ -41551,7 +42695,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41678,7 +42822,7 @@ module.exports = NoAudioSound; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41691,7 +42835,7 @@ module.exports = NoAudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); -var NoAudioSound = __webpack_require__(194); +var NoAudioSound = __webpack_require__(195); var NOOP = __webpack_require__(2); /** @@ -41796,7 +42940,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42778,7 +43922,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 197 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42790,7 +43934,7 @@ module.exports = HTML5AudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); -var HTML5AudioSound = __webpack_require__(196); +var HTML5AudioSound = __webpack_require__(197); /** * HTML5 Audio implementation of the Sound Manager. @@ -43245,7 +44389,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 198 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43255,9 +44399,9 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(197); -var NoAudioSoundManager = __webpack_require__(195); -var WebAudioSoundManager = __webpack_require__(193); +var HTML5AudioSoundManager = __webpack_require__(198); +var NoAudioSoundManager = __webpack_require__(196); +var WebAudioSoundManager = __webpack_require__(194); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -43295,7 +44439,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 199 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43306,7 +44450,7 @@ module.exports = SoundManagerCreator; var CONST = __webpack_require__(80); var GetValue = __webpack_require__(3); -var Merge = __webpack_require__(95); +var Merge = __webpack_require__(96); var InjectionMap = __webpack_require__(488); /** @@ -43427,7 +44571,7 @@ module.exports = Settings; /***/ }), -/* 200 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43437,7 +44581,7 @@ module.exports = Settings; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(121); +var Systems = __webpack_require__(122); /** * @classdesc @@ -43706,7 +44850,7 @@ module.exports = Scene; /***/ }), -/* 201 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43719,8 +44863,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(80); var GetValue = __webpack_require__(3); var NOOP = __webpack_require__(2); -var Scene = __webpack_require__(200); -var Systems = __webpack_require__(121); +var Scene = __webpack_require__(201); +var Systems = __webpack_require__(122); /** * @classdesc @@ -45278,7 +46422,7 @@ module.exports = SceneManager; /***/ }), -/* 202 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45369,7 +46513,7 @@ module.exports = Remove; /***/ }), -/* 203 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45381,11 +46525,11 @@ module.exports = Remove; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var FileTypesManager = __webpack_require__(6); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); var GetFastValue = __webpack_require__(1); var PluginCache = __webpack_require__(10); -var Remove = __webpack_require__(202); +var Remove = __webpack_require__(203); /** * @typedef {object} GlobalPlugin @@ -45615,6 +46759,10 @@ var PluginManager = new Class({ scene[map[pluginKey]] = sys[pluginKey]; } } + else if (pluginKey === 'game' && map.hasOwnProperty(pluginKey)) + { + scene[map[pluginKey]] = game; + } } for (var s = 0; s < scenePlugins.length; s++) @@ -46220,7 +47368,7 @@ module.exports = PluginManager; /***/ }), -/* 204 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46461,7 +47609,7 @@ module.exports = TouchManager; /***/ }), -/* 205 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46471,7 +47619,7 @@ module.exports = TouchManager; */ var Class = __webpack_require__(0); -var SmoothStepInterpolation = __webpack_require__(252); +var SmoothStepInterpolation = __webpack_require__(254); var Vector2 = __webpack_require__(4); @@ -47244,7 +48392,7 @@ module.exports = Pointer; /***/ }), -/* 206 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47254,7 +48402,7 @@ module.exports = Pointer; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(122); +var Features = __webpack_require__(123); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md @@ -47599,7 +48747,7 @@ module.exports = MouseManager; /***/ }), -/* 207 */ +/* 208 */ /***/ (function(module, exports) { /** @@ -47679,7 +48827,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 208 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47689,14 +48837,14 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(207); +var CONST = __webpack_require__(208); var EventEmitter = __webpack_require__(8); -var Mouse = __webpack_require__(206); -var Pointer = __webpack_require__(205); +var Mouse = __webpack_require__(207); +var Pointer = __webpack_require__(206); var Rectangle = __webpack_require__(11); -var Touch = __webpack_require__(204); -var TransformMatrix = __webpack_require__(32); -var TransformXY = __webpack_require__(251); +var Touch = __webpack_require__(205); +var TransformMatrix = __webpack_require__(27); +var TransformXY = __webpack_require__(253); /** * @classdesc @@ -49066,7 +50214,7 @@ module.exports = InputManager; /***/ }), -/* 209 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49075,7 +50223,7 @@ module.exports = InputManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Determines the canvas features of the browser running this Phaser Game instance. @@ -49180,7 +50328,7 @@ module.exports = init(); /***/ }), -/* 210 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49195,17 +50343,17 @@ module.exports = init(); module.exports = { - Fade: __webpack_require__(572), - Flash: __webpack_require__(571), - Pan: __webpack_require__(570), - Shake: __webpack_require__(537), - Zoom: __webpack_require__(536) + Fade: __webpack_require__(577), + Flash: __webpack_require__(576), + Pan: __webpack_require__(575), + Shake: __webpack_require__(542), + Zoom: __webpack_require__(541) }; /***/ }), -/* 211 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49214,7 +50362,824 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BaseCache = __webpack_require__(212); +var BaseCamera = __webpack_require__(88); +var CanvasPool = __webpack_require__(22); +var CenterOn = __webpack_require__(158); +var Clamp = __webpack_require__(20); +var Class = __webpack_require__(0); +var Components = __webpack_require__(13); +var Effects = __webpack_require__(211); +var Linear = __webpack_require__(125); +var Rectangle = __webpack_require__(11); +var Vector2 = __webpack_require__(4); + +/** + * @classdesc + * A Camera. + * + * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, + * and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. + * + * A Camera also has built-in special effects including Fade, Flash and Camera Shake. + * + * @class Camera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.0.0 + * + * @extends Phaser.Cameras.Scene2D.BaseCamera + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.Tint + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var Camera = new Class({ + + Extends: BaseCamera, + + Mixins: [ + Components.Flip, + Components.Tint + ], + + initialize: + + function Camera (x, y, width, height) + { + BaseCamera.call(this, x, y, width, height); + + /** + * Does this Camera allow the Game Objects it renders to receive input events? + * + * @name Phaser.Cameras.Scene2D.Camera#inputEnabled + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.inputEnabled = true; + + /** + * The Camera Fade effect handler. + * To fade this camera see the `Camera.fade` methods. + * + * @name Phaser.Cameras.Scene2D.Camera#fadeEffect + * @type {Phaser.Cameras.Scene2D.Effects.Fade} + * @since 3.5.0 + */ + this.fadeEffect = new Effects.Fade(this); + + /** + * The Camera Flash effect handler. + * To flash this camera see the `Camera.flash` method. + * + * @name Phaser.Cameras.Scene2D.Camera#flashEffect + * @type {Phaser.Cameras.Scene2D.Effects.Flash} + * @since 3.5.0 + */ + this.flashEffect = new Effects.Flash(this); + + /** + * The Camera Shake effect handler. + * To shake this camera see the `Camera.shake` method. + * + * @name Phaser.Cameras.Scene2D.Camera#shakeEffect + * @type {Phaser.Cameras.Scene2D.Effects.Shake} + * @since 3.5.0 + */ + this.shakeEffect = new Effects.Shake(this); + + /** + * The Camera Pan effect handler. + * To pan this camera see the `Camera.pan` method. + * + * @name Phaser.Cameras.Scene2D.Camera#panEffect + * @type {Phaser.Cameras.Scene2D.Effects.Pan} + * @since 3.11.0 + */ + this.panEffect = new Effects.Pan(this); + + /** + * The Camera Zoom effect handler. + * To zoom this camera see the `Camera.zoom` method. + * + * @name Phaser.Cameras.Scene2D.Camera#zoomEffect + * @type {Phaser.Cameras.Scene2D.Effects.Zoom} + * @since 3.11.0 + */ + this.zoomEffect = new Effects.Zoom(this); + + /** + * The linear interpolation value to use when following a target. + * + * Can also be set via `setLerp` or as part of the `startFollow` call. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + * + * @name Phaser.Cameras.Scene2D.Camera#lerp + * @type {Phaser.Math.Vector2} + * @since 3.9.0 + */ + this.lerp = new Vector2(1, 1); + + /** + * The values stored in this property are subtracted from the Camera targets position, allowing you to + * offset the camera from the actual target x/y coordinates by this amount. + * Can also be set via `setFollowOffset` or as part of the `startFollow` call. + * + * @name Phaser.Cameras.Scene2D.Camera#followOffset + * @type {Phaser.Math.Vector2} + * @since 3.9.0 + */ + this.followOffset = new Vector2(); + + /** + * The Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * You can directly set this property to be an instance of a Rectangle. Or, you can use the + * `setDeadzone` method for a chainable approach. + * + * The rectangle you provide can have its dimensions adjusted dynamically, however, please + * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point. + * + * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property + * to `null`. + * + * @name Phaser.Cameras.Scene2D.Camera#deadzone + * @type {?Phaser.Geom.Rectangle} + * @since 3.11.0 + */ + this.deadzone = null; + + /** + * Internal follow target reference. + * + * @name Phaser.Cameras.Scene2D.Camera#_follow + * @type {?any} + * @private + * @default null + * @since 3.0.0 + */ + this._follow = null; + + this.renderToTexture = false; + + /** + * The HTML Canvas Element that the Render Texture is drawing to. + * This is only populated if Phaser is running with the Canvas Renderer. + * + * @name Phaser.GameObjects.RenderTexture#canvas + * @type {HTMLCanvasElement} + * @since 3.12.0 + */ + this.canvas = null; + + /** + * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to. + * + * @name Phaser.GameObjects.RenderTexture#context + * @type {CanvasRenderingContext2D} + * @since 3.12.0 + */ + this.context = null; + + /** + * A reference to the GL Frame Buffer this Render Texture is drawing to. + * This is only set if Phaser is running with the WebGL Renderer. + * + * @name Phaser.GameObjects.RenderTexture#framebuffer + * @type {?WebGLFramebuffer} + * @since 3.12.0 + */ + this.glTexture = null; + + /** + * A reference to the GL Frame Buffer this Render Texture is drawing to. + * This is only set if Phaser is running with the WebGL Renderer. + * + * @name Phaser.GameObjects.RenderTexture#framebuffer + * @type {?WebGLFramebuffer} + * @since 3.12.0 + */ + this.framebuffer = null; + + this.pipeline = null; + + // this.flipX = false; + // this.flipY = false; + // this.tintFill = 0; + // this._isTinted = false; + // this._tintTL = 0xffffff; + // this._tintTR = 0xffffff; + // this._tintBL = 0xffffff; + // this._tintBR = 0xffffff; + // this._alphaTL = 1; + // this._alphaTR = 1; + // this._alphaBL = 1; + // this._alphaBR = 1; + }, + + setRenderToTexture: function (pipeline) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer.gl) + { + this.glTexture = renderer.createTextureFromSource(null, this.width, this.height, 0); + this.framebuffer = renderer.createFramebuffer(this.width, this.height, this.glTexture, false); + } + else + { + this.canvas = CanvasPool.create2D(this, this.width, this.height); + this.context = this.canvas.getContext('2d'); + } + + this.renderToTexture = true; + + if (pipeline) + { + this.pipeline = pipeline; + } + + return this; + }, + + /** + * Sets the Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point + * of the camera. This allows you to use the object for additional game related checks, such as + * testing if an object is within it or not via a Rectangle.contains call. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * Calling this method with no arguments will reset an active deadzone. + * + * @method Phaser.Cameras.Scene2D.Camera#setDeadzone + * @since 3.11.0 + * + * @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. + */ + setDeadzone: function (width, height) + { + if (width === undefined) + { + this.deadzone = null; + } + else + { + if (this.deadzone) + { + this.deadzone.width = width; + this.deadzone.height = height; + } + else + { + this.deadzone = new Rectangle(0, 0, width, height); + } + + if (this._follow) + { + var originX = this.width / 2; + var originY = this.height / 2; + + var fx = this._follow.x - this.followOffset.x; + var fy = this._follow.y - this.followOffset.y; + + this.midPoint.set(fx, fy); + + this.scrollX = fx - originX; + this.scrollY = fy - originY; + } + + CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y); + } + + return this; + }, + + /** + * Fades the Camera in from the given color over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeIn + * @since 3.3.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeIn: function (duration, red, green, blue, callback, context) + { + return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context); + }, + + /** + * Fades the Camera out to the given color over the duration specified. + * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeOut + * @since 3.3.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeOut: function (duration, red, green, blue, callback, context) + { + return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context); + }, + + /** + * Fades the Camera from the given color to transparent over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeFrom + * @since 3.5.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeFrom: function (duration, red, green, blue, force, callback, context) + { + return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context); + }, + + /** + * Fades the Camera from transparent to the given color over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fade + * @since 3.0.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fade: function (duration, red, green, blue, force, callback, context) + { + return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context); + }, + + /** + * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#flash + * @since 3.0.0 + * + * @param {integer} [duration=250] - The duration of the effect in milliseconds. + * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + flash: function (duration, red, green, blue, force, callback, context) + { + return this.flashEffect.start(duration, red, green, blue, force, callback, context); + }, + + /** + * Shakes the Camera by the given intensity over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#shake + * @since 3.0.0 + * + * @param {integer} [duration=100] - The duration of the effect in milliseconds. + * @param {number} [intensity=0.05] - The intensity of the shake. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + shake: function (duration, intensity, force, callback, context) + { + return this.shakeEffect.start(duration, intensity, force, callback, context); + }, + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#pan + * @since 3.11.0 + * + * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to. + * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {CameraPanCallback} [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} 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 zoom the Camera to the given scale, over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#zoomTo + * @since 3.11.0 + * + * @param {number} zoom - The target Camera zoom value. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {CameraPanCallback} [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} This Camera instance. + */ + zoomTo: function (zoom, duration, ease, force, callback, context) + { + return this.zoomEffect.start(zoom, duration, ease, force, callback, context); + }, + + /** + * Internal preRender step. + * + * @method Phaser.Cameras.Scene2D.Camera#preRender + * @protected + * @since 3.0.0 + * + * @param {number} baseScale - The base scale, as set in the Camera Manager. + * @param {number} resolution - The game resolution. + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + + var halfWidth = width * 0.5; + var halfHeight = height * 0.5; + + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + + var originX = width * this.originX; + var originY = height * this.originY; + + var follow = this._follow; + var deadzone = this.deadzone; + + var sx = this.scrollX; + var sy = this.scrollY; + + if (deadzone) + { + CenterOn(deadzone, this.midPoint.x, this.midPoint.y); + } + + if (follow) + { + var fx = (follow.x - this.followOffset.x); + var fy = (follow.y - this.followOffset.y); + + if (deadzone) + { + if (fx < deadzone.x) + { + sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x); + } + else if (fx > deadzone.right) + { + sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x); + } + + if (fy < deadzone.y) + { + sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y); + } + else if (fy > deadzone.bottom) + { + sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y); + } + } + else + { + sx = Linear(sx, fx - originX, this.lerp.x); + sy = Linear(sy, fy - originY, this.lerp.y); + } + } + + if (this.useBounds) + { + sx = this.clampX(sx); + sy = this.clampY(sy); + } + + if (this.roundPixels) + { + originX = Math.round(originX); + originY = Math.round(originY); + } + + // Values are in pixels and not impacted by zooming the Camera + this.scrollX = sx; + this.scrollY = sy; + + var midX = sx + halfWidth; + var midY = sy + halfHeight; + + // The center of the camera, in world space, so taking zoom into account + // Basically the pixel value of what it's looking at in the middle of the cam + this.midPoint.set(midX, midY); + + var displayWidth = width / zoom; + var displayHeight = height / zoom; + + this.worldView.setTo( + midX - (displayWidth / 2), + midY - (displayHeight / 2), + displayWidth, + displayHeight + ); + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + + this.shakeEffect.preRender(); + }, + + /** + * Sets the linear interpolation value to use when following a target. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + * + * @method Phaser.Cameras.Scene2D.Camera#setLerp + * @since 3.9.0 + * + * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target. + * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target. + * + * @return {this} This Camera instance. + */ + setLerp: function (x, y) + { + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } + + this.lerp.set(x, y); + + return this; + }, + + /** + * Sets the horizontal and vertical offset of the camera from its follow target. + * The values are subtracted from the targets position during the Cameras update step. + * + * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset + * @since 3.9.0 + * + * @param {number} [x=0] - The horizontal offset from the camera follow target.x position. + * @param {number} [y=0] - The vertical offset from the camera follow target.y position. + * + * @return {this} This Camera instance. + */ + setFollowOffset: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.followOffset.set(x, y); + + return this; + }, + + /** + * Sets the Camera to follow a Game Object. + * + * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object + * in its center. + * + * You can set the linear interpolation value used in the follow code. + * Use low lerp values (such as 0.1) to automatically smooth the camera motion. + * + * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel + * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to + * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom + * value on the camera. So be sure to keep the camera zoom to integers. + * + * @method Phaser.Cameras.Scene2D.Camera#startFollow + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow. + * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering? + * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. + * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. + * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position. + * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position. + * + * @return {this} This Camera instance. + */ + startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY) + { + if (roundPixels === undefined) { roundPixels = false; } + if (lerpX === undefined) { lerpX = 1; } + if (lerpY === undefined) { lerpY = lerpX; } + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = offsetX; } + + this._follow = target; + + this.roundPixels = roundPixels; + + lerpX = Clamp(lerpX, 0, 1); + lerpY = Clamp(lerpY, 0, 1); + + this.lerp.set(lerpX, lerpY); + + this.followOffset.set(offsetX, offsetY); + + var originX = this.width / 2; + var originY = this.height / 2; + + var fx = target.x - offsetX; + var fy = target.y - offsetY; + + this.midPoint.set(fx, fy); + + this.scrollX = fx - originX; + this.scrollY = fy - originY; + + return this; + }, + + /** + * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`. + * + * @method Phaser.Cameras.Scene2D.Camera#stopFollow + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + stopFollow: function () + { + this._follow = null; + + return this; + }, + + /** + * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to + * remove the fade. + * + * @method Phaser.Cameras.Scene2D.Camera#resetFX + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + resetFX: function () + { + this.panEffect.reset(); + this.shakeEffect.reset(); + this.flashEffect.reset(); + this.fadeEffect.reset(); + + return this; + }, + + /** + * Internal method called automatically by the Camera Manager. + * + * @method Phaser.Cameras.Scene2D.Camera#update + * @protected + * @since 3.0.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.visible) + { + this.panEffect.update(time, delta); + this.zoomEffect.update(time, delta); + this.shakeEffect.update(time, delta); + this.flashEffect.update(time, delta); + this.fadeEffect.update(time, delta); + } + }, + + /** + * Destroys this Camera instance. You rarely need to call this directly. + * + * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as + * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. + * + * @method Phaser.Cameras.Scene2D.Camera#destroy + * @fires CameraDestroyEvent + * @since 3.0.0 + */ + destroy: function () + { + BaseCamera.prototype.destroy.call(this); + + this.resetFX(); + + this._follow = null; + this.deadzone = null; + } + +}); + +module.exports = Camera; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BaseCache = __webpack_require__(214); var Class = __webpack_require__(0); /** @@ -49428,7 +51393,7 @@ module.exports = CacheManager; /***/ }), -/* 212 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49622,7 +51587,7 @@ module.exports = BaseCache; /***/ }), -/* 213 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49631,7 +51596,7 @@ module.exports = BaseCache; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Animation = __webpack_require__(216); +var Animation = __webpack_require__(218); var Class = __webpack_require__(0); var CustomMap = __webpack_require__(127); var EventEmitter = __webpack_require__(8); @@ -50249,7 +52214,7 @@ module.exports = AnimationManager; /***/ }), -/* 214 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50432,7 +52397,7 @@ module.exports = AnimationFrame; /***/ }), -/* 215 */ +/* 217 */ /***/ (function(module, exports) { /** @@ -50513,7 +52478,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 216 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50524,8 +52489,8 @@ module.exports = FindClosestInSorted; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var FindClosestInSorted = __webpack_require__(215); -var Frame = __webpack_require__(214); +var FindClosestInSorted = __webpack_require__(217); +var Frame = __webpack_require__(216); var GetValue = __webpack_require__(3); /** @@ -51443,7 +53408,7 @@ module.exports = Animation; /***/ }), -/* 217 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51475,7 +53440,7 @@ module.exports = WrapDegrees; /***/ }), -/* 218 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51507,7 +53472,7 @@ module.exports = Wrap; /***/ }), -/* 219 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51665,7 +53630,7 @@ module.exports = GeometryMask; /***/ }), -/* 220 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51908,7 +53873,7 @@ module.exports = BitmapMask; /***/ }), -/* 221 */ +/* 223 */ /***/ (function(module, exports) { var g; @@ -51934,7 +53899,7 @@ module.exports = g; /***/ }), -/* 222 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51943,8 +53908,8 @@ module.exports = g; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var MapData = __webpack_require__(104); +var Formats = __webpack_require__(28); +var MapData = __webpack_require__(105); var Parse = __webpack_require__(323); var Tilemap = __webpack_require__(315); @@ -52020,7 +53985,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 223 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52029,9 +53994,9 @@ module.exports = ParseToTilemap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var LayerData = __webpack_require__(105); -var MapData = __webpack_require__(104); +var Formats = __webpack_require__(28); +var LayerData = __webpack_require__(106); +var MapData = __webpack_require__(105); var Tile = __webpack_require__(66); /** @@ -52112,7 +54077,7 @@ module.exports = Parse2DArray; /***/ }), -/* 224 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -52151,7 +54116,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 225 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52161,8 +54126,8 @@ module.exports = SetLayerCollisionIndex; */ var Tile = __webpack_require__(66); -var IsInLayerBounds = __webpack_require__(106); -var CalculateFacesAt = __webpack_require__(226); +var IsInLayerBounds = __webpack_require__(107); +var CalculateFacesAt = __webpack_require__(228); var SetTileCollision = __webpack_require__(67); /** @@ -52231,7 +54196,7 @@ module.exports = PutTileAt; /***/ }), -/* 226 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52307,8 +54272,8 @@ module.exports = CalculateFacesAt; /***/ }), -/* 227 */, -/* 228 */ +/* 229 */, +/* 230 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52317,7 +54282,7 @@ module.exports = CalculateFacesAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(187); +var quickselect = __webpack_require__(188); /** * @classdesc @@ -52916,7 +54881,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 229 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53132,7 +55097,7 @@ module.exports = ProcessQueue; /***/ }), -/* 230 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53316,7 +55281,7 @@ module.exports = TextFile; /***/ }), -/* 231 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -53370,7 +55335,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 232 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53463,7 +55428,7 @@ module.exports = GetPoints; /***/ }), -/* 233 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53551,7 +55516,7 @@ module.exports = GetPoint; /***/ }), -/* 234 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -53579,7 +55544,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports) { /** @@ -53628,7 +55593,7 @@ module.exports = Contains; /***/ }), -/* 236 */ +/* 238 */ /***/ (function(module, exports) { /** @@ -53676,7 +55641,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 237 */ +/* 239 */ /***/ (function(module, exports) { /** @@ -53762,7 +55727,7 @@ module.exports = ContainsArray; /***/ }), -/* 238 */ +/* 240 */ /***/ (function(module, exports) { /** @@ -53796,7 +55761,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 239 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54457,7 +56422,7 @@ module.exports = Quad; /***/ }), -/* 240 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54466,13 +56431,13 @@ module.exports = Quad; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); var GameObject = __webpack_require__(15); var GetPowerOfTwo = __webpack_require__(414); -var TileSpriteRender = __webpack_require__(893); +var TileSpriteRender = __webpack_require__(898); var Vector2 = __webpack_require__(4); // bitmask flag for GameObject.renderMask @@ -55093,7 +57058,7 @@ module.exports = TileSprite; /***/ }), -/* 241 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55102,14 +57067,14 @@ module.exports = TileSprite; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(289); -var CanvasPool = __webpack_require__(24); +var Camera = __webpack_require__(88); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); -var Frame = __webpack_require__(94); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); +var Frame = __webpack_require__(95); var GameObject = __webpack_require__(15); -var Render = __webpack_require__(899); +var Render = __webpack_require__(904); var UUID = __webpack_require__(421); /** @@ -55930,7 +57895,6 @@ var RenderTexture = new Class({ if (this.gl) { - this.renderer.deleteTexture(this.texture); this.renderer.deleteFramebuffer(this.framebuffer); } @@ -55943,7 +57907,7 @@ module.exports = RenderTexture; /***/ }), -/* 242 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55953,12 +57917,12 @@ module.exports = RenderTexture; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var GravityWell = __webpack_require__(429); -var List = __webpack_require__(93); +var List = __webpack_require__(94); var ParticleEmitter = __webpack_require__(427); -var Render = __webpack_require__(903); +var Render = __webpack_require__(908); /** * @classdesc @@ -56394,7 +58358,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 243 */ +/* 245 */ /***/ (function(module, exports) { /** @@ -56423,7 +58387,7 @@ module.exports = FloatBetween; /***/ }), -/* 244 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56432,11 +58396,11 @@ module.exports = FloatBetween; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); Ellipse.Area = __webpack_require__(443); -Ellipse.Circumference = __webpack_require__(184); -Ellipse.CircumferencePoint = __webpack_require__(114); +Ellipse.Circumference = __webpack_require__(185); +Ellipse.CircumferencePoint = __webpack_require__(115); Ellipse.Clone = __webpack_require__(442); Ellipse.Contains = __webpack_require__(55); Ellipse.ContainsPoint = __webpack_require__(441); @@ -56444,8 +58408,8 @@ Ellipse.ContainsRect = __webpack_require__(440); Ellipse.CopyFrom = __webpack_require__(439); Ellipse.Equals = __webpack_require__(438); Ellipse.GetBounds = __webpack_require__(437); -Ellipse.GetPoint = __webpack_require__(186); -Ellipse.GetPoints = __webpack_require__(185); +Ellipse.GetPoint = __webpack_require__(187); +Ellipse.GetPoints = __webpack_require__(186); Ellipse.Offset = __webpack_require__(436); Ellipse.OffsetPoint = __webpack_require__(435); Ellipse.Random = __webpack_require__(136); @@ -56454,7 +58418,7 @@ module.exports = Ellipse; /***/ }), -/* 245 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56465,7 +58429,7 @@ module.exports = Ellipse; var BitmapText = __webpack_require__(149); var Class = __webpack_require__(0); -var Render = __webpack_require__(908); +var Render = __webpack_require__(913); /** * @typedef {object} DisplayCallbackConfig @@ -56683,7 +58647,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 246 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56695,10 +58659,10 @@ module.exports = DynamicBitmapText; var ArrayUtils = __webpack_require__(151); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(913); +var Render = __webpack_require__(918); var Union = __webpack_require__(446); var Vector2 = __webpack_require__(4); @@ -57922,7 +59886,7 @@ module.exports = Container; /***/ }), -/* 247 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57931,13 +59895,13 @@ module.exports = Container; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(917); -var Bob = __webpack_require__(914); +var BlitterRender = __webpack_require__(922); +var Bob = __webpack_require__(919); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var Frame = __webpack_require__(94); +var Components = __webpack_require__(13); +var Frame = __webpack_require__(95); var GameObject = __webpack_require__(15); -var List = __webpack_require__(93); +var List = __webpack_require__(94); /** * @callback Phaser.GameObjects.Blitter.CreateCallback @@ -58223,7 +60187,7 @@ module.exports = Blitter; /***/ }), -/* 248 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58233,7 +60197,7 @@ module.exports = Blitter; */ var GetValue = __webpack_require__(3); -var Shuffle = __webpack_require__(96); +var Shuffle = __webpack_require__(97); var BuildChunk = function (a, b, qty) { @@ -58363,7 +60327,7 @@ module.exports = Range; /***/ }), -/* 249 */ +/* 251 */ /***/ (function(module, exports) { /** @@ -58392,7 +60356,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 250 */ +/* 252 */ /***/ (function(module, exports) { /** @@ -58429,7 +60393,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 251 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58495,7 +60459,7 @@ module.exports = TransformXY; /***/ }), -/* 252 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58504,7 +60468,7 @@ module.exports = TransformXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SmoothStep = __webpack_require__(159); +var SmoothStep = __webpack_require__(160); /** * A Smooth Step interpolation method. @@ -58528,7 +60492,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 253 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59203,7 +61167,7 @@ earcut.flatten = function (data) { }; /***/ }), -/* 254 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59214,8 +61178,8 @@ earcut.flatten = function (data) { */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(502); -var ShaderSourceVS = __webpack_require__(501); +var ShaderSourceFS = __webpack_require__(503); +var ShaderSourceVS = __webpack_require__(502); var WebGLPipeline = __webpack_require__(132); /** @@ -59430,7 +61394,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 255 */ +/* 257 */ /***/ (function(module, exports) { /** @@ -59499,7 +61463,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 256 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59509,15 +61473,17 @@ module.exports = WebGLSnapshot; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var BaseCamera = __webpack_require__(88); var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var IsSizePowerOfTwo = __webpack_require__(84); var SpliceOne = __webpack_require__(56); +var TransformMatrix = __webpack_require__(27); var Utils = __webpack_require__(21); -var WebGLSnapshot = __webpack_require__(255); +var WebGLSnapshot = __webpack_require__(257); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(254); +var BitmapMaskPipeline = __webpack_require__(256); var ForwardDiffuseLightPipeline = __webpack_require__(152); var TextureTintPipeline = __webpack_require__(131); @@ -59919,6 +61885,48 @@ var WebGLRenderer = new Class({ */ this.blankTexture = null; + this.defaultCamera = new BaseCamera(0, 0, 0, 0); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix1 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix1 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix2 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix2 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix3 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix3 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix4 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix4 = new TransformMatrix(); + this.init(this.config); }, @@ -60089,6 +62097,8 @@ var WebGLRenderer = new Class({ this.drawingBufferHeight = gl.drawingBufferHeight; + this.defaultCamera.setSize(width, height); + return this; }, @@ -60986,14 +62996,36 @@ var WebGLRenderer = new Class({ this.pushScissor(cx, cy, cw, ch); - if (camera.backgroundColor.alphaGL > 0) - { - var color = camera.backgroundColor; - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var color = camera.backgroundColor; + + if (camera.renderToTexture) + { + this.setFramebuffer(camera.framebuffer); + + var gl = this.gl; + + gl.clearColor(0, 0, 0, 0); + + gl.clear(gl.COLOR_BUFFER_BIT); + + TextureTintPipeline.projOrtho(0, camera.width, 0, camera.height, -1000, 1000); + + if (color.alphaGL > 0) + { + TextureTintPipeline.drawFillRect( + cx, cy, cw, ch, + Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), + color.alphaGL + ); + } + } + else if (color.alphaGL > 0) + { TextureTintPipeline.drawFillRect( cx, cy, cw, ch, - Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1.0), + Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL ); } @@ -61018,6 +63050,44 @@ var WebGLRenderer = new Class({ camera.dirty = false; this.popScissor(); + + if (camera.renderToTexture) + { + TextureTintPipeline.flush(); + + this.setFramebuffer(null); + + TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + + var getTint = Utils.getTintAppendFloatAlpha; + + var p = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + + p.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); + } }, /** @@ -61550,7 +63620,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 257 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61560,7 +63630,7 @@ module.exports = WebGLRenderer; */ var modes = __webpack_require__(52); -var CanvasFeatures = __webpack_require__(209); +var CanvasFeatures = __webpack_require__(210); /** * [description] @@ -61601,7 +63671,7 @@ module.exports = GetBlendModes; /***/ }), -/* 258 */ +/* 260 */ /***/ (function(module, exports) { /** @@ -61640,7 +63710,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 259 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61650,13 +63720,13 @@ module.exports = CanvasSnapshot; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasSnapshot = __webpack_require__(258); +var CanvasSnapshot = __webpack_require__(260); var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var GetBlendModes = __webpack_require__(257); +var CONST = __webpack_require__(23); +var GetBlendModes = __webpack_require__(259); var ScaleModes = __webpack_require__(60); var Smoothing = __webpack_require__(133); -var TransformMatrix = __webpack_require__(32); +var TransformMatrix = __webpack_require__(27); /** * @classdesc @@ -61782,6 +63852,9 @@ var CanvasRenderer = new Class({ */ this.blendModes = GetBlendModes(); + // image-rendering: optimizeSpeed; + // image-rendering: pixelated; + /** * [description] * @@ -62291,7 +64364,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 260 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62488,36 +64561,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 261 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Attempts to remove the element from its parentNode in the DOM. - * - * @function Phaser.DOM.RemoveFromDOM - * @since 3.0.0 - * - * @param {HTMLElement} element - The DOM element to remove from its parent node. - */ -var RemoveFromDOM = function (element) -{ - if (element.parentNode) - { - element.parentNode.removeChild(element); - } -}; - -module.exports = RemoveFromDOM; - - -/***/ }), -/* 262 */ +/* 263 */ /***/ (function(module, exports) { /** @@ -62574,7 +64618,7 @@ module.exports = ParseXML; /***/ }), -/* 263 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62637,7 +64681,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 264 */ +/* 265 */ /***/ (function(module, exports) { /** @@ -62700,7 +64744,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 265 */ +/* 266 */ /***/ (function(module, exports) { /** @@ -62737,7 +64781,7 @@ module.exports = CatmullRom; /***/ }), -/* 266 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62822,7 +64866,7 @@ module.exports = FromPoints; /***/ }), -/* 267 */ +/* 268 */ /***/ (function(module, exports) { /** @@ -62860,7 +64904,7 @@ module.exports = { /***/ }), -/* 268 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62869,8 +64913,8 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Arne16 = __webpack_require__(267); -var CanvasPool = __webpack_require__(24); +var Arne16 = __webpack_require__(268); +var CanvasPool = __webpack_require__(22); var GetValue = __webpack_require__(3); /** @@ -62975,7 +65019,7 @@ module.exports = GenerateTexture; /***/ }), -/* 269 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64379,7 +66423,7 @@ module.exports = Matrix4; /***/ }), -/* 270 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64389,15 +66433,15 @@ module.exports = Matrix4; */ var Class = __webpack_require__(0); -var Matrix4 = __webpack_require__(269); -var RandomXYZ = __webpack_require__(534); -var RandomXYZW = __webpack_require__(533); -var RotateVec3 = __webpack_require__(532); +var Matrix4 = __webpack_require__(270); +var RandomXYZ = __webpack_require__(539); +var RandomXYZW = __webpack_require__(538); +var RotateVec3 = __webpack_require__(537); var Set = __webpack_require__(70); -var Sprite3D = __webpack_require__(156); +var Sprite3D = __webpack_require__(157); var Vector2 = __webpack_require__(4); var Vector3 = __webpack_require__(87); -var Vector4 = __webpack_require__(155); +var Vector4 = __webpack_require__(156); // Local cache vars var tmpVec3 = new Vector3(); @@ -65454,7 +67498,7 @@ module.exports = Camera; /***/ }), -/* 271 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65467,11 +67511,11 @@ module.exports = Camera; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(538); +module.exports = __webpack_require__(543); /***/ }), -/* 272 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65486,32 +67530,9 @@ module.exports = __webpack_require__(538); module.exports = { - In: __webpack_require__(541), - Out: __webpack_require__(540), - InOut: __webpack_require__(539) - -}; - - -/***/ }), -/* 273 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quintic - */ - -module.exports = { - - In: __webpack_require__(544), - Out: __webpack_require__(543), - InOut: __webpack_require__(542) + In: __webpack_require__(546), + Out: __webpack_require__(545), + InOut: __webpack_require__(544) }; @@ -65527,14 +67548,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Quintic */ module.exports = { - In: __webpack_require__(547), - Out: __webpack_require__(546), - InOut: __webpack_require__(545) + In: __webpack_require__(549), + Out: __webpack_require__(548), + InOut: __webpack_require__(547) }; @@ -65550,14 +67571,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quadratic + * @namespace Phaser.Math.Easing.Quartic */ module.exports = { - In: __webpack_require__(550), - Out: __webpack_require__(549), - InOut: __webpack_require__(548) + In: __webpack_require__(552), + Out: __webpack_require__(551), + InOut: __webpack_require__(550) }; @@ -65573,16 +67594,39 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Linear + * @namespace Phaser.Math.Easing.Quadratic */ -module.exports = __webpack_require__(551); +module.exports = { + + In: __webpack_require__(555), + Out: __webpack_require__(554), + InOut: __webpack_require__(553) + +}; /***/ }), /* 277 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Linear + */ + +module.exports = __webpack_require__(556); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -65595,32 +67639,9 @@ module.exports = __webpack_require__(551); module.exports = { - In: __webpack_require__(554), - Out: __webpack_require__(553), - InOut: __webpack_require__(552) - -}; - - -/***/ }), -/* 278 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Elastic - */ - -module.exports = { - - In: __webpack_require__(557), - Out: __webpack_require__(556), - InOut: __webpack_require__(555) + In: __webpack_require__(559), + Out: __webpack_require__(558), + InOut: __webpack_require__(557) }; @@ -65636,14 +67657,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { - In: __webpack_require__(560), - Out: __webpack_require__(559), - InOut: __webpack_require__(558) + In: __webpack_require__(562), + Out: __webpack_require__(561), + InOut: __webpack_require__(560) }; @@ -65659,14 +67680,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Circular + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { - In: __webpack_require__(563), - Out: __webpack_require__(562), - InOut: __webpack_require__(561) + In: __webpack_require__(565), + Out: __webpack_require__(564), + InOut: __webpack_require__(563) }; @@ -65682,14 +67703,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Bounce + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(566), - Out: __webpack_require__(565), - InOut: __webpack_require__(564) + In: __webpack_require__(568), + Out: __webpack_require__(567), + InOut: __webpack_require__(566) }; @@ -65705,14 +67726,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Back + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(569), - Out: __webpack_require__(568), - InOut: __webpack_require__(567) + In: __webpack_require__(571), + Out: __webpack_require__(570), + InOut: __webpack_require__(569) }; @@ -65727,7 +67748,30 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(574), + Out: __webpack_require__(573), + InOut: __webpack_require__(572) + +}; + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Color = __webpack_require__(31); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -65764,7 +67808,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 284 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65773,7 +67817,7 @@ module.exports = RGBStringToColor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -65794,7 +67838,7 @@ module.exports = ObjectToColor; /***/ }), -/* 285 */ +/* 286 */ /***/ (function(module, exports) { /** @@ -65842,7 +67886,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 286 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65851,8 +67895,8 @@ module.exports = IntegerToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); -var IntegerToRGB = __webpack_require__(285); +var Color = __webpack_require__(31); +var IntegerToRGB = __webpack_require__(286); /** * Converts the given color value into an instance of a Color object. @@ -65875,7 +67919,7 @@ module.exports = IntegerToColor; /***/ }), -/* 287 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -65906,7 +67950,7 @@ module.exports = GetColor32; /***/ }), -/* 288 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65915,7 +67959,7 @@ module.exports = GetColor32; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); /** * Converts a hex string into a Phaser Color object. @@ -65958,1787 +68002,6 @@ var HexStringToColor = function (hex) module.exports = HexStringToColor; -/***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); -var EventEmitter = __webpack_require__(8); -var Rectangle = __webpack_require__(11); -var TransformMatrix = __webpack_require__(32); -var ValueToColor = __webpack_require__(134); -var Vector2 = __webpack_require__(4); - -/** - * @typedef {object} JSONCameraBounds - * @property {number} x - The horizontal position of camera - * @property {number} y - The vertical position of camera - * @property {number} width - The width size of camera - * @property {number} height - The height size of camera - */ - -/** - * @typedef {object} JSONCamera - * - * @property {string} name - The name of the camera - * @property {number} x - The horizontal position of camera - * @property {number} y - The vertical position of camera - * @property {number} width - The width size of camera - * @property {number} height - The height size of camera - * @property {number} zoom - The zoom of camera - * @property {number} rotation - The rotation of camera - * @property {boolean} roundPixels - The round pixels st status of camera - * @property {number} scrollX - The horizontal scroll of camera - * @property {number} scrollY - The vertical scroll of camera - * @property {string} backgroundColor - The background color of camera - * @property {(JSONCameraBounds|undefined)} [bounds] - The bounds of camera - */ - -/** - * @classdesc - * A Base Camera class. - * - * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, - * and can be positioned, rotated, zoomed and scrolled accordingly. - * - * A Camera consists of two elements: The viewport and the scroll values. - * - * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are - * created the same size as your game, but their position and size can be set to anything. This means if you - * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, - * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). - * - * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this - * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the - * viewport, and changing the viewport has no impact on the scrolling. - * - * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, - * allowing you to filter Game Objects out on a per-Camera basis. - * - * The Base Camera is extended by the Camera class, which adds in special effects including Fade, - * Flash and Camera Shake, as well as the ability to follow Game Objects. - * - * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow - * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate - * to when they were added to the Camera class. - * - * @class BaseCamera - * @extends Phaser.Events.EventEmitter - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.12.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var BaseCamera = new Class({ - - Extends: EventEmitter, - - initialize: - - function BaseCamera (x, y, width, height) - { - EventEmitter.call(this); - - /** - * A reference to the Scene this camera belongs to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene; - - /** - * A reference to the Game Scene Manager. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager - * @type {Phaser.Scenes.SceneManager} - * @since 3.12.0 - */ - this.sceneManager; - - /** - * A reference to the Game Config. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#config - * @type {object} - * @readOnly - * @since 3.12.0 - */ - this.config; - - /** - * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion. - * This value is a bitmask. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#id - * @type {integer} - * @readOnly - * @since 3.11.0 - */ - this.id = 0; - - /** - * The name of the Camera. This is left empty for your own use. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The resolution of the Game, used in most Camera calculations. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#resolution - * @type {number} - * @readOnly - * @since 3.12.0 - */ - this.resolution = 1; - - /** - * Should this camera round its pixel values to integers? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.roundPixels = false; - - /** - * Is this Camera visible or not? - * - * A visible camera will render and perform input tests. - * An invisible camera will not render anything and will skip input tests. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#visible - * @type {boolean} - * @default true - * @since 3.10.0 - */ - this.visible = true; - - /** - * Is this Camera using a bounds to restrict scrolling movement? - * - * Set this property along with the bounds via `Camera.setBounds`. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.useBounds = false; - - /** - * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at. - * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. - * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. - * You can use it for culling or intersection checks. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#worldView - * @type {Phaser.Geom.Rectangle} - * @readOnly - * @since 3.11.0 - */ - this.worldView = new Rectangle(); - - /** - * Is this Camera dirty? - * - * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. - * - * This flag is cleared during the `postRenderCamera` method of the renderer. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#dirty - * @type {boolean} - * @default true - * @since 3.11.0 - */ - this.dirty = true; - - /** - * The x position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollX` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#x - * @type {number} - * @private - * @since 3.0.0 - */ - this._x = x; - - /** - * The y position of the Camera, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollY` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#y - * @type {number} - * @private - * @since 3.0.0 - */ - this._y = y; - - /** - * Internal Camera X value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cx - * @type {number} - * @private - * @since 3.12.0 - */ - this._cx = 0; - - /** - * Internal Camera Y value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cy - * @type {number} - * @private - * @since 3.12.0 - */ - this._cy = 0; - - /** - * Internal Camera Width value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cw - * @type {number} - * @private - * @since 3.12.0 - */ - this._cw = 0; - - /** - * Internal Camera Height value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_ch - * @type {number} - * @private - * @since 3.12.0 - */ - this._ch = 0; - - /** - * The width of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_width - * @type {number} - * @private - * @since 3.11.0 - */ - this._width = width; - - /** - * The height of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_height - * @type {number} - * @private - * @since 3.11.0 - */ - this._height = height; - - /** - * The bounds the camera is restrained to during scrolling. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); - - /** - * The horizontal scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._scrollX = 0; - - /** - * The vertical scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._scrollY = 0; - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * - * A value of 0.5 would zoom the Camera out, so you can now see twice as much - * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel - * now takes up 2 pixels when rendered. - * - * Set to 1 to return to the default zoom level. - * - * Be careful to never set this value to zero. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom - * @type {number} - * @private - * @default 1 - * @since 3.11.0 - */ - this._zoom = 1; - - /** - * The rotation of the Camera in radians. - * - * 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. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._rotation = 0; - - /** - * A local transform matrix used for internal calculations. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#matrix - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @private - * @since 3.0.0 - */ - this.matrix = new TransformMatrix(); - - /** - * Does this Camera have a transparent background? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#transparent - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.transparent = true; - - /** - * The background color of this Camera. Only used if `transparent` is `false`. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor - * @type {Phaser.Display.Color} - * @since 3.0.0 - */ - this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); - - /** - * The Camera alpha value. Setting this property impacts every single object that this Camera - * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out, - * or via the chainable `setAlpha` method instead. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#alpha - * @type {number} - * @default 1 - * @since 3.11.0 - */ - this.alpha = 1; - - /** - * Should the camera cull Game Objects before checking them for input hit tests? - * In some special cases it may be beneficial to disable this. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.disableCull = false; - - /** - * A temporary array of culled objects. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects - * @type {Phaser.GameObjects.GameObject[]} - * @default [] - * @private - * @since 3.0.0 - */ - this.culledObjects = []; - - /** - * The mid-point of the Camera in 'world' coordinates. - * - * Use it to obtain exactly where in the world the center of the camera is currently looking. - * - * This value is updated in the preRender method, after the scroll values and follower - * have been processed. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint - * @type {Phaser.Math.Vector2} - * @readOnly - * @since 3.11.0 - */ - this.midPoint = new Vector2(width / 2, height / 2); - - /** - * The horizontal origin of rotation for this Camera. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * See `setOrigin` to set both origins in a single, chainable call. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#originX - * @type {number} - * @default 0.5 - * @since 3.11.0 - */ - this.originX = 0.5; - - /** - * The vertical origin of rotation for this Camera. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * See `setOrigin` to set both origins in a single, chainable call. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#originY - * @type {number} - * @default 0.5 - * @since 3.11.0 - */ - this.originY = 0.5; - - /** - * Does this Camera have a custom viewport? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport - * @type {boolean} - * @private - * @default false - * @since 3.12.0 - */ - this._customViewport = false; - }, - - /** - * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha - * @since 3.11.0 - * - * @param {number} [value=1] - The Camera alpha value. - * - * @return {this} This Camera instance. - */ - setAlpha: function (value) - { - if (value === undefined) { value = 1; } - - this.alpha = value; - - return this; - }, - - /** - * Sets the rotation origin of this Camera. - * - * The values are given in the range 0 to 1 and are only used when calculating Camera rotation. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin - * @since 3.11.0 - * - * @param {number} [x=0.5] - The horizontal origin value. - * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. - * - * @return {this} This Camera instance. - */ - setOrigin: function (x, y) - { - if (x === undefined) { x = 0.5; } - if (y === undefined) { y = x; } - - this.originX = x; - this.originY = y; - - return this; - }, - - /** - * Calculates what the Camera.scrollX and scrollY values would need to be in order to move - * the Camera so it is centered on the given x and y coordinates, without actually moving - * the Camera there. The results are clamped based on the Camera bounds, if set. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll - * @since 3.11.0 - * - * @param {number} x - The horizontal coordinate to center on. - * @param {number} y - The vertical coordinate to center on. - * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. - * - * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` abd `y` properties. - */ - getScroll: function (x, y, out) - { - if (out === undefined) { out = new Vector2(); } - - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - out.x = x - originX; - out.y = y - originY; - - if (this.useBounds) - { - out.x = this.clampX(out.x); - out.y = this.clampY(out.y); - } - - return out; - }, - - /** - * Moves the Camera so that it is centered on the given coordinates, bounds allowing. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn - * @since 3.11.0 - * - * @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. - */ - centerOn: function (x, y) - { - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - this.midPoint.set(x, y); - - this.scrollX = x - originX; - this.scrollY = y - originY; - - if (this.useBounds) - { - this.scrollX = this.clampX(this.scrollX); - this.scrollY = this.clampY(this.scrollY); - } - - return this; - }, - - /** - * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - centerToBounds: function () - { - if (this.useBounds) - { - var bounds = this._bounds; - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - this.midPoint.set(bounds.centerX, bounds.centerY); - - this.scrollX = bounds.centerX - originX; - this.scrollY = bounds.centerY - originY; - } - - return this; - }, - - /** - * Moves the Camera so that it is re-centered based on its viewport size. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - centerToSize: function () - { - this.scrollX = this.width * 0.5; - this.scrollY = this.height * 0.5; - - return this; - }, - - /** - * Takes an array of Game Objects and returns a new array featuring only those objects - * visible by this camera. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#cull - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return] - * - * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull. - * - * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera. - */ - cull: function (renderableObjects) - { - if (this.disableCull) - { - return renderableObjects; - } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return renderableObjects; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var culledObjects = this.culledObjects; - var length = renderableObjects.length; - - determinant = 1 / determinant; - - culledObjects.length = 0; - - for (var index = 0; index < length; ++index) - { - var object = renderableObjects[index]; - - if (!object.hasOwnProperty('width') || object.parentContainer) - { - culledObjects.push(object); - continue; - } - - var objectW = object.width; - var objectH = object.height; - var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); - var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); - var tx = (objectX * mva + objectY * mvc + mve); - var ty = (objectX * mvb + objectY * mvd + mvf); - var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); - var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); - var cullW = cameraW + objectW; - var cullH = cameraH + objectH; - - if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && - tw > -objectW && th > -objectH && tw < cullW && th < cullH) - { - culledObjects.push(object); - } - } - - return culledObjects; - }, - - /** - * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform. - * You can optionally provide a Vector2, or similar object, to store the results in. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {number} x - The x position to convert to world space. - * @param {number} y - The y position to convert to world space. - * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created. - * - * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties. - */ - getWorldPoint: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - output.x = x; - output.y = y; - - return output; - } - - determinant = 1 / determinant; - - var ima = mvd * determinant; - var imb = -mvb * determinant; - var imc = -mvc * determinant; - var imd = mva * determinant; - var ime = (mvc * mvf - mvd * mve) * determinant; - var imf = (mvb * mve - mva * mvf) * determinant; - - var c = Math.cos(this.rotation); - var s = Math.sin(this.rotation); - - var zoom = this.zoom; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - - var res = this.resolution; - - var sx = x * res + ((scrollX * c - scrollY * s) * zoom); - var sy = y * res + ((scrollX * s + scrollY * c) * zoom); - - /* Apply transform to point */ - output.x = (sx * ima + sy * imc + ime); - output.y = (sx * imb + sy * imd + imf); - - return output; - }, - - /** - * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings - * so that they are ignored by this Camera. This means they will not be rendered by this Camera. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#ignore - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObject - The Game Object, or array of Game Objects, to be ignored by this Camera. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - ignore: function (gameObject) - { - var id = this.id; - - if (Array.isArray(gameObject)) - { - for (var i = 0; i < gameObject.length; i++) - { - gameObject[i].cameraFilter |= id; - } - } - else - { - gameObject.cameraFilter |= id; - } - - return this; - }, - - /** - * Internal preRender step. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#preRender - * @protected - * @since 3.0.0 - * - * @param {number} baseScale - The base scale, as set in the Camera Manager. - * @param {number} resolution - The game resolution. - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - - var halfWidth = width * 0.5; - var halfHeight = height * 0.5; - - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - - var originX = width * this.originX; - var originY = height * this.originY; - - var sx = this.scrollX; - var sy = this.scrollY; - - if (this.useBounds) - { - sx = this.clampX(sx); - sy = this.clampY(sy); - } - - if (this.roundPixels) - { - originX = Math.round(originX); - originY = Math.round(originY); - } - - // Values are in pixels and not impacted by zooming the Camera - this.scrollX = sx; - this.scrollY = sy; - - var midX = sx + halfWidth; - var midY = sy + halfHeight; - - // The center of the camera, in world space, so taking zoom into account - // Basically the pixel value of what it's looking at in the middle of the cam - this.midPoint.set(midX, midY); - - var displayWidth = width / zoom; - var displayHeight = height / zoom; - - this.worldView.setTo( - midX - (displayWidth / 2), - midY - (displayHeight / 2), - displayWidth, - displayHeight - ); - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - }, - - /** - * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required. - * Do not call this method if you are not using camera bounds. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#clampX - * @since 3.11.0 - * - * @param {number} x - The value to horizontally scroll clamp. - * - * @return {number} The adjusted value to use as scrollX. - */ - clampX: function (x) - { - var bounds = this._bounds; - - var dw = this.displayWidth; - - var bx = bounds.x + ((dw - this.width) / 2); - var bw = Math.max(bx, bx + bounds.width - dw); - - if (x < bx) - { - x = bx; - } - else if (x > bw) - { - x = bw; - } - - return x; - }, - - /** - * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. - * Do not call this method if you are not using camera bounds. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#clampY - * @since 3.11.0 - * - * @param {number} y - The value to vertically scroll clamp. - * - * @return {number} The adjusted value to use as scrollY. - */ - clampY: function (y) - { - var bounds = this._bounds; - - var dh = this.displayHeight; - - var by = bounds.y + ((dh - this.height) / 2); - var bh = Math.max(by, by + bounds.height - dh); - - if (y < by) - { - y = by; - } - else if (y > bh) - { - y = bh; - } - - return y; - }, - - /* - var gap = this._zoomInversed; - return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap); - */ - - /** - * If this Camera has previously had movement bounds set on it, this will remove them. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - removeBounds: function () - { - this.useBounds = false; - - this.dirty = true; - - this._bounds.setEmpty(); - - return this; - }, - - /** - * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * - * Rotating a camera does not rotate the viewport itself, it is applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle - * @since 3.0.0 - * - * @param {number} [value=0] - The cameras angle of rotation, given in degrees. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setAngle: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = DegToRad(value); - - return this; - }, - - /** - * Sets the background color for this Camera. - * - * By default a Camera has a transparent background but it can be given a solid color, with any level - * of transparency, via this method. - * - * The color value can be specified using CSS color notation, hex or numbers. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor - * @since 3.0.0 - * - * @param {(string|number|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. - */ - setBackgroundColor: function (color) - { - if (color === undefined) { color = 'rgba(0,0,0,0)'; } - - this.backgroundColor = ValueToColor(color); - - this.transparent = (this.backgroundColor.alpha === 0); - - return this; - }, - - /** - * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. - * - * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the - * edges and into blank space. It does not limit the placement of Game Objects, or where - * the Camera viewport can be positioned. - * - * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. - * - * Clear the bounds entirely by calling `Camera.removeBounds`. - * - * If you set bounds that are smaller than the viewport it will stop the Camera from being - * able to scroll. The bounds can be positioned where-ever you wish. By default they are from - * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of - * the Camera bounds. However, you can position them anywhere. So if you wanted a game world - * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y - * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find - * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds - * @since 3.0.0 - * - * @param {integer} x - The top-left x coordinate of the bounds. - * @param {integer} y - The top-left y coordinate of the bounds. - * @param {integer} width - The width of the bounds, in pixels. - * @param {integer} height - The height of the bounds, in pixels. - * @param {boolean} [centerOn] - If `true` the Camera will automatically be centered on the new bounds. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setBounds: function (x, y, width, height, centerOn) - { - this._bounds.setTo(x, y, width, height); - - this.dirty = true; - this.useBounds = true; - - if (centerOn) - { - this.centerToBounds(); - } - else - { - this.scrollX = this.clampX(this.scrollX); - this.scrollY = this.clampY(this.scrollY); - } - - return this; - }, - - /** - * Sets the name of this Camera. - * This value is for your own use and isn't used internally. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setName - * @since 3.0.0 - * - * @param {string} [value=''] - The name of the Camera. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setName: function (value) - { - if (value === undefined) { value = ''; } - - this.name = value; - - return this; - }, - - /** - * Set the position of the Camera viewport within the game. - * - * This does not change where the camera is 'looking'. See `setScroll` to control that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition - * @since 3.0.0 - * - * @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. - */ - setPosition: function (x, y) - { - if (y === undefined) { y = x; } - - this.x = x; - this.y = y; - - return this; - }, - - /** - * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * - * Rotating a camera does not rotate the viewport itself, it is applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation - * @since 3.0.0 - * - * @param {number} [value=0] - The rotation of the Camera, in radians. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setRotation: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = value; - - return this; - }, - - /** - * Should the Camera round pixel values to whole integers when rendering Game Objects? - * - * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels - * @since 3.0.0 - * - * @param {boolean} value - `true` to round Camera pixels, `false` to not. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setRoundPixels: function (value) - { - this.roundPixels = value; - - return this; - }, - - /** - * Sets the Scene the Camera is bound to. - * - * Also populates the `resolution` property and updates the internal size values. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setScene - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene the camera is bound to. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setScene: function (scene) - { - this.scene = scene; - - this.config = scene.sys.game.config; - this.sceneManager = scene.sys.game.scene; - - var res = this.config.resolution; - - this.resolution = res; - - this._cx = this._x * res; - this._cy = this._y * res; - this._cw = this._width * res; - this._ch = this._height * res; - - return this; - }, - - /** - * Set the position of where the Camera is looking within the game. - * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. - * Use this method, or the scroll properties, to move your camera around the game world. - * - * This does not change where the camera viewport is placed. See `setPosition` to control that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll - * @since 3.0.0 - * - * @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. - */ - setScroll: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollX = x; - this.scrollY = y; - - return this; - }, - - /** - * Set the size of the Camera viewport. - * - * By default a Camera is the same size as the game, but can be made smaller via this method, - * allowing you to create mini-cam style effects by creating and positioning a smaller Camera - * viewport within your game. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setSize - * @since 3.0.0 - * - * @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. - */ - setSize: function (width, height) - { - if (height === undefined) { height = width; } - - this.width = width; - this.height = height; - - return this; - }, - - /** - * This method sets the position and size of the Camera viewport in a single call. - * - * If you're trying to change where the Camera is looking at in your game, then see - * the method `Camera.setScroll` instead. This method is for changing the viewport - * itself, not what the camera can see. - * - * By default a Camera is the same size as the game, but can be made smaller via this method, - * allowing you to create mini-cam style effects by creating and positioning a smaller Camera - * viewport within your game. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport - * @since 3.0.0 - * - * @param {number} x - The top-left x coordinate of the Camera viewport. - * @param {number} y - The top-left y coordinate of the Camera viewport. - * @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. - */ - setViewport: function (x, y, width, height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - - return this; - }, - - /** - * Set the zoom value of the Camera. - * - * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. - * Changing to a larger value, such as 2, will cause the camera to 'zoom in'. - * - * A value of 1 means 'no zoom' and is the default. - * - * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom - * @since 3.0.0 - * - * @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. - */ - setZoom: function (value) - { - if (value === undefined) { value = 1; } - - if (value === 0) - { - value = 0.001; - } - - this.zoom = value; - - return this; - }, - - /** - * Sets the visibility of this Camera. - * - * An invisible Camera will skip rendering and input tests of everything it can see. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible - * @since 3.10.0 - * - * @param {boolean} value - The visible state of the Camera. - * - * @return {this} This Camera instance. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - }, - - /** - * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON - * @since 3.0.0 - * - * @return {JSONCamera} A well-formed object suitable for conversion to JSON. - */ - toJSON: function () - { - var output = { - 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 - }; - - if (this.useBounds) - { - output['bounds'] = { - x: this._bounds.x, - y: this._bounds.y, - width: this._bounds.width, - height: this._bounds.height - }; - } - - return output; - }, - - /** - * Internal method called automatically by the Camera Manager. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#update - * @protected - * @since 3.0.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 () - { - // NOOP - }, - - /** - * Internal method called automatically when the viewport changes. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem - * @private - * @since 3.12.0 - */ - updateSystem: function () - { - var custom = false; - - if (this._x !== 0 || this._y !== 0) - { - custom = true; - } - else - { - var gameWidth = this.config.width; - var gameHeight = this.config.height; - - if (gameWidth !== this._width || gameHeight !== this._height) - { - custom = true; - } - } - - var sceneManager = this.sceneManager; - - if (custom && !this._customViewport) - { - // We need a custom viewport for this Camera - sceneManager.customViewports++; - } - else if (!custom && this._customViewport) - { - // We're turning off a custom viewport for this Camera - sceneManager.customViewports--; - } - - this.dirty = true; - this._customViewport = custom; - }, - - /** - * This event is fired when a camera is destroyed by the Camera Manager. - * - * @event CameraDestroyEvent - * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed. - */ - - /** - * Destroys this Camera instance. You rarely need to call this directly. - * - * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as - * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#destroy - * @fires CameraDestroyEvent - * @since 3.0.0 - */ - destroy: function () - { - this.emit('cameradestroy', this); - - this.removeAllListeners(); - - this.matrix.destroy(); - - this.culledObjects = []; - - if (this._customViewport) - { - // We're turning off a custom viewport for this Camera - this.sceneManager.customViewports--; - } - - this._bounds = null; - - this.scene = null; - this.config = null; - this.sceneManager = null; - }, - - /** - * The x position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollX` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#x - * @type {number} - * @since 3.0.0 - */ - x: { - - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - this._cx = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The y position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollY` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#y - * @type {number} - * @since 3.0.0 - */ - y: { - - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - this._cy = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The width of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#width - * @type {number} - * @since 3.0.0 - */ - width: { - - get: function () - { - return this._width; - }, - - set: function (value) - { - this._width = value; - this._cw = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The height of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#height - * @type {number} - * @since 3.0.0 - */ - height: { - - get: function () - { - return this._height; - }, - - set: function (value) - { - this._height = value; - this._ch = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The horizontal scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX - * @type {number} - * @default 0 - * @since 3.0.0 - */ - scrollX: { - - get: function () - { - return this._scrollX; - }, - - set: function (value) - { - this._scrollX = value; - this.dirty = true; - } - - }, - - /** - * The vertical scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY - * @type {number} - * @default 0 - * @since 3.0.0 - */ - scrollY: { - - get: function () - { - return this._scrollY; - }, - - set: function (value) - { - this._scrollY = value; - this.dirty = true; - } - - }, - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * - * A value of 0.5 would zoom the Camera out, so you can now see twice as much - * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel - * now takes up 2 pixels when rendered. - * - * Set to 1 to return to the default zoom level. - * - * Be careful to never set this value to zero. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#zoom - * @type {number} - * @default 1 - * @since 3.0.0 - */ - zoom: { - - get: function () - { - return this._zoom; - }, - - set: function (value) - { - this._zoom = value; - this.dirty = true; - } - - }, - - /** - * The rotation of the Camera in radians. - * - * 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. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#rotation - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - rotation: { - - get: function () - { - return this._rotation; - }, - - set: function (value) - { - this._rotation = value; - this.dirty = true; - } - - }, - - /** - * The x position of the center of the Camera's viewport, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#centerX - * @type {number} - * @readOnly - * @since 3.10.0 - */ - centerX: { - - get: function () - { - return this.x + (0.5 * this.width); - } - - }, - - /** - * The y position of the center of the Camera's viewport, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#centerY - * @type {number} - * @readOnly - * @since 3.10.0 - */ - centerY: { - - get: function () - { - return this.y + (0.5 * this.height); - } - - }, - - /** - * The displayed width of the camera viewport, factoring in the camera zoom level. - * - * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width - * would be 1600, as it's displaying twice as many pixels as zoom level 1. - * - * Equally, a camera with a width of 800 and zoom of 2 would have a display width - * of 400 pixels. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth - * @type {number} - * @readOnly - * @since 3.11.0 - */ - displayWidth: { - - get: function () - { - return this.width / this.zoom; - } - - }, - - /** - * The displayed height of the camera viewport, factoring in the camera zoom level. - * - * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height - * would be 1200, as it's displaying twice as many pixels as zoom level 1. - * - * Equally, a camera with a height of 600 and zoom of 2 would have a display height - * of 300 pixels. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight - * @type {number} - * @readOnly - * @since 3.11.0 - */ - displayHeight: { - - get: function () - { - return this.height / this.zoom; - } - - } - -}); - -module.exports = BaseCamera; - - /***/ }), /* 290 */ /***/ (function(module, exports) { @@ -68112,7 +68375,7 @@ module.exports = GetPoint; */ var GetPoint = __webpack_require__(137); -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -68912,17 +69175,21 @@ module.exports = ALIGN_CONST; /* 305 */ /***/ (function(module, exports, __webpack_require__) { +/* eslint no-console: 0 */ + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var AdInstance = __webpack_require__(512); var Class = __webpack_require__(0); var DataManager = __webpack_require__(59); var EventEmitter = __webpack_require__(8); -var GetValue = __webpack_require__(3); -var LeaderboardScore = __webpack_require__(507); +var Leaderboard = __webpack_require__(511); +var Product = __webpack_require__(509); +var Purchase = __webpack_require__(508); /** * @classdesc @@ -68943,7 +69210,7 @@ var FacebookInstantGamesPlugin = new Class({ initialize: - function FacebookInstantGamesPlugin (game, config) + function FacebookInstantGamesPlugin (game) { EventEmitter.call(this); @@ -68965,18 +69232,31 @@ var FacebookInstantGamesPlugin = new Class({ this.hasLoaded = false; this.dataLocked = false; - this.apis = []; + this.supportedAPIs = []; + this.entryPoint = ''; this.entryPointData = null; - this.contextID = 0; - this.contextType = ''; - this.locale = ''; - this.platform = ''; - this.version = ''; + this.contextID = null; - this.playerID = ''; - this.playerName = ''; - this.playerPhotoURL = ''; + // POST - A facebook post. + // THREAD - A messenger thread. + // GROUP - A facebook group. + // SOLO - Default context, where the player is the only participant. + this.contextType = null; + this.locale = null; + this.platform = null; + this.version = null; + + this.playerID = null; + this.playerName = null; + this.playerPhotoURL = null; + this.playerCanSubscribeBot = false; + + this.paymentsReady = false; + this.catalog = []; + this.purchases = []; + this.leaderboards = {}; + this.ads = []; }, setDataHandler: function (parent, key, value) @@ -68993,8 +69273,10 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('sdh saved', data); + _this.emit('savedata', data); }); }, @@ -69013,25 +69295,30 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('cdh saved', data); + _this.emit('savedata', data); }); }, showLoadProgress: function (scene) { - scene.load.on('progress', function (value) { + scene.load.on('progress', function (value) + { if (!this.hasLoaded) { console.log(value); + FBInstant.setLoadingProgress(value * 100); } }, this); - scene.load.on('complete', function () { + scene.load.on('complete', function () + { this.hasLoaded = true; @@ -69048,56 +69335,227 @@ var FacebookInstantGamesPlugin = new Class({ { console.log('FBP gameStarted'); - this.apis = FBInstant.getSupportedAPIs(); + var APIs = FBInstant.getSupportedAPIs(); - this.contextID = FBInstant.context.getID(); - this.contextType = FBInstant.context.getType(); - this.locale = FBInstant.getLocale(); - this.platform = FBInstant.getPlatform(); - this.version = FBInstant.getSDKVersion(); + var supported = {}; - this.playerID = FBInstant.player.getID(); - this.playerName = FBInstant.player.getName(); - this.playerPhotoURL = FBInstant.player.getPhoto(); + var dotToUpper = function (match) + { + return match[1].toUpperCase(); + }; + + APIs.forEach(function (api) + { + api = api.replace(/\../g, dotToUpper); + + supported[api] = true; + }); + + this.supportedAPIs = supported; + + console.log(this.supportedAPIs); + + this.getID(); + this.getType(); + this.getLocale(); + this.getPlatform(); + this.getSDKVersion(); + + this.getPlayerID(); + this.getPlayerName(); + this.getPlayerPhotoURL(); var _this = this; - FBInstant.onPause(function() { + FBInstant.onPause(function () + { _this.emit('pause'); }); - FBInstant.getEntryPointAsync().then(function (entrypoint) { - + FBInstant.getEntryPointAsync().then(function (entrypoint) + { _this.entryPoint = entrypoint; _this.entryPointData = FBInstant.getEntryPointData(); + _this.emit('startgame'); + }).catch(function (e) + { + console.warn(e); }); - // this.emit('startgame'); + // Facebook.com and Android 6 only + if (this.supportedAPIs.paymentsPurchaseAsync) + { + FBInstant.payments.onReady(function () + { + console.log('payments ready'); + + _this.paymentsReady = true; + }).catch(function (e) + { + console.warn(e); + }); + } + }, + + checkAPI: function (api) + { + if (!this.supportedAPIs[api]) + { + console.warn(api + ' not supported'); + + return false; + } + else + { + return true; + } + }, + + getID: function () + { + if (!this.contextID && this.supportedAPIs.contextGetID) + { + this.contextID = FBInstant.context.getID(); + } + + return this.contextID; + }, + + getType: function () + { + if (!this.contextType && this.supportedAPIs.contextGetType) + { + this.contextType = FBInstant.context.getType(); + } + + return this.contextType; + }, + + getLocale: function () + { + if (!this.locale && this.supportedAPIs.getLocale) + { + this.locale = FBInstant.getLocale(); + } + + return this.locale; + }, + + getPlatform: function () + { + if (!this.platform && this.supportedAPIs.getPlatform) + { + this.platform = FBInstant.getPlatform(); + } + + return this.platform; + }, + + getSDKVersion: function () + { + if (!this.version && this.supportedAPIs.getSDKVersion) + { + this.version = FBInstant.getSDKVersion(); + } + + return this.version; + }, + + getPlayerID: function () + { + if (!this.playerID && this.supportedAPIs.playerGetID) + { + this.playerID = FBInstant.player.getID(); + } + + return this.playerID; + }, + + getPlayerName: function () + { + if (!this.playerName && this.supportedAPIs.playerGetName) + { + this.playerName = FBInstant.player.getName(); + } + + return this.playerName; + }, + + getPlayerPhotoURL: function () + { + if (!this.playerPhotoURL && this.supportedAPIs.playerGetPhoto) + { + this.playerPhotoURL = FBInstant.player.getPhoto(); + } + + return this.playerPhotoURL; }, loadPlayerPhoto: function (scene, key) { - console.log('load'); + if (this.playerPhotoURL) + { + console.log('load'); - scene.load.setCORS('anonymous'); + scene.load.setCORS('anonymous'); + + scene.load.image(key, this.playerPhotoURL); + + scene.load.on('complete', function () + { + this.emit('photocomplete', key); + }, this); + + scene.load.start(); + } - scene.load.image(key, this.playerPhotoURL); + return this; + }, - scene.load.on('complete', function () { + canSubscribeBot: function () + { + if (this.supportedAPIs.playerCanSubscribeBotAsync) + { + var _this = this; - this.emit('photocomplete', key); + FBInstant.player.canSubscribeBotAsync().then(function () + { + _this.playerCanSubscribeBot = true; - }, this); + _this.emit('cansubscribebot'); + }); + } - scene.load.start(); + return this; + }, + + subscribeBot: function () + { + if (this.playerCanSubscribeBot) + { + var _this = this; + + FBInstant.player.subscribeBotAsync().then(function () + { + _this.emit('subscribebot'); + }).catch(function () + { + _this.emit('subscribebotfailed'); + }); + } return this; }, getData: function (keys) { + if (!this.checkAPI('playerGetDataAsync')) + { + return this; + } + if (!Array.isArray(keys)) { keys = [ keys ]; @@ -69107,8 +69565,8 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.getDataAsync(keys).then(function(data) { - + FBInstant.player.getDataAsync(keys).then(function (data) + { console.log('getdata req', data); _this.dataLocked = true; @@ -69121,7 +69579,6 @@ var FacebookInstantGamesPlugin = new Class({ _this.dataLocked = false; _this.emit('getdata', data); - }); return this; @@ -69129,22 +69586,55 @@ var FacebookInstantGamesPlugin = new Class({ saveData: function (data) { + if (!this.checkAPI('playerSetDataAsync')) + { + return this; + } + var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('data saved to fb'); + _this.emit('savedata', data); }); return this; }, + flushData: function () + { + if (!this.checkAPI('playerFlushDataAsync')) + { + return this; + } + + var _this = this; + + FBInstant.player.flushDataAsync().then(function () + { + console.log('data flushed'); + + _this.emit('flushdata'); + }); + + return this; + }, + getStats: function (keys) { + if (!this.checkAPI('playerGetStatsAsync')) + { + return this; + } + var _this = this; - FBInstant.player.getStatsAsync(keys).then(function(data) { + FBInstant.player.getStatsAsync(keys).then(function (data) + { console.log('stats got from fb'); + _this.emit('getstats', data); }); @@ -69153,6 +69643,11 @@ var FacebookInstantGamesPlugin = new Class({ saveStats: function (data) { + if (!this.checkAPI('playerSetStatsAsync')) + { + return this; + } + var output = {}; for (var key in data) @@ -69165,7 +69660,8 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setStatsAsync(output).then(function() { + FBInstant.player.setStatsAsync(output).then(function () + { console.log('stats saved to fb'); _this.emit('savestats', output); }); @@ -69175,6 +69671,11 @@ var FacebookInstantGamesPlugin = new Class({ incStats: function (data) { + if (!this.checkAPI('playerIncrementStatsAsync')) + { + return this; + } + var output = {}; for (var key in data) @@ -69187,8 +69688,10 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.incrementStatsAsync(output).then(function(stats) { + FBInstant.player.incrementStatsAsync(output).then(function (stats) + { console.log('stats modified'); + _this.emit('incstats', stats); }); @@ -69197,6 +69700,11 @@ var FacebookInstantGamesPlugin = new Class({ saveSession: function (data) { + if (!this.checkAPI('setSessionData')) + { + return this; + } + var test = JSON.stringify(data); if (test.length <= 1000) @@ -69231,26 +69739,13 @@ var FacebookInstantGamesPlugin = new Class({ return this._share('CHALLENGE', text, key, frame, sessionData); }, - createShortcut: function () - { - var _this = this; - - FBInstant.canCreateShortcutAsync().then(function(canCreateShortcut) { - - if (canCreateShortcut) - { - FBInstant.createShortcutAsync().then(function() { - _this.emit('shortcutcreated'); - }).catch(function() { - _this.emit('shortcutfailed'); - }); - } - - }); - }, - _share: function (intent, text, key, frame, sessionData) { + if (!this.checkAPI('shareAsync')) + { + return this; + } + if (sessionData === undefined) { sessionData = {}; } if (key) @@ -69274,15 +69769,318 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.shareAsync(payload).then(function() { + FBInstant.shareAsync(payload).then(function () + { _this.emit('resume'); }); return this; }, + isSizeBetween: function (min, max) + { + if (!this.checkAPI('contextIsSizeBetween')) + { + return this; + } + + return FBInstant.context.isSizeBetween(min, max); + }, + + switchContext: function (contextID) + { + if (!this.checkAPI('contextSwitchAsync')) + { + return this; + } + + if (contextID !== this.contextID) + { + var _this = this; + + FBInstant.context.switchAsync(contextID).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('switch', _this.contextID); + }); + } + + return this; + }, + + chooseContext: function (options) + { + if (!this.checkAPI('contextChoseAsync')) + { + return this; + } + + var _this = this; + + FBInstant.context.chooseAsync(options).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('choose', _this.contextID); + }); + + return this; + }, + + createContext: function (playerID) + { + if (!this.checkAPI('contextCreateAsync')) + { + return this; + } + + var _this = this; + + FBInstant.context.createAsync(playerID).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('create', _this.contextID); + }); + + return this; + }, + + getPlayers: function () + { + if (!this.checkAPI('playerGetConnectedPlayersAsync')) + { + return this; + } + + var _this = this; + + FBInstant.player.getConnectedPlayersAsync().then(function (players) + { + console.log('got player data'); + console.log(players); + + _this.emit('players', players); + }); + + return this; + }, + + getCatalog: function () + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + var catalog = this.catalog; + + FBInstant.payments.getCatalogAsync().then(function (data) + { + console.log('got catalog'); + + catalog = []; + + data.forEach(function (item) + { + + catalog.push(Product(item)); + + }); + + _this.emit('getcatalog', catalog); + }); + + return this; + }, + + purchase: function (productID, developerPayload) + { + if (!this.paymentsReady) + { + return this; + } + + var config = {productID: productID}; + + if (developerPayload) + { + config.developerPayload = developerPayload; + } + + var _this = this; + + FBInstant.payments.purchaseAsync(config).then(function (data) + { + var purchase = Purchase(data); + + console.log('product purchase', purchase); + + _this.emit('purchase', purchase); + }); + + return this; + }, + + getPurchases: function () + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + var purchases = this.purchases; + + FBInstant.payments.getPurchasesAsync().then(function (data) + { + console.log('got purchases'); + + purchases = []; + + data.forEach(function (item) + { + + purchases.push(Purchase(item)); + + }); + + _this.emit('getpurchases', purchases); + }); + + return this; + }, + + consumePurchases: function (purchaseToken) + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + + FBInstant.payments.consumePurchaseAsync(purchaseToken).then(function () + { + console.log('purchase consumed'); + + _this.emit('consumepurchase', purchaseToken); + }); + + return this; + }, + + update: function (cta, text, key, frame, template, updateData) + { + return this._update('CUSTOM', cta, text, key, frame, template, updateData); + }, + + updateLeaderboard: function (cta, text, key, frame, template, updateData) + { + return this._update('LEADERBOARD', cta, text, key, frame, template, updateData); + }, + + _update: function (action, cta, text, key, frame, template, updateData) + { + if (!this.checkAPI('shareAsync')) + { + return this; + } + + if (cta === undefined) { cta = ''; } + + if (typeof text === 'string') + { + text = {default: text}; + } + + if (updateData === undefined) { updateData = {}; } + + if (key) + { + var imageData = this.game.textures.getBase64(key, frame); + } + + var payload = { + action: action, + cta: cta, + image: imageData, + text: text, + template: template, + data: updateData, + strategy: 'IMMEDIATE', + notification: 'NO_PUSH' + }; + + var _this = this; + + FBInstant.updateAsync(payload).then(function () + { + _this.emit('update'); + }); + + return this; + }, + + switchGame: function (appID, data) + { + if (!this.checkAPI('switchGameAsync')) + { + return this; + } + + if (data) + { + var test = JSON.stringify(data); + + if (test.length > 1000) + { + console.warn('Switch Game data too long. Max 1000 chars.'); + return this; + } + } + + var _this = this; + + FBInstant.switchGameAsync(appID, data).then(function () + { + _this.emit('switchgame', appID); + }); + + return this; + }, + + createShortcut: function () + { + var _this = this; + + FBInstant.canCreateShortcutAsync().then(function (canCreateShortcut) + { + if (canCreateShortcut) + { + FBInstant.createShortcutAsync().then(function () + { + _this.emit('shortcutcreated'); + }).catch(function () + { + _this.emit('shortcutfailed'); + }); + } + + }); + }, + + quit: function () + { + FBInstant.quit(); + }, + log: function (name, value, params) { + if (!this.checkAPI('logEvent')) + { + return this; + } + if (params === undefined) { params = {}; } if (name.length >= 2 && name.length <= 40) @@ -69293,6 +70091,232 @@ var FacebookInstantGamesPlugin = new Class({ return this; }, + preloadAds: function (placementID) + { + if (!this.checkAPI('getInterstitialAdAsync')) + { + return this; + } + + if (!Array.isArray(placementID)) + { + placementID = [ placementID ]; + } + + var i; + var _this = this; + + var total = 0; + + for (i = 0; i < this.ads.length; i++) + { + if (!this.ads[i].shown) + { + total++; + } + } + + if (total + placementID.length >= 3) + { + console.warn('Too many AdInstances. Show an ad before loading more'); + return this; + } + + for (i = 0; i < placementID.length; i++) + { + var id = placementID[i]; + + FBInstant.getInterstitialAdAsync(id).then(function (data) + { + console.log('ad preloaded'); + + var ad = AdInstance(data, true); + + _this.ads.push(ad); + + return ad.loadAsync(); + + }).catch(function (e) + { + console.error(e); + }); + } + + return this; + }, + + preloadVideoAds: function (placementID) + { + if (!this.checkAPI('getRewardedVideoAsync')) + { + return this; + } + + if (!Array.isArray(placementID)) + { + placementID = [ placementID ]; + } + + var i; + var _this = this; + + var total = 0; + + for (i = 0; i < this.ads.length; i++) + { + if (!this.ads[i].shown) + { + total++; + } + } + + if (total + placementID.length >= 3) + { + console.warn('Too many AdInstances. Show an ad before loading more'); + return this; + } + + for (i = 0; i < placementID.length; i++) + { + var id = placementID[i]; + + FBInstant.getRewardedVideoAsync(id).then(function (data) + { + console.log('video ad preloaded'); + + var ad = AdInstance(data, true); + + _this.ads.push(ad); + + return ad.loadAsync(); + + }).catch(function (e) + { + console.error(e); + }); + } + + return this; + }, + + showAd: function (placementID) + { + var _this = this; + + for (var i = 0; i < this.ads.length; i++) + { + var ad = this.ads[i]; + + if (ad.placementID === placementID) + { + ad.instance.showAsync().then(function () + { + ad.shown = true; + + _this.emit('showad', ad); + }).catch(function (e) + { + if (e.code === 'ADS_NO_FILL') + { + _this.emit('adsnofill'); + } + else + { + console.error(e); + } + }); + } + } + + return this; + }, + + showVideo: function (placementID) + { + var _this = this; + + for (var i = 0; i < this.ads.length; i++) + { + var ad = this.ads[i]; + + if (ad.placementID === placementID && ad.video) + { + ad.instance.showAsync().then(function () + { + ad.shown = true; + + _this.emit('showvideo', ad); + }).catch(function (e) + { + if (e.code === 'ADS_NO_FILL') + { + _this.emit('adsnofill'); + } + else + { + console.error(e); + } + }); + } + } + + return this; + }, + + matchPlayer: function (matchTag, switchImmediately) + { + if (matchTag === undefined) { matchTag = null; } + if (switchImmediately === undefined) { switchImmediately = false; } + + if (!this.checkAPI('matchPlayerAsync')) + { + return this; + } + + var _this = this; + + FBInstant.matchPlayerAsync(matchTag, switchImmediately).then(function () + { + console.log('match player'); + + _this.getID(); + _this.getType(); + + _this.emit('matchplayer', _this.contextID, _this.contextType); + }); + + return this; + }, + + // TODO: checkCanPlayerMatchAsync ? + + getLeaderboard: function (name) + { + if (!this.checkAPI('getLeaderboardAsync')) + { + return this; + } + + var _this = this; + + FBInstant.getLeaderboardAsync(name).then(function (data) + { + console.log('leaderboard'); + console.log(data); + + var leaderboard = new Leaderboard(_this, data); + + _this.leaderboards[name] = leaderboard; + + _this.emit('getleaderboard', leaderboard); + }).catch(function (e) + { + console.warn(e); + }); + + return this; + }, + /** * Destroys the FacebookInstantGamesPlugin. * @@ -70370,9 +71394,9 @@ module.exports = Animation; */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(168); +var NumberTweenBuilder = __webpack_require__(169); var PluginCache = __webpack_require__(10); -var TimelineBuilder = __webpack_require__(167); +var TimelineBuilder = __webpack_require__(168); var TWEEN_CONST = __webpack_require__(62); var TweenBuilder = __webpack_require__(72); @@ -71131,12 +72155,12 @@ module.exports = { GetBoolean: __webpack_require__(63), GetEaseFunction: __webpack_require__(64), GetNewValue: __webpack_require__(73), - GetProps: __webpack_require__(170), - GetTargets: __webpack_require__(103), - GetTweens: __webpack_require__(169), - GetValueOp: __webpack_require__(102), - NumberTweenBuilder: __webpack_require__(168), - TimelineBuilder: __webpack_require__(167), + GetProps: __webpack_require__(171), + GetTargets: __webpack_require__(104), + GetTweens: __webpack_require__(170), + GetValueOp: __webpack_require__(103), + NumberTweenBuilder: __webpack_require__(169), + TimelineBuilder: __webpack_require__(168), TweenBuilder: __webpack_require__(72) }; @@ -71164,9 +72188,9 @@ var Tweens = { Builders: __webpack_require__(309), TweenManager: __webpack_require__(307), - Tween: __webpack_require__(100), - TweenData: __webpack_require__(99), - Timeline: __webpack_require__(166) + Tween: __webpack_require__(101), + TweenData: __webpack_require__(100), + Timeline: __webpack_require__(167) }; @@ -71188,7 +72212,7 @@ module.exports = Tweens; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(10); -var TimerEvent = __webpack_require__(171); +var TimerEvent = __webpack_require__(172); /** * @classdesc @@ -71587,7 +72611,7 @@ module.exports = Clock; module.exports = { Clock: __webpack_require__(311), - TimerEvent: __webpack_require__(171) + TimerEvent: __webpack_require__(172) }; @@ -71603,10 +72627,10 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); var GameObject = __webpack_require__(15); -var StaticTilemapLayerRender = __webpack_require__(631); +var StaticTilemapLayerRender = __webpack_require__(636); var TilemapComponents = __webpack_require__(143); var Utils = __webpack_require__(21); @@ -72813,8 +73837,8 @@ module.exports = StaticTilemapLayer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var DynamicTilemapLayerRender = __webpack_require__(634); +var Components = __webpack_require__(13); +var DynamicTilemapLayerRender = __webpack_require__(639); var GameObject = __webpack_require__(15); var TilemapComponents = __webpack_require__(143); @@ -74059,8 +75083,8 @@ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(39); var DynamicTilemapLayer = __webpack_require__(314); var Extend = __webpack_require__(17); -var Formats = __webpack_require__(27); -var LayerData = __webpack_require__(105); +var Formats = __webpack_require__(28); +var LayerData = __webpack_require__(106); var Rotate = __webpack_require__(350); var StaticTilemapLayer = __webpack_require__(313); var Tile = __webpack_require__(66); @@ -76333,10 +77357,10 @@ module.exports = Tilemap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(636); -var ParseTilesets = __webpack_require__(635); +var Formats = __webpack_require__(28); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(641); +var ParseTilesets = __webpack_require__(640); /** * @namespace Phaser.Tilemaps.Parsers.Impact @@ -76510,7 +77534,7 @@ module.exports = ObjectLayer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Pick = __webpack_require__(640); +var Pick = __webpack_require__(645); var ParseGID = __webpack_require__(320); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -76854,14 +77878,14 @@ module.exports = ParseGID; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(644); -var ParseImageLayers = __webpack_require__(642); -var ParseTilesets = __webpack_require__(641); -var ParseObjectLayers = __webpack_require__(639); -var BuildTilesetIndex = __webpack_require__(638); -var AssignTileProperties = __webpack_require__(637); +var Formats = __webpack_require__(28); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(649); +var ParseImageLayers = __webpack_require__(647); +var ParseTilesets = __webpack_require__(646); +var ParseObjectLayers = __webpack_require__(644); +var BuildTilesetIndex = __webpack_require__(643); +var AssignTileProperties = __webpack_require__(642); /** * @namespace Phaser.Tilemaps.Parsers.Tiled @@ -76934,8 +77958,8 @@ module.exports = ParseJSONTiled; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var Parse2DArray = __webpack_require__(223); +var Formats = __webpack_require__(28); +var Parse2DArray = __webpack_require__(225); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -76982,8 +78006,8 @@ module.exports = ParseCSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var Parse2DArray = __webpack_require__(223); +var Formats = __webpack_require__(28); +var Parse2DArray = __webpack_require__(225); var ParseCSV = __webpack_require__(322); var ParseJSONTiled = __webpack_require__(321); var ParseWeltmeister = __webpack_require__(316); @@ -77053,8 +78077,8 @@ module.exports = Parse; */ var Tile = __webpack_require__(66); -var IsInLayerBounds = __webpack_require__(106); -var CalculateFacesAt = __webpack_require__(226); +var IsInLayerBounds = __webpack_require__(107); +var CalculateFacesAt = __webpack_require__(228); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -77114,7 +78138,7 @@ module.exports = RemoveTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var IsInLayerBounds = __webpack_require__(106); +var IsInLayerBounds = __webpack_require__(107); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -77157,7 +78181,7 @@ module.exports = HasTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching @@ -77265,11 +78289,11 @@ var FilterMode = __webpack_require__(327); var Textures = { FilterMode: FilterMode, - Frame: __webpack_require__(94), - Parsers: __webpack_require__(189), - Texture: __webpack_require__(120), - TextureManager: __webpack_require__(191), - TextureSource: __webpack_require__(190) + Frame: __webpack_require__(95), + Parsers: __webpack_require__(190), + Texture: __webpack_require__(121), + TextureManager: __webpack_require__(192), + TextureSource: __webpack_require__(191) }; @@ -77294,10 +78318,10 @@ module.exports = Textures; module.exports = { - List: __webpack_require__(93), + List: __webpack_require__(94), Map: __webpack_require__(127), - ProcessQueue: __webpack_require__(229), - RTree: __webpack_require__(228), + ProcessQueue: __webpack_require__(231), + RTree: __webpack_require__(230), Set: __webpack_require__(70) }; @@ -77345,19 +78369,19 @@ module.exports = { module.exports = { - SoundManagerCreator: __webpack_require__(198), + SoundManagerCreator: __webpack_require__(199), BaseSound: __webpack_require__(78), BaseSoundManager: __webpack_require__(79), - WebAudioSound: __webpack_require__(192), - WebAudioSoundManager: __webpack_require__(193), + WebAudioSound: __webpack_require__(193), + WebAudioSoundManager: __webpack_require__(194), - HTML5AudioSound: __webpack_require__(196), - HTML5AudioSoundManager: __webpack_require__(197), + HTML5AudioSound: __webpack_require__(197), + HTML5AudioSoundManager: __webpack_require__(198), - NoAudioSound: __webpack_require__(194), - NoAudioSoundManager: __webpack_require__(195) + NoAudioSound: __webpack_require__(195), + NoAudioSoundManager: __webpack_require__(196) }; @@ -78365,10 +79389,10 @@ var Extend = __webpack_require__(17); var Scene = { - SceneManager: __webpack_require__(201), + SceneManager: __webpack_require__(202), ScenePlugin: __webpack_require__(331), - Settings: __webpack_require__(199), - Systems: __webpack_require__(121) + Settings: __webpack_require__(200), + Systems: __webpack_require__(122) }; @@ -78388,7 +79412,7 @@ module.exports = Scene; * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(172); +var BasePlugin = __webpack_require__(173); var Class = __webpack_require__(0); /** @@ -78501,10 +79525,10 @@ module.exports = ScenePlugin; module.exports = { - BasePlugin: __webpack_require__(172), - DefaultPlugins: __webpack_require__(123), + BasePlugin: __webpack_require__(173), + DefaultPlugins: __webpack_require__(124), PluginCache: __webpack_require__(10), - PluginManager: __webpack_require__(203), + PluginManager: __webpack_require__(204), ScenePlugin: __webpack_require__(333) }; @@ -78526,7 +79550,7 @@ module.exports = { var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); var Vector2 = __webpack_require__(4); /** @@ -79885,10 +80909,10 @@ module.exports = Collider; var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); -var RadToDeg = __webpack_require__(154); +var RadToDeg = __webpack_require__(155); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(31); -var TransformMatrix = __webpack_require__(32); +var RectangleContains = __webpack_require__(32); +var TransformMatrix = __webpack_require__(27); var Vector2 = __webpack_require__(4); /** @@ -81333,6 +82357,8 @@ var Body = new Class({ { this.velocity.set(x, y); + this.speed = Math.sqrt(x * x + y * y); + return this; }, @@ -81350,6 +82376,11 @@ var Body = new Class({ { this.velocity.x = value; + var vx = value; + var vy = this.velocity.y; + + this.speed = Math.sqrt(vx * vx + vy * vy); + return this; }, @@ -81367,6 +82398,11 @@ var Body = new Class({ { this.velocity.y = value; + var vx = this.velocity.x; + var vy = value; + + this.speed = Math.sqrt(vx * vx + vy * vy); + return this; }, @@ -81933,13 +82969,13 @@ var FuzzyLessThan = __webpack_require__(354); var GetOverlapX = __webpack_require__(341); var GetOverlapY = __webpack_require__(340); var GetValue = __webpack_require__(3); -var ProcessQueue = __webpack_require__(229); -var ProcessTileCallbacks = __webpack_require__(696); +var ProcessQueue = __webpack_require__(231); +var ProcessTileCallbacks = __webpack_require__(701); var Rectangle = __webpack_require__(11); -var RTree = __webpack_require__(228); -var SeparateTile = __webpack_require__(695); -var SeparateX = __webpack_require__(690); -var SeparateY = __webpack_require__(689); +var RTree = __webpack_require__(230); +var SeparateTile = __webpack_require__(700); +var SeparateX = __webpack_require__(695); +var SeparateY = __webpack_require__(694); var Set = __webpack_require__(70); var StaticBody = __webpack_require__(338); var TileIntersectsBody = __webpack_require__(339); @@ -84249,7 +85285,7 @@ module.exports = World; var ArcadeSprite = __webpack_require__(144); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); -var Group = __webpack_require__(113); +var Group = __webpack_require__(114); var IsPlainObject = __webpack_require__(7); /** @@ -84415,7 +85451,7 @@ var ArcadeSprite = __webpack_require__(144); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); var GetFastValue = __webpack_require__(1); -var Group = __webpack_require__(113); +var Group = __webpack_require__(114); var IsPlainObject = __webpack_require__(7); /** @@ -84722,18 +85758,18 @@ module.exports = PhysicsGroup; module.exports = { - Acceleration: __webpack_require__(708), - Angular: __webpack_require__(707), - Bounce: __webpack_require__(706), - Debug: __webpack_require__(705), - Drag: __webpack_require__(704), - Enable: __webpack_require__(703), - Friction: __webpack_require__(702), - Gravity: __webpack_require__(701), - Immovable: __webpack_require__(700), - Mass: __webpack_require__(699), - Size: __webpack_require__(698), - Velocity: __webpack_require__(697) + Acceleration: __webpack_require__(713), + Angular: __webpack_require__(712), + Bounce: __webpack_require__(711), + Debug: __webpack_require__(710), + Drag: __webpack_require__(709), + Enable: __webpack_require__(708), + Friction: __webpack_require__(707), + Gravity: __webpack_require__(706), + Immovable: __webpack_require__(705), + Mass: __webpack_require__(704), + Size: __webpack_require__(703), + Velocity: __webpack_require__(702) }; @@ -87096,7 +88132,7 @@ var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -87427,12 +88463,12 @@ module.exports = MultiAtlasFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AudioFile = __webpack_require__(175); +var AudioFile = __webpack_require__(176); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -87733,7 +88769,7 @@ var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -87992,7 +89028,7 @@ module.exports = AtlasJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); /** * @classdesc @@ -88199,7 +89235,7 @@ module.exports = AnimationJSONFile; /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(204) + TouchManager: __webpack_require__(205) }; /* eslint-enable */ @@ -88222,7 +89258,7 @@ module.exports = { /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(206) + MouseManager: __webpack_require__(207) }; /* eslint-enable */ @@ -88497,7 +89533,7 @@ module.exports = ProcessKeyDown; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var KeyCodes = __webpack_require__(110); +var KeyCodes = __webpack_require__(111); var KeyMap = {}; @@ -88681,9 +89717,9 @@ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var GetValue = __webpack_require__(3); var InputPluginCache = __webpack_require__(76); -var Key = __webpack_require__(178); -var KeyCodes = __webpack_require__(110); -var KeyCombo = __webpack_require__(177); +var Key = __webpack_require__(179); +var KeyCodes = __webpack_require__(111); +var KeyCombo = __webpack_require__(178); var KeyMap = __webpack_require__(374); var ProcessKeyDown = __webpack_require__(373); var ProcessKeyUp = __webpack_require__(372); @@ -89319,10 +90355,10 @@ module.exports = { KeyboardPlugin: __webpack_require__(378), - Key: __webpack_require__(178), - KeyCodes: __webpack_require__(110), + Key: __webpack_require__(179), + KeyCodes: __webpack_require__(111), - KeyCombo: __webpack_require__(177), + KeyCombo: __webpack_require__(178), JustDown: __webpack_require__(371), JustUp: __webpack_require__(370), @@ -89378,13 +90414,13 @@ module.exports = CreatePixelPerfectHandler; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); -var CreateInteractiveObject = __webpack_require__(182); +var CreateInteractiveObject = __webpack_require__(183); var CreatePixelPerfectHandler = __webpack_require__(380); var DistanceBetween = __webpack_require__(58); -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); var EllipseContains = __webpack_require__(55); var EventEmitter = __webpack_require__(8); var GetFastValue = __webpack_require__(1); @@ -89392,7 +90428,7 @@ var InputPluginCache = __webpack_require__(76); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(10); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); var Triangle = __webpack_require__(68); var TriangleContains = __webpack_require__(61); @@ -91910,7 +92946,7 @@ module.exports = { var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); -var Gamepad = __webpack_require__(179); +var Gamepad = __webpack_require__(180); var GetValue = __webpack_require__(3); var InputPluginCache = __webpack_require__(76); @@ -92557,9 +93593,9 @@ module.exports = GamepadPlugin; module.exports = { - Axis: __webpack_require__(181), - Button: __webpack_require__(180), - Gamepad: __webpack_require__(179), + Axis: __webpack_require__(182), + Button: __webpack_require__(181), + Gamepad: __webpack_require__(180), GamepadPlugin: __webpack_require__(386), Configs: __webpack_require__(385) @@ -92576,7 +93612,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(207); +var CONST = __webpack_require__(208); var Extend = __webpack_require__(17); /** @@ -92585,14 +93621,14 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(182), + CreateInteractiveObject: __webpack_require__(183), Gamepad: __webpack_require__(387), - InputManager: __webpack_require__(208), + InputManager: __webpack_require__(209), InputPlugin: __webpack_require__(381), InputPluginCache: __webpack_require__(76), Keyboard: __webpack_require__(379), Mouse: __webpack_require__(367), - Pointer: __webpack_require__(205), + Pointer: __webpack_require__(206), Touch: __webpack_require__(366) }; @@ -92805,41 +93841,41 @@ module.exports = ContainsRect; var Rectangle = __webpack_require__(11); -Rectangle.Area = __webpack_require__(803); -Rectangle.Ceil = __webpack_require__(802); -Rectangle.CeilAll = __webpack_require__(801); -Rectangle.CenterOn = __webpack_require__(157); -Rectangle.Clone = __webpack_require__(800); -Rectangle.Contains = __webpack_require__(31); -Rectangle.ContainsPoint = __webpack_require__(799); +Rectangle.Area = __webpack_require__(808); +Rectangle.Ceil = __webpack_require__(807); +Rectangle.CeilAll = __webpack_require__(806); +Rectangle.CenterOn = __webpack_require__(158); +Rectangle.Clone = __webpack_require__(805); +Rectangle.Contains = __webpack_require__(32); +Rectangle.ContainsPoint = __webpack_require__(804); Rectangle.ContainsRect = __webpack_require__(392); -Rectangle.CopyFrom = __webpack_require__(798); +Rectangle.CopyFrom = __webpack_require__(803); Rectangle.Decompose = __webpack_require__(399); -Rectangle.Equals = __webpack_require__(797); -Rectangle.FitInside = __webpack_require__(796); -Rectangle.FitOutside = __webpack_require__(795); -Rectangle.Floor = __webpack_require__(794); -Rectangle.FloorAll = __webpack_require__(793); -Rectangle.FromPoints = __webpack_require__(266); -Rectangle.GetAspectRatio = __webpack_require__(234); -Rectangle.GetCenter = __webpack_require__(792); +Rectangle.Equals = __webpack_require__(802); +Rectangle.FitInside = __webpack_require__(801); +Rectangle.FitOutside = __webpack_require__(800); +Rectangle.Floor = __webpack_require__(799); +Rectangle.FloorAll = __webpack_require__(798); +Rectangle.FromPoints = __webpack_require__(267); +Rectangle.GetAspectRatio = __webpack_require__(236); +Rectangle.GetCenter = __webpack_require__(797); Rectangle.GetPoint = __webpack_require__(137); Rectangle.GetPoints = __webpack_require__(297); -Rectangle.GetSize = __webpack_require__(791); -Rectangle.Inflate = __webpack_require__(790); -Rectangle.Intersection = __webpack_require__(789); -Rectangle.MarchingAnts = __webpack_require__(577); -Rectangle.MergePoints = __webpack_require__(788); -Rectangle.MergeRect = __webpack_require__(787); -Rectangle.MergeXY = __webpack_require__(786); -Rectangle.Offset = __webpack_require__(785); -Rectangle.OffsetPoint = __webpack_require__(784); -Rectangle.Overlaps = __webpack_require__(783); -Rectangle.Perimeter = __webpack_require__(98); -Rectangle.PerimeterPoint = __webpack_require__(782); -Rectangle.Random = __webpack_require__(161); -Rectangle.RandomOutside = __webpack_require__(781); -Rectangle.Scale = __webpack_require__(780); +Rectangle.GetSize = __webpack_require__(796); +Rectangle.Inflate = __webpack_require__(795); +Rectangle.Intersection = __webpack_require__(794); +Rectangle.MarchingAnts = __webpack_require__(582); +Rectangle.MergePoints = __webpack_require__(793); +Rectangle.MergeRect = __webpack_require__(792); +Rectangle.MergeXY = __webpack_require__(791); +Rectangle.Offset = __webpack_require__(790); +Rectangle.OffsetPoint = __webpack_require__(789); +Rectangle.Overlaps = __webpack_require__(788); +Rectangle.Perimeter = __webpack_require__(99); +Rectangle.PerimeterPoint = __webpack_require__(787); +Rectangle.Random = __webpack_require__(162); +Rectangle.RandomOutside = __webpack_require__(786); +Rectangle.Scale = __webpack_require__(785); Rectangle.Union = __webpack_require__(446); module.exports = Rectangle; @@ -92856,7 +93892,7 @@ module.exports = Rectangle; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(235); +var Contains = __webpack_require__(237); /** * @classdesc @@ -93320,20 +94356,20 @@ module.exports = LineToCircle; module.exports = { - CircleToCircle: __webpack_require__(850), - CircleToRectangle: __webpack_require__(849), - GetRectangleIntersection: __webpack_require__(848), + CircleToCircle: __webpack_require__(855), + CircleToRectangle: __webpack_require__(854), + GetRectangleIntersection: __webpack_require__(853), LineToCircle: __webpack_require__(401), LineToLine: __webpack_require__(147), - LineToRectangle: __webpack_require__(847), + LineToRectangle: __webpack_require__(852), PointToLine: __webpack_require__(400), - PointToLineSegment: __webpack_require__(846), - RectangleToRectangle: __webpack_require__(238), - RectangleToTriangle: __webpack_require__(845), - RectangleToValues: __webpack_require__(844), - TriangleToCircle: __webpack_require__(843), - TriangleToLine: __webpack_require__(842), - TriangleToTriangle: __webpack_require__(841) + PointToLineSegment: __webpack_require__(851), + RectangleToRectangle: __webpack_require__(240), + RectangleToTriangle: __webpack_require__(850), + RectangleToValues: __webpack_require__(849), + TriangleToCircle: __webpack_require__(848), + TriangleToLine: __webpack_require__(847), + TriangleToTriangle: __webpack_require__(846) }; @@ -93354,14 +94390,14 @@ module.exports = { module.exports = { - Circle: __webpack_require__(860), - Ellipse: __webpack_require__(244), + Circle: __webpack_require__(865), + Ellipse: __webpack_require__(246), Intersects: __webpack_require__(402), - Line: __webpack_require__(840), - Point: __webpack_require__(822), - Polygon: __webpack_require__(808), + Line: __webpack_require__(845), + Point: __webpack_require__(827), + Polygon: __webpack_require__(813), Rectangle: __webpack_require__(393), - Triangle: __webpack_require__(779) + Triangle: __webpack_require__(784) }; @@ -93989,9 +95025,9 @@ module.exports = Light; */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Text = __webpack_require__(111); +var Text = __webpack_require__(112); /** * Creates a new Text Game Object and returns it. @@ -94077,7 +95113,7 @@ GameObjectCreator.register('text', function (config, addToScene) var BuildGameObject = __webpack_require__(25); var BuildGameObjectAnimation = __webpack_require__(130); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var Sprite = __webpack_require__(35); @@ -94137,7 +95173,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var Image = __webpack_require__(69); @@ -94186,8 +95222,8 @@ GameObjectCreator.register('image', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); -var Graphics = __webpack_require__(117); +var GameObjectCreator = __webpack_require__(14); +var Graphics = __webpack_require__(118); /** * Creates a new Graphics Game Object and returns it. @@ -94234,7 +95270,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Text = __webpack_require__(111); +var Text = __webpack_require__(112); var GameObjectFactory = __webpack_require__(9); /** @@ -94365,7 +95401,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Graphics = __webpack_require__(117); +var Graphics = __webpack_require__(118); var GameObjectFactory = __webpack_require__(9); /** @@ -94434,7 +95470,7 @@ module.exports = GetPowerOfTwo; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Calculates the ascent, descent and fontSize of a given font style. @@ -96783,14 +97819,14 @@ module.exports = DeathZone; var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var DeathZone = __webpack_require__(426); var EdgeZone = __webpack_require__(425); -var EmitterOp = __webpack_require__(904); +var EmitterOp = __webpack_require__(909); var GetFastValue = __webpack_require__(1); var GetRandom = __webpack_require__(150); var HasAny = __webpack_require__(424); -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); var Particle = __webpack_require__(428); var RandomZone = __webpack_require__(423); var Rectangle = __webpack_require__(11); @@ -99854,7 +100890,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(116); +var Commands = __webpack_require__(117); var Utils = __webpack_require__(21); // TODO: Remove the use of this @@ -100193,12 +101229,12 @@ if (true) renderWebGL = __webpack_require__(433); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(183); + renderCanvas = __webpack_require__(184); } if (true) { - renderCanvas = __webpack_require__(183); + renderCanvas = __webpack_require__(184); } module.exports = { @@ -100462,7 +101498,7 @@ module.exports = ContainsPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -100526,7 +101562,7 @@ module.exports = Area; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CSSBlendModes = __webpack_require__(909); +var CSSBlendModes = __webpack_require__(914); var GameObject = __webpack_require__(15); /** @@ -100557,9 +101593,9 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca return; } - var camMatrix = renderer.pipelines.TextureTintPipeline._tempMatrix1; - var spriteMatrix = renderer.pipelines.TextureTintPipeline._tempMatrix2; - var calcMatrix = renderer.pipelines.TextureTintPipeline._tempMatrix3; + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; var x = src.originX * src.width; var y = src.originY * src.height; @@ -100602,10 +101638,11 @@ module.exports = DOMElementCSSRenderer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var DOMElementRender = __webpack_require__(910); +var Components = __webpack_require__(13); +var DOMElementRender = __webpack_require__(915); var GameObject = __webpack_require__(15); -var Vector4 = __webpack_require__(155); +var RemoveFromDOM = __webpack_require__(153); +var Vector4 = __webpack_require__(156); /** * @classdesc @@ -100852,6 +101889,10 @@ var DOMElement = new Class({ if (this.node) { this.node.innerText = text; + + var nodeBounds = this.node.getBoundingClientRect(); + + this.setSize(nodeBounds.width, nodeBounds.height); } return this; @@ -100862,6 +101903,10 @@ var DOMElement = new Class({ if (this.node) { this.node.innerHTML = html; + + var nodeBounds = this.node.getBoundingClientRect(); + + this.setSize(nodeBounds.width, nodeBounds.height); } return this; @@ -100884,7 +101929,7 @@ var DOMElement = new Class({ destroy: function () { - + RemoveFromDOM(this.node); } }); @@ -101447,7 +102492,7 @@ module.exports = Swap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Scans the array for elements with the given property. If found, the property is set to the `value`. @@ -101621,7 +102666,7 @@ module.exports = RemoveRandomElement; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Removes the item within the given range in the array. @@ -101735,7 +102780,7 @@ module.exports = RemoveAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RoundAwayFromZero = __webpack_require__(249); +var RoundAwayFromZero = __webpack_require__(251); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -102007,7 +103052,7 @@ module.exports = MoveDown; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns the first element in the array. @@ -102066,7 +103111,7 @@ module.exports = GetFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns all elements in the array. @@ -102128,7 +103173,7 @@ module.exports = GetAll; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Passes each element in the array, between the start and end indexes, to the given callback. @@ -102230,7 +103275,7 @@ module.exports = Each; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns the total number of elements in the array which have a property matching the given value. @@ -102711,7 +103756,7 @@ module.exports = ReverseColumns; */ var Pad = __webpack_require__(135); -var CheckMatrix = __webpack_require__(119); +var CheckMatrix = __webpack_require__(120); // Generates a string (which you can pass to console.log) from the given // Array Matrix. @@ -102797,7 +103842,7 @@ module.exports = MatrixToString; module.exports = { - CheckMatrix: __webpack_require__(119), + CheckMatrix: __webpack_require__(120), MatrixToString: __webpack_require__(474), ReverseColumns: __webpack_require__(473), ReverseRows: __webpack_require__(472), @@ -102805,7 +103850,7 @@ module.exports = { RotateLeft: __webpack_require__(470), RotateMatrix: __webpack_require__(77), RotateRight: __webpack_require__(469), - TransposeMatrix: __webpack_require__(188) + TransposeMatrix: __webpack_require__(189) }; @@ -102821,7 +103866,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var List = __webpack_require__(93); +var List = __webpack_require__(94); var PluginCache = __webpack_require__(10); var StableSort = __webpack_require__(83); @@ -103199,7 +104244,7 @@ module.exports = VisibilityHandler; var Class = __webpack_require__(0); var GetValue = __webpack_require__(3); var NOOP = __webpack_require__(2); -var RequestAnimationFrame = __webpack_require__(260); +var RequestAnimationFrame = __webpack_require__(262); // Frame Rate config // fps: { @@ -104704,7 +105749,7 @@ module.exports = AtlasXML; var Class = __webpack_require__(0); var IsSizePowerOfTwo = __webpack_require__(84); -var Texture = __webpack_require__(120); +var Texture = __webpack_require__(121); /** * @classdesc @@ -105015,7 +106060,7 @@ module.exports = GetScenePlugins; */ var GetFastValue = __webpack_require__(1); -var UppercaseFirst = __webpack_require__(250); +var UppercaseFirst = __webpack_require__(252); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -105068,6 +106113,305 @@ module.exports = GetPhysicsPlugins; /***/ }), /* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Vec2 = __webpack_require__(4); + +/* + Use `scaleMode` SHOW_ALL. + Use `scaleMode` EXACT_FIT. + Use `scaleMode` USER_SCALE. Examine `parentBounds` in the {@link #setResizeCallback resize callback} and call {@link #setUserScale} if necessary. + Use `scaleMode` RESIZE. Examine the game or canvas size from the {@link #onSizeChange} signal **or** the {@link Phaser.State#resize} callback and reposition game objects if necessary. + + Canvas width / height in the element + Canvas CSS width / height in the style + + Detect orientation + Lock orientation (Android only?) + Full-screen support + + Scale Mode - +*/ + +/** + * @classdesc + * [description] + * + * @class ScaleManager + * @memberOf Phaser.Boot + * @constructor + * @since 3.12.0 + * + * @param {Phaser.Game} game - A reference to the Phaser.Game instance. + * @param {ScaleManagerConfig} config + */ +var ScaleManager = new Class({ + + initialize: + + function ScaleManager (game, config) + { + /** + * A reference to the Phaser.Game instance. + * + * @name Phaser.Boot.ScaleManager#game + * @type {Phaser.Game} + * @readOnly + * @since 3.12.0 + */ + this.game = game; + + this.config = config; + + /** + * Target width (in pixels) of the Display canvas. + * @property {number} width + * @readonly + */ + this.width = 0; + + /** + * Target height (in pixels) of the Display canvas. + * @property {number} height + * @readonly + */ + this.height = 0; + + this.zoom = 0; + + this.resolution = 1; + + this.parent = null; + + this.scaleMode = 0; + + /** + * Minimum width the canvas should be scaled to (in pixels). + * Change with {@link #setMinMax}. + * @property {?number} minWidth + * @readonly + * @protected + */ + this.minWidth = null; + + /** + * Minimum height the canvas should be scaled to (in pixels). + * Change with {@link #setMinMax}. + * @property {?number} minHeight + * @readonly + * @protected + */ + this.minHeight = null; + + /** + * Maximum width the canvas should be scaled to (in pixels). + * If null it will scale to whatever width the browser can handle. + * Change with {@link #setMinMax}. + * @property {?number} maxWidth + * @readonly + * @protected + */ + this.maxWidth = null; + + /** + * Maximum height the canvas should be scaled to (in pixels). + * If null it will scale to whatever height the browser can handle. + * Change with {@link #setMinMax}. + * @property {?number} maxHeight + * @readonly + * @protected + */ + this.maxHeight = null; + + /** + * The _current_ scale factor based on the game dimensions vs. the scaled dimensions. + * @property {Phaser.Point} scaleFactor + * @readonly + */ + this.scaleFactor = new Vec2(1, 1); + + /** + * The _current_ inversed scale factor. The displayed dimensions divided by the game dimensions. + * @property {Phaser.Point} scaleFactorInversed + * @readonly + * @protected + */ + this.scaleFactorInversed = new Vec2(1, 1); + + /** + * The aspect ratio of the scaled Display canvas. + * @property {number} aspectRatio + * @readonly + */ + this.aspectRatio = 0; + + /** + * The aspect ratio of the original game dimensions. + * @property {number} sourceAspectRatio + * @readonly + */ + this.sourceAspectRatio = 0; + + /** + * True if the the browser window (instead of the display canvas's DOM parent) should be used as the bounding parent. + * + * This is set automatically based on the `parent` argument passed to {@link Phaser.Game}. + * + * The {@link #parentNode} property is generally ignored while this is in effect. + * + * @property {boolean} parentIsWindow + */ + this.parentIsWindow = false; + + /** + * The _original_ DOM element for the parent of the Display canvas. + * This may be different in fullscreen - see {@link #createFullScreenTarget}. + * + * This is set automatically based on the `parent` argument passed to {@link Phaser.Game}. + * + * This should only be changed after moving the Game canvas to a different DOM parent. + * + * @property {?DOMElement} parentNode + */ + this.parentNode = null; + + /** + * The scale of the game in relation to its parent container. + * @property {Phaser.Point} parentScaleFactor + * @readonly + */ + this.parentScaleFactor = new Vec2(1, 1); + + this._lastParentWidth = 0; + + this._lastParentHeight = 0; + + this._innerHeight = 0; + + this.init(); + }, + + init: function () + { + this._innerHeight = this.getInnerHeight(); + + // var gameWidth = this.config.width; + // var gameHeight = this.config.height; + }, + + centerDisplay: function () + { + var height = this.height; + var gameWidth = 0; + var gameHeight = 0; + + this.parentNode.style.display = 'flex'; + this.parentNode.style.height = height + 'px'; + + this.canvas.style.margin = 'auto'; + this.canvas.style.width = gameWidth + 'px'; + this.canvas.style.height = gameHeight + 'px'; + }, + + /* + iOS10 Resize hack. Thanks, Apple. + + I._onWindowResize = function(a) { + if (this._lastReportedWidth != document.body.offsetWidth) { + this._lastReportedWidth = document.body.offsetWidth; + if (this._isAutoPlaying && this._cancelAutoPlayOnInteraction) { + this.stopAutoPlay(a) + } + window.clearTimeout(this._onResizeDebouncedTimeout); + this._onResizeDebouncedTimeout = setTimeout(this._onResizeDebounced, 500); + aj._onWindowResize.call(this, a) + } + }; + */ + + resizeHandler: function () + { + + }, + + /* + resize: function () + { + let scale = Math.min(window.innerWidth / canvas.width, window.innerHeight / canvas.height); + let orientation = 'left'; + let extra = (this.mobile) ? 'margin-left: -50%': ''; + let margin = window.innerWidth / 2 - (canvas.width / 2) * scale; + + canvas.setAttribute('style', '-ms-transform-origin: ' + orientation + ' top; -webkit-transform-origin: ' + orientation + ' top;' + + ' -moz-transform-origin: ' + orientation + ' top; -o-transform-origin: ' + orientation + ' top; transform-origin: ' + orientation + ' top;' + + ' -ms-transform: scale(' + scale + '); -webkit-transform: scale3d(' + scale + ', 1);' + + ' -moz-transform: scale(' + scale + '); -o-transform: scale(' + scale + '); transform: scale(' + scale + ');' + + ' display: block; margin-left: ' + margin + 'px;' + ); + }, + */ + + getInnerHeight: function () + { + // Based on code by @tylerjpeterson + + if (!this.game.device.os.iOS) + { + return window.innerHeight; + } + + var axis = Math.abs(window.orientation); + + var size = { w: 0, h: 0 }; + + var ruler = document.createElement('div'); + + ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0'); + + document.documentElement.appendChild(ruler); + + size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth; + size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight; + + document.documentElement.removeChild(ruler); + + ruler = null; + + if (Math.abs(window.orientation) !== 90) + { + return size.h; + } + else + { + return size.w; + } + }, + + /** + * Destroys the ScaleManager. + * + * @method Phaser.Boot.ScaleManager#destroy + * @since 3.12.0 + */ + destroy: function () + { + this.game = null; + } + +}); + +module.exports = ScaleManager; + + +/***/ }), +/* 492 */ /***/ (function(module, exports) { /** @@ -105165,7 +106509,7 @@ module.exports = init(); /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports) { /** @@ -105250,7 +106594,7 @@ module.exports = init(); /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105375,7 +106719,7 @@ module.exports = init(); /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105454,7 +106798,7 @@ module.exports = init(); /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105490,18 +106834,18 @@ module.exports = { os: __webpack_require__(57), browser: __webpack_require__(81), - features: __webpack_require__(122), - input: __webpack_require__(494), - audio: __webpack_require__(493), - video: __webpack_require__(492), - fullscreen: __webpack_require__(491), - canvasFeatures: __webpack_require__(209) + features: __webpack_require__(123), + input: __webpack_require__(495), + audio: __webpack_require__(494), + video: __webpack_require__(493), + fullscreen: __webpack_require__(492), + canvasFeatures: __webpack_require__(210) }; /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105510,7 +106854,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -105629,7 +106973,7 @@ module.exports = DebugHeader; /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports) { module.exports = [ @@ -105664,7 +107008,7 @@ module.exports = [ /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, exports) { module.exports = [ @@ -105707,7 +107051,7 @@ module.exports = [ /***/ }), -/* 499 */ +/* 500 */ /***/ (function(module, exports) { /** @@ -106298,7 +107642,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 500 */ +/* 501 */ /***/ (function(module, exports) { module.exports = [ @@ -106356,7 +107700,7 @@ module.exports = [ /***/ }), -/* 501 */ +/* 502 */ /***/ (function(module, exports) { module.exports = [ @@ -106375,7 +107719,7 @@ module.exports = [ /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports) { module.exports = [ @@ -106411,7 +107755,7 @@ module.exports = [ /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106420,10 +107764,10 @@ module.exports = [ * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasInterpolation = __webpack_require__(264); -var CanvasPool = __webpack_require__(24); -var CONST = __webpack_require__(22); -var Features = __webpack_require__(122); +var CanvasInterpolation = __webpack_require__(265); +var CanvasPool = __webpack_require__(22); +var CONST = __webpack_require__(23); +var Features = __webpack_require__(123); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -106506,8 +107850,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(259); - WebGLRenderer = __webpack_require__(256); + CanvasRenderer = __webpack_require__(261); + WebGLRenderer = __webpack_require__(258); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -106535,7 +107879,7 @@ module.exports = CreateRenderer; /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106577,7 +107921,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106587,13 +107931,13 @@ module.exports = CreateDOMContainer; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); var IsPlainObject = __webpack_require__(7); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(2); -var DefaultPlugins = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(124); var ValueToColor = __webpack_require__(134); /** @@ -106618,6 +107962,21 @@ var ValueToColor = __webpack_require__(134); * @property {integer} [panicMax=120] - [description] */ +/** + * @typedef {object} ScaleConfig + * + * @property {(integer|string)} [width=1024] - The base width of your game. + * @property {(integer|string)} [height=768] - The base height of your game. + * @property {integer} [zoom=1] - The zoom value of the game canvas. + * @property {number} [resolution=1] - The rendering resolution of the canvas. + * @property {any} [parent] - The parent DOM element. + * @property {integer} [mode=0] - The scale mode to apply to the canvas. + * @property {integer} [minWidth] - The minimum width the canvas can be scaled down to. + * @property {integer} [minHeight] - The minimum height the canvas can be scaled down to. + * @property {integer} [maxWidth] - The maximum width the canvas can be scaled up to. + * @property {integer} [maxHeight] - The maximum height the canvas can be scaled up to. + */ + /** * @typedef {object} LoaderConfig * @@ -106639,6 +107998,26 @@ var ValueToColor = __webpack_require__(134); * @property {boolean} [behindCanvas=false] - Place the DOM Container behind the Phaser Canvas. The default is to place it over the Canvas. */ +/** + * @typedef {object} PluginObjectItem + * + * @property {string} [key] - [description] + * @property {*} [plugin] - [description] + * @property {boolean} [start] - [description] + * @property {string} [systemKey] - [description] + * @property {string} [sceneKey] - [description] + * @property {*} [data] - [description] + */ + +/** + * @typedef {object} PluginObject + * + * @property {PluginObjectItem[]} [global=null] - [description] + * @property {PluginObjectItem[]} [scene=null] - [description] + * @property {Array} [default=[]] - [description] + * @property {*} [defaultMerge={}] - [description] + */ + /** * @typedef {object} GameConfig * @@ -106694,6 +108073,7 @@ var ValueToColor = __webpack_require__(134); * @property {string} [images.default] - [description] * @property {string} [images.missing] - [description] * @property {object} [physics] - [description] + * @property {PluginObject|PluginObjectItem[]} [plugins] - [description] */ /** @@ -106745,16 +108125,37 @@ var Config = new Class({ */ this.resolution = GetValue(config, 'resolution', 1); - /** - * @const {number} Phaser.Boot.Config#renderType - [description] - */ - this.renderType = GetValue(config, 'type', CONST.AUTO); - /** * @const {?*} Phaser.Boot.Config#parent - [description] */ this.parent = GetValue(config, 'parent', null); + /** + * @const {?*} Phaser.Boot.Config#scaleMode - [description] + */ + this.scaleMode = GetValue(config, 'scaleMode', 0); + + // Scale Manager - Anything set in here over-rides anything set above + + var scaleConfig = GetValue(config, 'scale', null); + + if (scaleConfig) + { + this.width = GetValue(scaleConfig, 'width', this.width); + this.height = GetValue(scaleConfig, 'height', this.height); + this.zoom = GetValue(scaleConfig, 'zoom', this.zoom); + this.resolution = GetValue(scaleConfig, 'resolution', this.resolution); + this.parent = GetValue(scaleConfig, 'parent', this.parent); + this.scaleMode = GetValue(scaleConfig, 'mode', this.scaleMode); + + // TODO: Add in min / max sizes + } + + /** + * @const {number} Phaser.Boot.Config#renderType - [description] + */ + this.renderType = GetValue(config, 'type', CONST.AUTO); + /** * @const {?HTMLCanvasElement} Phaser.Boot.Config#canvas - Force Phaser to use your own Canvas element instead of creating one. */ @@ -107169,7 +108570,7 @@ module.exports = Config; /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107179,25 +108580,26 @@ module.exports = Config; */ var AddToDOM = __webpack_require__(85); -var AnimationManager = __webpack_require__(213); -var CacheManager = __webpack_require__(211); -var CanvasPool = __webpack_require__(24); +var AnimationManager = __webpack_require__(215); +var CacheManager = __webpack_require__(213); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Config = __webpack_require__(505); -var CreateDOMContainer = __webpack_require__(504); -var CreateRenderer = __webpack_require__(503); +var Config = __webpack_require__(506); +var CreateDOMContainer = __webpack_require__(505); +var CreateRenderer = __webpack_require__(504); var DataManager = __webpack_require__(59); -var DebugHeader = __webpack_require__(496); -var Device = __webpack_require__(495); -var DOMContentLoaded = __webpack_require__(263); +var DebugHeader = __webpack_require__(497); +var Device = __webpack_require__(496); +var DOMContentLoaded = __webpack_require__(264); var EventEmitter = __webpack_require__(8); var FacebookInstantGamesPlugin = __webpack_require__(305); -var InputManager = __webpack_require__(208); +var InputManager = __webpack_require__(209); var PluginCache = __webpack_require__(10); -var PluginManager = __webpack_require__(203); -var SceneManager = __webpack_require__(201); -var SoundManagerCreator = __webpack_require__(198); -var TextureManager = __webpack_require__(191); +var PluginManager = __webpack_require__(204); +var ScaleManager = __webpack_require__(491); +var SceneManager = __webpack_require__(202); +var SoundManagerCreator = __webpack_require__(199); +var TextureManager = __webpack_require__(192); var TimeStep = __webpack_require__(478); var VisibilityHandler = __webpack_require__(477); @@ -107388,6 +108790,17 @@ var Game = new Class({ */ this.device = Device; + /** + * An instance of the Scale Manager. + * + * The Scale Manager is a global system responsible for handling game scaling events. + * + * @name Phaser.Game#scaleManager + * @type {Phaser.Boot.ScaleManager} + * @since 3.12.0 + */ + this.scaleManager = new ScaleManager(this, this.config); + /** * An instance of the base Sound Manager. * @@ -107932,7 +109345,7 @@ module.exports = Game; /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107941,7 +109354,34 @@ module.exports = Game; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(1); + +var Purchase = function (data) +{ + return { + developerPayload: GetFastValue(data, 'developerPayload', ''), + paymentID: GetFastValue(data, 'paymentID', ''), + productID: GetFastValue(data, 'productID', ''), + purchaseTime: GetFastValue(data, 'purchaseTime', ''), + purchaseToken: GetFastValue(data, 'purchaseToken', ''), + signedRequest: GetFastValue(data, 'signedRequest', '') + }; +}; + +module.exports = Purchase; + + +/***/ }), +/* 509 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var GetFastValue = __webpack_require__(1); /** * @classdesc @@ -107952,26 +109392,212 @@ var Class = __webpack_require__(0); * @constructor * @since 3.12.0 */ -var LeaderboardScore = new Class({ +var Product = function (data) +{ + return { + title: GetFastValue(data, 'title', ''), + productID: GetFastValue(data, 'productID', ''), + description: GetFastValue(data, 'description', ''), + imageURI: GetFastValue(data, 'imageURI', ''), + price: GetFastValue(data, 'price', ''), + priceCurrencyCode: GetFastValue(data, 'priceCurrencyCode', '') + }; +}; - initialize: +module.exports = Product; - function LeaderboardScore () - { - this.value; - this.valueFormatted; - this.timestamp; - this.rank; - this.data; - } -}); +/***/ }), +/* 510 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var LeaderboardScore = function (entry) +{ + return { + score: entry.getScore(), + scoreFormatted: entry.getFormattedScore(), + timestamp: entry.getTimestamp(), + rank: entry.getRank(), + data: entry.getExtraData(), + playerName: entry.getPlayer().getName(), + playerPhotoURL: entry.getPlayer().getPhoto(), + playerID: entry.getPlayer().getID() + }; +}; module.exports = LeaderboardScore; /***/ }), -/* 508 */ +/* 511 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var EventEmitter = __webpack_require__(8); +var LeaderboardScore = __webpack_require__(510); + +/** + * @classdesc + * [description] + * + * @class FacebookInstantGamesPlugin + * @memberOf Phaser + * @constructor + * @since 3.12.0 + */ +var Leaderboard = new Class({ + + Extends: EventEmitter, + + initialize: + + function Leaderboard (plugin, data) + { + EventEmitter.call(this); + + this.plugin = plugin; + this.ref = data; + + this.name = data.getName(); + this.contextID = data.getContextID(); + this.entryCount = 0; + + this.playerScore = null; + this.scores = []; + + this.getEntryCount(); + }, + + getEntryCount: function () + { + var _this = this; + + this.ref.getEntryCountAsync().then(function (count) + { + console.log('entry count', count); + + _this.entryCount = count; + + _this.emit('getentrycount', count, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + }, + + setScore: function (score, data) + { + if (data === undefined) { data = ''; } + + var _this = this; + + this.ref.setScoreAsync(score, data).then(function (entry) + { + console.log('set score', entry); + + _this.emit('setscore', entry.getScore(), entry.getExtraData(), _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + }, + + getPlayerScore: function () + { + var _this = this; + + this.ref.getPlayerEntryAsync().then(function (entry) + { + console.log('get player score'); + + var score = LeaderboardScore(entry); + + console.log(score); + + _this.playerScore = score; + + _this.emit('getplayerscore', score, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + + }, + + getScores: function (count, offset) + { + if (count === undefined) { count = 10; } + if (offset === undefined) { offset = 0; } + + var _this = this; + + this.ref.getEntriesAsync().then(function (entries) + { + console.log('get scores', entries); + + _this.scores = []; + + entries.forEach(function (entry) + { + + _this.scores.push(LeaderboardScore(entry)); + + }); + + _this.emit('getscores', _this.scores, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + + } + +}); + +module.exports = Leaderboard; + + +/***/ }), +/* 512 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var AdInstance = function (instance, video) +{ + return { + instance: instance, + placementID: instance.getPlacementID(), + shown: false, + video: video + }; +}; + +module.exports = AdInstance; + + +/***/ }), +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108155,7 +109781,7 @@ module.exports = EventEmitter; /***/ }), -/* 509 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108168,11 +109794,11 @@ module.exports = EventEmitter; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(508) }; +module.exports = { EventEmitter: __webpack_require__(513) }; /***/ }), -/* 510 */ +/* 515 */ /***/ (function(module, exports) { // shim for using process in browser @@ -108362,7 +109988,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 511 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108377,14 +110003,14 @@ process.umask = function() { return 0; }; module.exports = { - BitmapMask: __webpack_require__(220), - GeometryMask: __webpack_require__(219) + BitmapMask: __webpack_require__(222), + GeometryMask: __webpack_require__(221) }; /***/ }), -/* 512 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108393,7 +110019,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetColor = __webpack_require__(158); +var GetColor = __webpack_require__(159); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -108468,7 +110094,7 @@ module.exports = HSVToRGB; /***/ }), -/* 513 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -108524,7 +110150,7 @@ module.exports = HueToComponent; /***/ }), -/* 514 */ +/* 519 */ /***/ (function(module, exports) { /** @@ -108554,7 +110180,7 @@ module.exports = ComponentToHex; /***/ }), -/* 515 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108580,32 +110206,32 @@ module.exports = ComponentToHex; * @property {number} a - The alpha color value in the range 0 to 255. */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); -Color.ColorToRGBA = __webpack_require__(931); -Color.ComponentToHex = __webpack_require__(514); -Color.GetColor = __webpack_require__(158); -Color.GetColor32 = __webpack_require__(287); -Color.HexStringToColor = __webpack_require__(288); -Color.HSLToColor = __webpack_require__(930); -Color.HSVColorWheel = __webpack_require__(929); -Color.HSVToRGB = __webpack_require__(512); -Color.HueToComponent = __webpack_require__(513); -Color.IntegerToColor = __webpack_require__(286); -Color.IntegerToRGB = __webpack_require__(285); -Color.Interpolate = __webpack_require__(928); -Color.ObjectToColor = __webpack_require__(284); -Color.RandomRGB = __webpack_require__(927); -Color.RGBStringToColor = __webpack_require__(283); -Color.RGBToHSV = __webpack_require__(926); -Color.RGBToString = __webpack_require__(925); +Color.ColorToRGBA = __webpack_require__(936); +Color.ComponentToHex = __webpack_require__(519); +Color.GetColor = __webpack_require__(159); +Color.GetColor32 = __webpack_require__(288); +Color.HexStringToColor = __webpack_require__(289); +Color.HSLToColor = __webpack_require__(935); +Color.HSVColorWheel = __webpack_require__(934); +Color.HSVToRGB = __webpack_require__(517); +Color.HueToComponent = __webpack_require__(518); +Color.IntegerToColor = __webpack_require__(287); +Color.IntegerToRGB = __webpack_require__(286); +Color.Interpolate = __webpack_require__(933); +Color.ObjectToColor = __webpack_require__(285); +Color.RandomRGB = __webpack_require__(932); +Color.RGBStringToColor = __webpack_require__(284); +Color.RGBToHSV = __webpack_require__(931); +Color.RGBToString = __webpack_require__(930); Color.ValueToColor = __webpack_require__(134); module.exports = Color; /***/ }), -/* 516 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108731,7 +110357,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 517 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108747,13 +110373,13 @@ module.exports = DataManagerPlugin; module.exports = { DataManager: __webpack_require__(59), - DataManagerPlugin: __webpack_require__(516) + DataManagerPlugin: __webpack_require__(521) }; /***/ }), -/* 518 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108764,7 +110390,7 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(265); +var CatmullRom = __webpack_require__(266); var Class = __webpack_require__(0); var Curve = __webpack_require__(86); var Vector2 = __webpack_require__(4); @@ -108978,7 +110604,7 @@ module.exports = SplineCurve; /***/ }), -/* 519 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -109032,7 +110658,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 520 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109043,7 +110669,7 @@ module.exports = QuadraticBezierInterpolation; var Class = __webpack_require__(0); var Curve = __webpack_require__(86); -var QuadraticBezierInterpolation = __webpack_require__(519); +var QuadraticBezierInterpolation = __webpack_require__(524); var Vector2 = __webpack_require__(4); /** @@ -109246,7 +110872,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 521 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109259,7 +110885,7 @@ module.exports = QuadraticBezier; var Class = __webpack_require__(0); var Curve = __webpack_require__(86); -var FromPoints = __webpack_require__(266); +var FromPoints = __webpack_require__(267); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(4); @@ -109503,7 +111129,7 @@ module.exports = LineCurve; /***/ }), -/* 522 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109518,7 +111144,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(86); var DegToRad = __webpack_require__(39); var GetValue = __webpack_require__(3); -var RadToDeg = __webpack_require__(154); +var RadToDeg = __webpack_require__(155); var Vector2 = __webpack_require__(4); /** @@ -110131,7 +111757,7 @@ module.exports = EllipseCurve; /***/ }), -/* 523 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -110194,7 +111820,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 524 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110206,7 +111832,7 @@ module.exports = CubicBezierInterpolation; // 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__(523); +var CubicBezier = __webpack_require__(528); var Curve = __webpack_require__(86); var Vector2 = __webpack_require__(4); @@ -110421,7 +112047,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 525 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110430,7 +112056,7 @@ module.exports = CubicBezierCurve; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(270); +var Camera = __webpack_require__(271); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(87); @@ -110561,7 +112187,7 @@ module.exports = PerspectiveCamera; /***/ }), -/* 526 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110570,7 +112196,7 @@ module.exports = PerspectiveCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(270); +var Camera = __webpack_require__(271); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(87); @@ -110748,7 +112374,7 @@ module.exports = OrthographicCamera; /***/ }), -/* 527 */ +/* 532 */ /***/ (function(module, exports) { /** @@ -110781,7 +112407,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 528 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -110814,7 +112440,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 529 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110828,12 +112454,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(528); + renderWebGL = __webpack_require__(533); } if (true) { - renderCanvas = __webpack_require__(527); + renderCanvas = __webpack_require__(532); } module.exports = { @@ -110845,7 +112471,7 @@ module.exports = { /***/ }), -/* 530 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111438,7 +113064,7 @@ module.exports = Matrix3; /***/ }), -/* 531 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111452,7 +113078,7 @@ module.exports = Matrix3; var Class = __webpack_require__(0); var Vector3 = __webpack_require__(87); -var Matrix3 = __webpack_require__(530); +var Matrix3 = __webpack_require__(535); var EPSILON = 0.000001; @@ -112210,7 +113836,7 @@ module.exports = Quaternion; /***/ }), -/* 532 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112220,8 +113846,8 @@ module.exports = Quaternion; */ var Vector3 = __webpack_require__(87); -var Matrix4 = __webpack_require__(269); -var Quaternion = __webpack_require__(531); +var Matrix4 = __webpack_require__(270); +var Quaternion = __webpack_require__(536); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -112258,7 +113884,7 @@ module.exports = RotateVec3; /***/ }), -/* 533 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -112295,7 +113921,7 @@ module.exports = RandomXYZW; /***/ }), -/* 534 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -112334,7 +113960,7 @@ module.exports = RandomXYZ; /***/ }), -/* 535 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112343,11 +113969,11 @@ module.exports = RandomXYZ; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(126); +var Camera = __webpack_require__(212); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var PluginCache = __webpack_require__(10); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); /** * @typedef {object} InputJSONCameraObject @@ -113054,7 +114680,7 @@ module.exports = CameraManager; /***/ }), -/* 536 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113065,7 +114691,7 @@ module.exports = CameraManager; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * @classdesc @@ -113371,7 +114997,7 @@ module.exports = Zoom; /***/ }), -/* 537 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113713,7 +115339,7 @@ module.exports = Shake; /***/ }), -/* 538 */ +/* 543 */ /***/ (function(module, exports) { /** @@ -113755,7 +115381,7 @@ module.exports = Stepped; /***/ }), -/* 539 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -113794,7 +115420,7 @@ module.exports = InOut; /***/ }), -/* 540 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -113833,7 +115459,7 @@ module.exports = Out; /***/ }), -/* 541 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -113872,7 +115498,7 @@ module.exports = In; /***/ }), -/* 542 */ +/* 547 */ /***/ (function(module, exports) { /** @@ -113907,7 +115533,7 @@ module.exports = InOut; /***/ }), -/* 543 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -113935,7 +115561,7 @@ module.exports = Out; /***/ }), -/* 544 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -113963,7 +115589,7 @@ module.exports = In; /***/ }), -/* 545 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -113998,7 +115624,7 @@ module.exports = InOut; /***/ }), -/* 546 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -114026,7 +115652,7 @@ module.exports = Out; /***/ }), -/* 547 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -114054,7 +115680,7 @@ module.exports = In; /***/ }), -/* 548 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -114089,7 +115715,7 @@ module.exports = InOut; /***/ }), -/* 549 */ +/* 554 */ /***/ (function(module, exports) { /** @@ -114117,7 +115743,7 @@ module.exports = Out; /***/ }), -/* 550 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -114145,7 +115771,7 @@ module.exports = In; /***/ }), -/* 551 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -114173,7 +115799,7 @@ module.exports = Linear; /***/ }), -/* 552 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -114208,7 +115834,7 @@ module.exports = InOut; /***/ }), -/* 553 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -114236,7 +115862,7 @@ module.exports = Out; /***/ }), -/* 554 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -114264,7 +115890,7 @@ module.exports = In; /***/ }), -/* 555 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -114326,7 +115952,7 @@ module.exports = InOut; /***/ }), -/* 556 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -114381,7 +116007,7 @@ module.exports = Out; /***/ }), -/* 557 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -114436,7 +116062,7 @@ module.exports = In; /***/ }), -/* 558 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -114471,7 +116097,7 @@ module.exports = InOut; /***/ }), -/* 559 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -114499,7 +116125,7 @@ module.exports = Out; /***/ }), -/* 560 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -114527,7 +116153,7 @@ module.exports = In; /***/ }), -/* 561 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -114562,7 +116188,7 @@ module.exports = InOut; /***/ }), -/* 562 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -114590,7 +116216,7 @@ module.exports = Out; /***/ }), -/* 563 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -114618,7 +116244,7 @@ module.exports = In; /***/ }), -/* 564 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -114682,7 +116308,7 @@ module.exports = InOut; /***/ }), -/* 565 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -114725,7 +116351,7 @@ module.exports = Out; /***/ }), -/* 566 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -114770,7 +116396,7 @@ module.exports = In; /***/ }), -/* 567 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -114810,7 +116436,7 @@ module.exports = InOut; /***/ }), -/* 568 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -114841,7 +116467,7 @@ module.exports = Out; /***/ }), -/* 569 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -114872,7 +116498,7 @@ module.exports = In; /***/ }), -/* 570 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114884,7 +116510,7 @@ module.exports = In; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); var Vector2 = __webpack_require__(4); -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * @classdesc @@ -115223,7 +116849,7 @@ module.exports = Pan; /***/ }), -/* 571 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115599,7 +117225,7 @@ module.exports = Flash; /***/ }), -/* 572 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116032,7 +117658,7 @@ module.exports = Fade; /***/ }), -/* 573 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116047,15 +117673,15 @@ module.exports = Fade; module.exports = { - Camera: __webpack_require__(126), - CameraManager: __webpack_require__(535), - Effects: __webpack_require__(210) + Camera: __webpack_require__(212), + CameraManager: __webpack_require__(540), + Effects: __webpack_require__(211) }; /***/ }), -/* 574 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116070,14 +117696,14 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(212), - CacheManager: __webpack_require__(211) + BaseCache: __webpack_require__(214), + CacheManager: __webpack_require__(213) }; /***/ }), -/* 575 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116092,15 +117718,15 @@ module.exports = { module.exports = { - Animation: __webpack_require__(216), - AnimationFrame: __webpack_require__(214), - AnimationManager: __webpack_require__(213) + Animation: __webpack_require__(218), + AnimationFrame: __webpack_require__(216), + AnimationManager: __webpack_require__(215) }; /***/ }), -/* 576 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -116174,7 +117800,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 577 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116183,7 +117809,7 @@ module.exports = BresenhamPoints; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); var Point = __webpack_require__(5); // Return an array of points from the perimeter of the rectangle @@ -116294,7 +117920,7 @@ module.exports = MarchingAnts; /***/ }), -/* 578 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -116383,7 +118009,7 @@ module.exports = Visible; /***/ }), -/* 579 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116393,9 +118019,9 @@ module.exports = Visible; */ var MATH_CONST = __webpack_require__(16); -var TransformMatrix = __webpack_require__(32); -var WrapAngle = __webpack_require__(218); -var WrapAngleDegrees = __webpack_require__(217); +var TransformMatrix = __webpack_require__(27); +var WrapAngle = __webpack_require__(220); +var WrapAngleDegrees = __webpack_require__(219); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -116863,7 +118489,7 @@ module.exports = Transform; /***/ }), -/* 580 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -116950,7 +118576,7 @@ module.exports = ToJSON; /***/ }), -/* 581 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -117289,7 +118915,7 @@ module.exports = Tint; /***/ }), -/* 582 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -117497,7 +119123,7 @@ module.exports = TextureCrop; /***/ }), -/* 583 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -117627,7 +119253,7 @@ module.exports = Texture; /***/ }), -/* 584 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -117659,6 +119285,10 @@ var Size = { /** * The native (un-scaled) width of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * * @name Phaser.GameObjects.Components.Size#width * @type {number} * @since 3.0.0 @@ -117668,6 +119298,10 @@ var Size = { /** * The native (un-scaled) height of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * * @name Phaser.GameObjects.Components.Size#height * @type {number} * @since 3.0.0 @@ -117676,8 +119310,11 @@ var Size = { /** * The displayed width of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.Size#displayWidth * @type {number} * @since 3.0.0 @@ -117698,8 +119335,11 @@ var Size = { /** * The displayed height of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.Size#displayHeight * @type {number} * @since 3.0.0 @@ -117721,6 +119361,14 @@ var Size = { /** * Sets the size of this Game Object to be that of the given Frame. * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * * @method Phaser.GameObjects.Components.Size#setSizeToFrame * @since 3.0.0 * @@ -117746,6 +119394,9 @@ var Size = { * `setDisplaySize` method, which is the same thing as changing the scale but allows you * to do so by giving pixel values. * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * * @method Phaser.GameObjects.Components.Size#setSize * @since 3.0.0 * @@ -117789,7 +119440,7 @@ module.exports = Size; /***/ }), -/* 585 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -117881,7 +119532,7 @@ module.exports = ScrollFactor; /***/ }), -/* 586 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117952,7 +119603,7 @@ module.exports = ScaleMode; /***/ }), -/* 587 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -118155,7 +119806,7 @@ module.exports = Origin; /***/ }), -/* 588 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118164,8 +119815,8 @@ module.exports = Origin; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapMask = __webpack_require__(220); -var GeometryMask = __webpack_require__(219); +var BitmapMask = __webpack_require__(222); +var GeometryMask = __webpack_require__(221); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -118302,7 +119953,7 @@ module.exports = Mask; /***/ }), -/* 589 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118584,7 +120235,7 @@ module.exports = GetBounds; /***/ }), -/* 590 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -118732,7 +120383,7 @@ module.exports = Flip; /***/ }), -/* 591 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -118825,7 +120476,7 @@ module.exports = Depth; /***/ }), -/* 592 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -118950,7 +120601,7 @@ module.exports = Crop; /***/ }), -/* 593 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -118972,6 +120623,10 @@ var ComputedSize = { /** * The native (un-scaled) width of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * * @name Phaser.GameObjects.Components.ComputedSize#width * @type {number} * @since 3.0.0 @@ -118981,6 +120636,10 @@ var ComputedSize = { /** * The native (un-scaled) height of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * * @name Phaser.GameObjects.Components.ComputedSize#height * @type {number} * @since 3.0.0 @@ -118989,8 +120648,11 @@ var ComputedSize = { /** * The displayed width of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.ComputedSize#displayWidth * @type {number} * @since 3.0.0 @@ -119011,8 +120673,11 @@ var ComputedSize = { /** * The displayed height of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.ComputedSize#displayHeight * @type {number} * @since 3.0.0 @@ -119032,7 +120697,15 @@ var ComputedSize = { }, /** - * Sets the size of this Game Object. + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. * * @method Phaser.GameObjects.Components.ComputedSize#setSize * @since 3.4.0 @@ -119052,6 +120725,7 @@ var ComputedSize = { /** * Sets the display size of this Game Object. + * * Calling this will adjust the scale. * * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize @@ -119076,7 +120750,7 @@ module.exports = ComputedSize; /***/ }), -/* 594 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119196,7 +120870,7 @@ module.exports = BlendMode; /***/ }), -/* 595 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119491,7 +121165,7 @@ module.exports = Alpha; /***/ }), -/* 596 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119535,7 +121209,7 @@ module.exports = TopRight; /***/ }), -/* 597 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119579,7 +121253,7 @@ module.exports = TopLeft; /***/ }), -/* 598 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119588,9 +121262,9 @@ module.exports = TopLeft; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(92); +var GetCenterX = __webpack_require__(93); var GetTop = __webpack_require__(45); -var SetCenterX = __webpack_require__(91); +var SetCenterX = __webpack_require__(92); var SetTop = __webpack_require__(44); /** @@ -119623,7 +121297,7 @@ module.exports = TopCenter; /***/ }), -/* 599 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119632,9 +121306,9 @@ module.exports = TopCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetRight = __webpack_require__(47); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetRight = __webpack_require__(46); /** @@ -119667,7 +121341,7 @@ module.exports = RightCenter; /***/ }), -/* 600 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119676,9 +121350,9 @@ module.exports = RightCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetLeft = __webpack_require__(49); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetLeft = __webpack_require__(48); /** @@ -119711,7 +121385,7 @@ module.exports = LeftCenter; /***/ }), -/* 601 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119720,8 +121394,8 @@ module.exports = LeftCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetCenterX = __webpack_require__(91); -var SetCenterY = __webpack_require__(90); +var SetCenterX = __webpack_require__(92); +var SetCenterY = __webpack_require__(91); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -119748,7 +121422,7 @@ module.exports = CenterOn; /***/ }), -/* 602 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119757,9 +121431,9 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(601); -var GetCenterX = __webpack_require__(92); -var GetCenterY = __webpack_require__(89); +var CenterOn = __webpack_require__(606); +var GetCenterX = __webpack_require__(93); +var GetCenterY = __webpack_require__(90); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -119790,7 +121464,7 @@ module.exports = Center; /***/ }), -/* 603 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119834,7 +121508,7 @@ module.exports = BottomRight; /***/ }), -/* 604 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119878,7 +121552,7 @@ module.exports = BottomLeft; /***/ }), -/* 605 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119888,9 +121562,9 @@ module.exports = BottomLeft; */ var GetBottom = __webpack_require__(51); -var GetCenterX = __webpack_require__(92); +var GetCenterX = __webpack_require__(93); var SetBottom = __webpack_require__(50); -var SetCenterX = __webpack_require__(91); +var SetCenterX = __webpack_require__(92); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -119922,7 +121596,7 @@ module.exports = BottomCenter; /***/ }), -/* 606 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119935,15 +121609,15 @@ var ALIGN_CONST = __webpack_require__(302); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(605); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(604); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(603); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(602); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(600); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(599); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(598); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(597); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(596); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(610); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(609); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(608); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(607); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(605); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(604); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(603); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(602); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(601); /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -119971,7 +121645,7 @@ module.exports = QuickSet; /***/ }), -/* 607 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119986,61 +121660,61 @@ module.exports = QuickSet; module.exports = { - Angle: __webpack_require__(1015), - Call: __webpack_require__(1014), - GetFirst: __webpack_require__(1013), - GetLast: __webpack_require__(1012), - GridAlign: __webpack_require__(1011), - IncAlpha: __webpack_require__(1010), - IncX: __webpack_require__(1009), - IncXY: __webpack_require__(1008), - IncY: __webpack_require__(1007), - PlaceOnCircle: __webpack_require__(1006), - PlaceOnEllipse: __webpack_require__(1005), - PlaceOnLine: __webpack_require__(1004), - PlaceOnRectangle: __webpack_require__(1003), - PlaceOnTriangle: __webpack_require__(1002), - PlayAnimation: __webpack_require__(1001), + Angle: __webpack_require__(1020), + Call: __webpack_require__(1019), + GetFirst: __webpack_require__(1018), + GetLast: __webpack_require__(1017), + GridAlign: __webpack_require__(1016), + IncAlpha: __webpack_require__(1015), + IncX: __webpack_require__(1014), + IncXY: __webpack_require__(1013), + IncY: __webpack_require__(1012), + PlaceOnCircle: __webpack_require__(1011), + PlaceOnEllipse: __webpack_require__(1010), + PlaceOnLine: __webpack_require__(1009), + PlaceOnRectangle: __webpack_require__(1008), + PlaceOnTriangle: __webpack_require__(1007), + PlayAnimation: __webpack_require__(1006), PropertyValueInc: __webpack_require__(36), PropertyValueSet: __webpack_require__(26), - RandomCircle: __webpack_require__(1000), - RandomEllipse: __webpack_require__(999), - RandomLine: __webpack_require__(998), - RandomRectangle: __webpack_require__(997), - RandomTriangle: __webpack_require__(996), - Rotate: __webpack_require__(995), - RotateAround: __webpack_require__(994), - RotateAroundDistance: __webpack_require__(993), - ScaleX: __webpack_require__(992), - ScaleXY: __webpack_require__(991), - ScaleY: __webpack_require__(990), - SetAlpha: __webpack_require__(989), - SetBlendMode: __webpack_require__(988), - SetDepth: __webpack_require__(987), - SetHitArea: __webpack_require__(986), - SetOrigin: __webpack_require__(985), - SetRotation: __webpack_require__(984), - SetScale: __webpack_require__(983), - SetScaleX: __webpack_require__(982), - SetScaleY: __webpack_require__(981), - SetTint: __webpack_require__(980), - SetVisible: __webpack_require__(979), - SetX: __webpack_require__(978), - SetXY: __webpack_require__(977), - SetY: __webpack_require__(976), - ShiftPosition: __webpack_require__(975), - Shuffle: __webpack_require__(974), - SmootherStep: __webpack_require__(973), - SmoothStep: __webpack_require__(972), - Spread: __webpack_require__(971), - ToggleVisible: __webpack_require__(970), - WrapInRectangle: __webpack_require__(969) + RandomCircle: __webpack_require__(1005), + RandomEllipse: __webpack_require__(1004), + RandomLine: __webpack_require__(1003), + RandomRectangle: __webpack_require__(1002), + RandomTriangle: __webpack_require__(1001), + Rotate: __webpack_require__(1000), + RotateAround: __webpack_require__(999), + RotateAroundDistance: __webpack_require__(998), + ScaleX: __webpack_require__(997), + ScaleXY: __webpack_require__(996), + ScaleY: __webpack_require__(995), + SetAlpha: __webpack_require__(994), + SetBlendMode: __webpack_require__(993), + SetDepth: __webpack_require__(992), + SetHitArea: __webpack_require__(991), + SetOrigin: __webpack_require__(990), + SetRotation: __webpack_require__(989), + SetScale: __webpack_require__(988), + SetScaleX: __webpack_require__(987), + SetScaleY: __webpack_require__(986), + SetTint: __webpack_require__(985), + SetVisible: __webpack_require__(984), + SetX: __webpack_require__(983), + SetXY: __webpack_require__(982), + SetY: __webpack_require__(981), + ShiftPosition: __webpack_require__(980), + Shuffle: __webpack_require__(979), + SmootherStep: __webpack_require__(978), + SmoothStep: __webpack_require__(977), + Spread: __webpack_require__(976), + ToggleVisible: __webpack_require__(975), + WrapInRectangle: __webpack_require__(974) }; /***/ }), -/* 608 */ +/* 613 */ /***/ (function(module, exports) { /** @@ -120093,7 +121767,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 609 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -120163,10 +121837,10 @@ if (!global.cancelAnimationFrame) { }; } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(221))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(223))) /***/ }), -/* 610 */ +/* 615 */ /***/ (function(module, exports) { /** @@ -120203,7 +121877,7 @@ if (!global.cancelAnimationFrame) { /***/ }), -/* 611 */ +/* 616 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -120215,7 +121889,7 @@ if (!Math.trunc) { /***/ }), -/* 612 */ +/* 617 */ /***/ (function(module, exports) { /** @@ -120230,7 +121904,7 @@ if (!window.console) /***/ }), -/* 613 */ +/* 618 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -120417,7 +122091,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 614 */ +/* 619 */ /***/ (function(module, exports) { /** @@ -120433,7 +122107,7 @@ if (!Array.isArray) /***/ }), -/* 615 */ +/* 620 */ /***/ (function(module, exports) { /** @@ -120473,23 +122147,23 @@ if (!Array.prototype.forEach) /***/ }), -/* 616 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { +__webpack_require__(620); +__webpack_require__(619); +__webpack_require__(618); +__webpack_require__(617); +__webpack_require__(616); __webpack_require__(615); __webpack_require__(614); __webpack_require__(613); -__webpack_require__(612); -__webpack_require__(611); -__webpack_require__(610); -__webpack_require__(609); -__webpack_require__(608); /***/ }), -/* 617 */, -/* 618 */, -/* 619 */ +/* 622 */, +/* 623 */, +/* 624 */ /***/ (function(module, exports) { /** @@ -120518,7 +122192,7 @@ module.exports = ReverseString; /***/ }), -/* 620 */ +/* 625 */ /***/ (function(module, exports) { /** @@ -120553,7 +122227,7 @@ module.exports = Format; /***/ }), -/* 621 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120568,17 +122242,17 @@ module.exports = Format; module.exports = { - Format: __webpack_require__(620), + Format: __webpack_require__(625), Pad: __webpack_require__(135), - Reverse: __webpack_require__(619), - UppercaseFirst: __webpack_require__(250), + Reverse: __webpack_require__(624), + UppercaseFirst: __webpack_require__(252), UUID: __webpack_require__(421) }; /***/ }), -/* 622 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120621,7 +122295,7 @@ module.exports = MergeRight; /***/ }), -/* 623 */ +/* 628 */ /***/ (function(module, exports) { /** @@ -120658,7 +122332,7 @@ module.exports = HasAll; /***/ }), -/* 624 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120697,7 +122371,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 625 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120716,20 +122390,20 @@ module.exports = { Extend: __webpack_require__(17), GetAdvancedValue: __webpack_require__(12), GetFastValue: __webpack_require__(1), - GetMinMaxValue: __webpack_require__(624), + GetMinMaxValue: __webpack_require__(629), GetValue: __webpack_require__(3), - HasAll: __webpack_require__(623), + HasAll: __webpack_require__(628), HasAny: __webpack_require__(424), - HasValue: __webpack_require__(112), + HasValue: __webpack_require__(113), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(95), - MergeRight: __webpack_require__(622) + Merge: __webpack_require__(96), + MergeRight: __webpack_require__(627) }; /***/ }), -/* 626 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120745,14 +122419,14 @@ module.exports = { module.exports = { Array: __webpack_require__(151), - Objects: __webpack_require__(625), - String: __webpack_require__(621) + Objects: __webpack_require__(630), + String: __webpack_require__(626) }; /***/ }), -/* 627 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120762,7 +122436,7 @@ module.exports = { */ var GameObjectFactory = __webpack_require__(9); -var ParseToTilemap = __webpack_require__(222); +var ParseToTilemap = __webpack_require__(224); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -120818,7 +122492,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 628 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120827,8 +122501,8 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); -var ParseToTilemap = __webpack_require__(222); +var GameObjectCreator = __webpack_require__(14); +var ParseToTilemap = __webpack_require__(224); /** * @typedef {object} TilemapConfig @@ -120879,7 +122553,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 629 */ +/* 634 */ /***/ (function(module, exports) { /** @@ -120979,7 +122653,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 630 */ +/* 635 */ /***/ (function(module, exports) { /** @@ -121040,7 +122714,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 631 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121054,12 +122728,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(630); + renderWebGL = __webpack_require__(635); } if (true) { - renderCanvas = __webpack_require__(629); + renderCanvas = __webpack_require__(634); } module.exports = { @@ -121071,7 +122745,7 @@ module.exports = { /***/ }), -/* 632 */ +/* 637 */ /***/ (function(module, exports) { /** @@ -121192,7 +122866,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 633 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121292,7 +122966,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 634 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121306,12 +122980,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(633); + renderWebGL = __webpack_require__(638); } if (true) { - renderCanvas = __webpack_require__(632); + renderCanvas = __webpack_require__(637); } module.exports = { @@ -121323,7 +122997,7 @@ module.exports = { /***/ }), -/* 635 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121374,7 +123048,7 @@ module.exports = ParseTilesets; /***/ }), -/* 636 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121383,7 +123057,7 @@ module.exports = ParseTilesets; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LayerData = __webpack_require__(105); +var LayerData = __webpack_require__(106); var Tile = __webpack_require__(66); /** @@ -121458,7 +123132,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 637 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121531,7 +123205,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 638 */ +/* 643 */ /***/ (function(module, exports) { /** @@ -121604,7 +123278,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 639 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121663,7 +123337,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 640 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121672,7 +123346,7 @@ module.exports = ParseObjectLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); /** * [description] @@ -121706,7 +123380,7 @@ module.exports = Pick; /***/ }), -/* 641 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121811,7 +123485,7 @@ module.exports = ParseTilesets; /***/ }), -/* 642 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121863,7 +123537,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 643 */ +/* 648 */ /***/ (function(module, exports) { /** @@ -121906,7 +123580,7 @@ module.exports = Base64Decode; /***/ }), -/* 644 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121915,9 +123589,9 @@ module.exports = Base64Decode; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Base64Decode = __webpack_require__(643); +var Base64Decode = __webpack_require__(648); var GetFastValue = __webpack_require__(1); -var LayerData = __webpack_require__(105); +var LayerData = __webpack_require__(106); var ParseGID = __webpack_require__(320); var Tile = __webpack_require__(66); @@ -122032,7 +123706,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 645 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122048,7 +123722,7 @@ module.exports = ParseTileLayers; module.exports = { Parse: __webpack_require__(323), - Parse2DArray: __webpack_require__(223), + Parse2DArray: __webpack_require__(225), ParseCSV: __webpack_require__(322), Impact: __webpack_require__(316), @@ -122058,7 +123732,7 @@ module.exports = { /***/ }), -/* 646 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122104,7 +123778,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 647 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122113,7 +123787,7 @@ module.exports = WorldToTileXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -122184,7 +123858,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 648 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122228,7 +123902,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 649 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122237,7 +123911,7 @@ module.exports = TileToWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching @@ -122279,7 +123953,7 @@ module.exports = SwapByIndex; /***/ }), -/* 650 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122288,8 +123962,8 @@ module.exports = SwapByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); -var ShuffleArray = __webpack_require__(96); +var GetTilesWithin = __webpack_require__(24); +var ShuffleArray = __webpack_require__(97); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -122324,7 +123998,7 @@ module.exports = Shuffle; /***/ }), -/* 651 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122333,7 +124007,7 @@ module.exports = Shuffle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. @@ -122367,7 +124041,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 652 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -122415,7 +124089,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 653 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122474,7 +124148,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 654 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122485,7 +124159,7 @@ module.exports = SetCollisionFromCollisionGroup; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -122549,7 +124223,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 655 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122560,7 +124234,7 @@ module.exports = SetCollisionByProperty; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var SetLayerCollisionIndex = __webpack_require__(224); +var SetLayerCollisionIndex = __webpack_require__(226); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -122605,7 +124279,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 656 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122616,7 +124290,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var SetLayerCollisionIndex = __webpack_require__(224); +var SetLayerCollisionIndex = __webpack_require__(226); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -122672,7 +124346,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 657 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122683,7 +124357,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var SetLayerCollisionIndex = __webpack_require__(224); +var SetLayerCollisionIndex = __webpack_require__(226); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -122734,7 +124408,7 @@ module.exports = SetCollision; /***/ }), -/* 658 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122743,8 +124417,8 @@ module.exports = SetCollision; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); -var Color = __webpack_require__(515); +var GetTilesWithin = __webpack_require__(24); +var Color = __webpack_require__(520); /** * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to @@ -122820,7 +124494,7 @@ module.exports = RenderDebug; /***/ }), -/* 659 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122863,7 +124537,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 660 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122872,7 +124546,7 @@ module.exports = RemoveTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var GetRandom = __webpack_require__(150); /** @@ -122921,7 +124595,7 @@ module.exports = Randomize; /***/ }), -/* 661 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122931,7 +124605,7 @@ module.exports = Randomize; */ var CalculateFacesWithin = __webpack_require__(41); -var PutTileAt = __webpack_require__(225); +var PutTileAt = __webpack_require__(227); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -122986,7 +124660,7 @@ module.exports = PutTilesAt; /***/ }), -/* 662 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122995,7 +124669,7 @@ module.exports = PutTilesAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PutTileAt = __webpack_require__(225); +var PutTileAt = __webpack_require__(227); var WorldToTileX = __webpack_require__(54); var WorldToTileY = __webpack_require__(53); @@ -123029,7 +124703,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 663 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123069,7 +124743,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 664 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123078,7 +124752,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var WorldToTileX = __webpack_require__(54); var WorldToTileY = __webpack_require__(53); @@ -123122,7 +124796,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 665 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123132,7 +124806,7 @@ module.exports = GetTilesWithinWorldXY; */ var Geom = __webpack_require__(403); -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var Intersects = __webpack_require__(402); var NOOP = __webpack_require__(2); var TileToWorldX = __webpack_require__(141); @@ -123222,7 +124896,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 666 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123264,7 +124938,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 667 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123273,7 +124947,7 @@ module.exports = GetTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * @callback EachTileCallback @@ -123317,7 +124991,7 @@ module.exports = ForEachTile; /***/ }), -/* 668 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123326,7 +125000,7 @@ module.exports = ForEachTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * @callback FindTileCallback @@ -123375,7 +125049,7 @@ module.exports = FindTile; /***/ }), -/* 669 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -123463,7 +125137,7 @@ module.exports = FindByIndex; /***/ }), -/* 670 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123472,7 +125146,7 @@ module.exports = FindByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given @@ -123513,7 +125187,7 @@ module.exports = FilterTiles; /***/ }), -/* 671 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123522,7 +125196,7 @@ module.exports = FilterTiles; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var CalculateFacesWithin = __webpack_require__(41); var SetTileCollision = __webpack_require__(67); @@ -123568,7 +125242,7 @@ module.exports = Fill; /***/ }), -/* 672 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123618,7 +125292,7 @@ var CullTiles = function (layer, camera, outputArray) var drawTop = 0; var drawBottom = mapHeight; - if (!tilemapLayer.skipCull) + if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1) { // Camera world view bounds, snapped for scaled tile size // Cull Padding values are given in tiles, not pixels @@ -123659,7 +125333,7 @@ module.exports = CullTiles; /***/ }), -/* 673 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123670,7 +125344,7 @@ module.exports = CullTiles; var TileToWorldX = __webpack_require__(141); var TileToWorldY = __webpack_require__(140); -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var ReplaceByIndex = __webpack_require__(326); /** @@ -123747,7 +125421,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 674 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123756,7 +125430,7 @@ module.exports = CreateFromTiles; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var CalculateFacesWithin = __webpack_require__(41); /** @@ -123812,7 +125486,7 @@ module.exports = Copy; /***/ }), -/* 675 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123828,19 +125502,19 @@ module.exports = Copy; module.exports = { Components: __webpack_require__(143), - Parsers: __webpack_require__(645), + Parsers: __webpack_require__(650), - Formats: __webpack_require__(27), + Formats: __webpack_require__(28), ImageCollection: __webpack_require__(319), - ParseToTilemap: __webpack_require__(222), + ParseToTilemap: __webpack_require__(224), Tile: __webpack_require__(66), Tilemap: __webpack_require__(315), - TilemapCreator: __webpack_require__(628), - TilemapFactory: __webpack_require__(627), + TilemapCreator: __webpack_require__(633), + TilemapFactory: __webpack_require__(632), Tileset: __webpack_require__(139), - LayerData: __webpack_require__(105), - MapData: __webpack_require__(104), + LayerData: __webpack_require__(106), + MapData: __webpack_require__(105), ObjectLayer: __webpack_require__(317), DynamicTilemapLayer: __webpack_require__(314), @@ -123850,11 +125524,6 @@ module.exports = { /***/ }), -/* 676 */, -/* 677 */, -/* 678 */, -/* 679 */, -/* 680 */, /* 681 */, /* 682 */, /* 683 */, @@ -123863,7 +125532,12 @@ module.exports = { /* 686 */, /* 687 */, /* 688 */, -/* 689 */ +/* 689 */, +/* 690 */, +/* 691 */, +/* 692 */, +/* 693 */, +/* 694 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123950,7 +125624,7 @@ module.exports = SeparateY; /***/ }), -/* 690 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124037,7 +125711,7 @@ module.exports = SeparateX; /***/ }), -/* 691 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -124084,7 +125758,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 692 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124093,7 +125767,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(691); +var ProcessTileSeparationY = __webpack_require__(696); /** * Check the body against the given tile on the Y axis. @@ -124159,7 +125833,7 @@ module.exports = TileCheckY; /***/ }), -/* 693 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -124206,7 +125880,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 694 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124215,7 +125889,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(693); +var ProcessTileSeparationX = __webpack_require__(698); /** * Check the body against the given tile on the X axis. @@ -124281,7 +125955,7 @@ module.exports = TileCheckX; /***/ }), -/* 695 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124290,8 +125964,8 @@ module.exports = TileCheckX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileCheckX = __webpack_require__(694); -var TileCheckY = __webpack_require__(692); +var TileCheckX = __webpack_require__(699); +var TileCheckY = __webpack_require__(697); var TileIntersectsBody = __webpack_require__(339); /** @@ -124394,7 +126068,7 @@ module.exports = SeparateTile; /***/ }), -/* 696 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -124435,7 +126109,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 697 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -124465,7 +126139,7 @@ var Velocity = { */ setVelocity: function (x, y) { - this.body.velocity.set(x, y); + this.body.setVelocity(x, y); return this; }, @@ -124482,7 +126156,7 @@ var Velocity = { */ setVelocityX: function (x) { - this.body.velocity.x = x; + this.body.setVelocityX(x); return this; }, @@ -124499,7 +126173,7 @@ var Velocity = { */ setVelocityY: function (y) { - this.body.velocity.y = y; + this.body.setVelocityY(y); return this; }, @@ -124528,7 +126202,7 @@ module.exports = Velocity; /***/ }), -/* 698 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -124607,7 +126281,7 @@ module.exports = Size; /***/ }), -/* 699 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -124647,7 +126321,7 @@ module.exports = Mass; /***/ }), -/* 700 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -124689,7 +126363,7 @@ module.exports = Immovable; /***/ }), -/* 701 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -124764,7 +126438,7 @@ module.exports = Gravity; /***/ }), -/* 702 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -124839,7 +126513,7 @@ module.exports = Friction; /***/ }), -/* 703 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -124949,7 +126623,7 @@ module.exports = Enable; /***/ }), -/* 704 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -125041,7 +126715,7 @@ module.exports = Drag; /***/ }), -/* 705 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -125165,7 +126839,7 @@ module.exports = Debug; /***/ }), -/* 706 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -125257,7 +126931,7 @@ module.exports = Bounce; /***/ }), -/* 707 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -125331,7 +127005,7 @@ module.exports = Angular; /***/ }), -/* 708 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -125406,7 +127080,7 @@ module.exports = Acceleration; /***/ }), -/* 709 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125420,7 +127094,7 @@ var DegToRad = __webpack_require__(39); var DistanceBetween = __webpack_require__(58); var Factory = __webpack_require__(349); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(95); +var Merge = __webpack_require__(96); var PluginCache = __webpack_require__(10); var Vector2 = __webpack_require__(4); var World = __webpack_require__(344); @@ -125916,7 +127590,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 710 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125941,7 +127615,7 @@ var Extend = __webpack_require__(17); var Arcade = { - ArcadePhysics: __webpack_require__(709), + ArcadePhysics: __webpack_require__(714), Body: __webpack_require__(343), Collider: __webpack_require__(342), Factory: __webpack_require__(349), @@ -125961,7 +127635,7 @@ module.exports = Arcade; /***/ }), -/* 711 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -125991,7 +127665,7 @@ module.exports = Within; /***/ }), -/* 712 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -126052,7 +127726,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 713 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -126087,7 +127761,7 @@ module.exports = RoundTo; /***/ }), -/* 714 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -126127,7 +127801,7 @@ module.exports = RandomXY; /***/ }), -/* 715 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -126186,7 +127860,7 @@ module.exports = Percent; /***/ }), -/* 716 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -126216,7 +127890,7 @@ module.exports = MinSub; /***/ }), -/* 717 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -126246,7 +127920,7 @@ module.exports = MaxAdd; /***/ }), -/* 718 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -126275,7 +127949,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 719 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -126306,7 +127980,7 @@ module.exports = IsEven; /***/ }), -/* 720 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -126335,7 +128009,7 @@ module.exports = GetSpeed; /***/ }), -/* 721 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -126372,7 +128046,7 @@ module.exports = FloorTo; /***/ }), -/* 722 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -126401,7 +128075,7 @@ module.exports = Difference; /***/ }), -/* 723 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -126438,7 +128112,7 @@ module.exports = CeilTo; /***/ }), -/* 724 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -126473,7 +128147,7 @@ module.exports = Average; /***/ }), -/* 725 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -126516,7 +128190,7 @@ module.exports = SnapTo; /***/ }), -/* 726 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126533,13 +128207,13 @@ module.exports = { Ceil: __webpack_require__(351), Floor: __webpack_require__(146), - To: __webpack_require__(725) + To: __webpack_require__(730) }; /***/ }), -/* 727 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -126567,7 +128241,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 728 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126584,13 +128258,13 @@ module.exports = { GetNext: __webpack_require__(414), IsSize: __webpack_require__(84), - IsValue: __webpack_require__(727) + IsValue: __webpack_require__(732) }; /***/ }), -/* 729 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126623,7 +128297,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 730 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126632,7 +128306,7 @@ module.exports = SmootherStepInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(124); +var Linear = __webpack_require__(125); /** * A linear interpolation method. @@ -126669,7 +128343,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 731 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126678,7 +128352,7 @@ module.exports = LinearInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CatmullRom = __webpack_require__(265); +var CatmullRom = __webpack_require__(266); /** * A Catmull-Rom interpolation method. @@ -126726,7 +128400,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 732 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126765,7 +128439,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 733 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126780,19 +128454,19 @@ module.exports = BezierInterpolation; module.exports = { - Bezier: __webpack_require__(732), - CatmullRom: __webpack_require__(731), - CubicBezier: __webpack_require__(523), - Linear: __webpack_require__(730), - QuadraticBezier: __webpack_require__(519), - SmoothStep: __webpack_require__(252), - SmootherStep: __webpack_require__(729) + Bezier: __webpack_require__(737), + CatmullRom: __webpack_require__(736), + CubicBezier: __webpack_require__(528), + Linear: __webpack_require__(735), + QuadraticBezier: __webpack_require__(524), + SmoothStep: __webpack_require__(254), + SmootherStep: __webpack_require__(734) }; /***/ }), -/* 734 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -126823,7 +128497,7 @@ module.exports = Floor; /***/ }), -/* 735 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -126854,7 +128528,7 @@ module.exports = Ceil; /***/ }), -/* 736 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126869,9 +128543,9 @@ module.exports = Ceil; module.exports = { - Ceil: __webpack_require__(735), + Ceil: __webpack_require__(740), Equal: __webpack_require__(356), - Floor: __webpack_require__(734), + Floor: __webpack_require__(739), GreaterThan: __webpack_require__(355), LessThan: __webpack_require__(354) @@ -126879,7 +128553,7 @@ module.exports = { /***/ }), -/* 737 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126894,24 +128568,24 @@ module.exports = { module.exports = { - Back: __webpack_require__(282), - Bounce: __webpack_require__(281), - Circular: __webpack_require__(280), - Cubic: __webpack_require__(279), - Elastic: __webpack_require__(278), - Expo: __webpack_require__(277), - Linear: __webpack_require__(276), - Quadratic: __webpack_require__(275), - Quartic: __webpack_require__(274), - Quintic: __webpack_require__(273), - Sine: __webpack_require__(272), - Stepped: __webpack_require__(271) + Back: __webpack_require__(283), + Bounce: __webpack_require__(282), + Circular: __webpack_require__(281), + Cubic: __webpack_require__(280), + Elastic: __webpack_require__(279), + Expo: __webpack_require__(278), + Linear: __webpack_require__(277), + Quadratic: __webpack_require__(276), + Quartic: __webpack_require__(275), + Quintic: __webpack_require__(274), + Sine: __webpack_require__(273), + Stepped: __webpack_require__(272) }; /***/ }), -/* 738 */ +/* 743 */ /***/ (function(module, exports) { /** @@ -126945,7 +128619,7 @@ module.exports = DistanceSquared; /***/ }), -/* 739 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -126979,7 +128653,7 @@ module.exports = DistancePower; /***/ }), -/* 740 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126995,14 +128669,14 @@ module.exports = DistancePower; module.exports = { Between: __webpack_require__(58), - Power: __webpack_require__(739), - Squared: __webpack_require__(738) + Power: __webpack_require__(744), + Squared: __webpack_require__(743) }; /***/ }), -/* 741 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -127051,7 +128725,7 @@ module.exports = ShortestBetween; /***/ }), -/* 742 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127118,7 +128792,7 @@ module.exports = RotateTo; /***/ }), -/* 743 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127148,7 +128822,7 @@ module.exports = Reverse; /***/ }), -/* 744 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -127180,7 +128854,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 745 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -127211,7 +128885,7 @@ module.exports = BetweenPoints; /***/ }), -/* 746 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -127245,7 +128919,7 @@ module.exports = BetweenY; /***/ }), -/* 747 */ +/* 752 */ /***/ (function(module, exports) { /** @@ -127276,7 +128950,7 @@ module.exports = Between; /***/ }), -/* 748 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127291,22 +128965,22 @@ module.exports = Between; module.exports = { - Between: __webpack_require__(747), - BetweenY: __webpack_require__(746), - BetweenPoints: __webpack_require__(745), - BetweenPointsY: __webpack_require__(744), - Reverse: __webpack_require__(743), - RotateTo: __webpack_require__(742), - ShortestBetween: __webpack_require__(741), + Between: __webpack_require__(752), + BetweenY: __webpack_require__(751), + BetweenPoints: __webpack_require__(750), + BetweenPointsY: __webpack_require__(749), + Reverse: __webpack_require__(748), + RotateTo: __webpack_require__(747), + ShortestBetween: __webpack_require__(746), Normalize: __webpack_require__(357), - Wrap: __webpack_require__(218), - WrapDegrees: __webpack_require__(217) + Wrap: __webpack_require__(220), + WrapDegrees: __webpack_require__(219) }; /***/ }), -/* 749 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127325,61 +128999,61 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(748), - Distance: __webpack_require__(740), - Easing: __webpack_require__(737), - Fuzzy: __webpack_require__(736), - Interpolation: __webpack_require__(733), - Pow2: __webpack_require__(728), - Snap: __webpack_require__(726), + Angle: __webpack_require__(753), + Distance: __webpack_require__(745), + Easing: __webpack_require__(742), + Fuzzy: __webpack_require__(741), + Interpolation: __webpack_require__(738), + Pow2: __webpack_require__(733), + Snap: __webpack_require__(731), // Expose the RNG Class RandomDataGenerator: __webpack_require__(300), // Single functions - Average: __webpack_require__(724), + Average: __webpack_require__(729), Bernstein: __webpack_require__(353), - Between: __webpack_require__(153), - CatmullRom: __webpack_require__(265), - CeilTo: __webpack_require__(723), + Between: __webpack_require__(154), + CatmullRom: __webpack_require__(266), + CeilTo: __webpack_require__(728), Clamp: __webpack_require__(20), DegToRad: __webpack_require__(39), - Difference: __webpack_require__(722), + Difference: __webpack_require__(727), Factorial: __webpack_require__(352), - FloatBetween: __webpack_require__(243), - FloorTo: __webpack_require__(721), + FloatBetween: __webpack_require__(245), + FloorTo: __webpack_require__(726), FromPercent: __webpack_require__(65), - GetSpeed: __webpack_require__(720), - IsEven: __webpack_require__(719), - IsEvenStrict: __webpack_require__(718), - Linear: __webpack_require__(124), - MaxAdd: __webpack_require__(717), - MinSub: __webpack_require__(716), - Percent: __webpack_require__(715), - RadToDeg: __webpack_require__(154), - RandomXY: __webpack_require__(714), - RandomXYZ: __webpack_require__(534), - RandomXYZW: __webpack_require__(533), + GetSpeed: __webpack_require__(725), + IsEven: __webpack_require__(724), + IsEvenStrict: __webpack_require__(723), + Linear: __webpack_require__(125), + MaxAdd: __webpack_require__(722), + MinSub: __webpack_require__(721), + Percent: __webpack_require__(720), + RadToDeg: __webpack_require__(155), + RandomXY: __webpack_require__(719), + RandomXYZ: __webpack_require__(539), + RandomXYZW: __webpack_require__(538), Rotate: __webpack_require__(350), RotateAround: __webpack_require__(295), RotateAroundDistance: __webpack_require__(291), - RoundAwayFromZero: __webpack_require__(249), - RoundTo: __webpack_require__(713), - SinCosTableGenerator: __webpack_require__(712), + RoundAwayFromZero: __webpack_require__(251), + RoundTo: __webpack_require__(718), + SinCosTableGenerator: __webpack_require__(717), SmootherStep: __webpack_require__(290), - SmoothStep: __webpack_require__(159), - TransformXY: __webpack_require__(251), - Within: __webpack_require__(711), + SmoothStep: __webpack_require__(160), + TransformXY: __webpack_require__(253), + Within: __webpack_require__(716), Wrap: __webpack_require__(40), // Vector classes Vector2: __webpack_require__(4), Vector3: __webpack_require__(87), - Vector4: __webpack_require__(155), - Matrix3: __webpack_require__(530), - Matrix4: __webpack_require__(269), - Quaternion: __webpack_require__(531), - RotateVec3: __webpack_require__(532) + Vector4: __webpack_require__(156), + Matrix3: __webpack_require__(535), + Matrix4: __webpack_require__(270), + Quaternion: __webpack_require__(536), + RotateVec3: __webpack_require__(537) }; @@ -127393,7 +129067,7 @@ module.exports = PhaserMath; /***/ }), -/* 750 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127408,7 +129082,7 @@ var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(37); -var TextFile = __webpack_require__(230); +var TextFile = __webpack_require__(232); /** * @typedef {object} Phaser.Loader.FileTypes.UnityAtlasFileConfig @@ -127645,7 +129319,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 751 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127656,8 +129330,8 @@ module.exports = UnityAtlasFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); -var TILEMAP_FORMATS = __webpack_require__(27); +var JSONFile = __webpack_require__(29); +var TILEMAP_FORMATS = __webpack_require__(28); /** * @typedef {object} Phaser.Loader.FileTypes.TilemapJSONFileConfig @@ -127810,7 +129484,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 752 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127821,8 +129495,8 @@ module.exports = TilemapJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); -var TILEMAP_FORMATS = __webpack_require__(27); +var JSONFile = __webpack_require__(29); +var TILEMAP_FORMATS = __webpack_require__(28); /** * @typedef {object} Phaser.Loader.FileTypes.TilemapImpactFileConfig @@ -127975,7 +129649,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 753 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127990,7 +129664,7 @@ var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(27); +var TILEMAP_FORMATS = __webpack_require__(28); /** * @typedef {object} Phaser.Loader.FileTypes.TilemapCSVFileConfig @@ -128179,7 +129853,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 754 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128421,7 +130095,7 @@ module.exports = SVGFile; /***/ }), -/* 755 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128638,7 +130312,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 756 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128650,7 +130324,7 @@ module.exports = ScenePluginFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); /** * @typedef {object} Phaser.Loader.FileTypes.PackFileConfig @@ -128866,7 +130540,7 @@ module.exports = PackFile; /***/ }), -/* 757 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129135,7 +130809,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 758 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129319,7 +130993,7 @@ module.exports = HTMLFile; /***/ }), -/* 759 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129504,7 +131178,7 @@ module.exports = GLSLFile; /***/ }), -/* 760 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129760,7 +131434,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 761 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129952,7 +131626,7 @@ module.exports = BinaryFile; /***/ }), -/* 762 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130207,7 +131881,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 763 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130224,36 +131898,36 @@ module.exports = { AnimationJSONFile: __webpack_require__(365), AtlasJSONFile: __webpack_require__(364), - AtlasXMLFile: __webpack_require__(762), - AudioFile: __webpack_require__(175), + AtlasXMLFile: __webpack_require__(767), + AudioFile: __webpack_require__(176), AudioSpriteFile: __webpack_require__(363), - BinaryFile: __webpack_require__(761), - BitmapFontFile: __webpack_require__(760), - GLSLFile: __webpack_require__(759), - HTML5AudioFile: __webpack_require__(174), - HTMLFile: __webpack_require__(758), - HTMLTextureFile: __webpack_require__(757), + BinaryFile: __webpack_require__(766), + BitmapFontFile: __webpack_require__(765), + GLSLFile: __webpack_require__(764), + HTML5AudioFile: __webpack_require__(175), + HTMLFile: __webpack_require__(763), + HTMLTextureFile: __webpack_require__(762), ImageFile: __webpack_require__(38), - JSONFile: __webpack_require__(28), + JSONFile: __webpack_require__(29), MultiAtlasFile: __webpack_require__(362), - PackFile: __webpack_require__(756), + PackFile: __webpack_require__(761), PluginFile: __webpack_require__(361), - ScenePluginFile: __webpack_require__(755), + ScenePluginFile: __webpack_require__(760), ScriptFile: __webpack_require__(360), SpriteSheetFile: __webpack_require__(359), - SVGFile: __webpack_require__(754), - TextFile: __webpack_require__(230), - TilemapCSVFile: __webpack_require__(753), - TilemapImpactFile: __webpack_require__(752), - TilemapJSONFile: __webpack_require__(751), - UnityAtlasFile: __webpack_require__(750), + SVGFile: __webpack_require__(759), + TextFile: __webpack_require__(232), + TilemapCSVFile: __webpack_require__(758), + TilemapImpactFile: __webpack_require__(757), + TilemapJSONFile: __webpack_require__(756), + UnityAtlasFile: __webpack_require__(755), XMLFile: __webpack_require__(145) }; /***/ }), -/* 764 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130271,15 +131945,15 @@ var Extend = __webpack_require__(17); var Loader = { - FileTypes: __webpack_require__(763), + FileTypes: __webpack_require__(768), File: __webpack_require__(19), FileTypesManager: __webpack_require__(6), - GetURL: __webpack_require__(109), + GetURL: __webpack_require__(110), LoaderPlugin: __webpack_require__(358), - MergeXHRSettings: __webpack_require__(108), + MergeXHRSettings: __webpack_require__(109), MultiFile: __webpack_require__(37), - XHRLoader: __webpack_require__(176), + XHRLoader: __webpack_require__(177), XHRSettings: __webpack_require__(75) }; @@ -130291,7 +131965,7 @@ module.exports = Loader; /***/ }), -/* 765 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130300,7 +131974,7 @@ module.exports = Loader; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(231); +var RotateAroundXY = __webpack_require__(233); /** * [description] @@ -130325,7 +131999,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 766 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130334,7 +132008,7 @@ module.exports = RotateAroundPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(231); +var RotateAroundXY = __webpack_require__(233); var InCenter = __webpack_require__(389); /** @@ -130361,7 +132035,7 @@ module.exports = Rotate; /***/ }), -/* 767 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130397,7 +132071,7 @@ module.exports = Perimeter; /***/ }), -/* 768 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -130433,7 +132107,7 @@ module.exports = Equals; /***/ }), -/* 769 */ +/* 774 */ /***/ (function(module, exports) { /** @@ -130464,7 +132138,7 @@ module.exports = CopyFrom; /***/ }), -/* 770 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130495,7 +132169,7 @@ module.exports = ContainsPoint; /***/ }), -/* 771 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130525,7 +132199,7 @@ module.exports = Clone; /***/ }), -/* 772 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130534,7 +132208,7 @@ module.exports = Clone; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); // Adapted from https://gist.github.com/mutoo/5617691 @@ -130608,7 +132282,7 @@ module.exports = CircumCircle; /***/ }), -/* 773 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130684,7 +132358,7 @@ module.exports = CircumCenter; /***/ }), -/* 774 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130737,7 +132411,7 @@ module.exports = CenterOn; /***/ }), -/* 775 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130786,7 +132460,7 @@ module.exports = BuildRight; /***/ }), -/* 776 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130795,7 +132469,7 @@ module.exports = BuildRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EarCut = __webpack_require__(253); +var EarCut = __webpack_require__(255); var Triangle = __webpack_require__(68); /** @@ -130861,7 +132535,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 777 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130911,7 +132585,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 778 */ +/* 783 */ /***/ (function(module, exports) { /** @@ -130950,7 +132624,7 @@ module.exports = Area; /***/ }), -/* 779 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130961,36 +132635,36 @@ module.exports = Area; var Triangle = __webpack_require__(68); -Triangle.Area = __webpack_require__(778); -Triangle.BuildEquilateral = __webpack_require__(777); -Triangle.BuildFromPolygon = __webpack_require__(776); -Triangle.BuildRight = __webpack_require__(775); -Triangle.CenterOn = __webpack_require__(774); +Triangle.Area = __webpack_require__(783); +Triangle.BuildEquilateral = __webpack_require__(782); +Triangle.BuildFromPolygon = __webpack_require__(781); +Triangle.BuildRight = __webpack_require__(780); +Triangle.CenterOn = __webpack_require__(779); Triangle.Centroid = __webpack_require__(391); -Triangle.CircumCenter = __webpack_require__(773); -Triangle.CircumCircle = __webpack_require__(772); -Triangle.Clone = __webpack_require__(771); +Triangle.CircumCenter = __webpack_require__(778); +Triangle.CircumCircle = __webpack_require__(777); +Triangle.Clone = __webpack_require__(776); Triangle.Contains = __webpack_require__(61); -Triangle.ContainsArray = __webpack_require__(237); -Triangle.ContainsPoint = __webpack_require__(770); -Triangle.CopyFrom = __webpack_require__(769); +Triangle.ContainsArray = __webpack_require__(239); +Triangle.ContainsPoint = __webpack_require__(775); +Triangle.CopyFrom = __webpack_require__(774); Triangle.Decompose = __webpack_require__(398); -Triangle.Equals = __webpack_require__(768); -Triangle.GetPoint = __webpack_require__(233); -Triangle.GetPoints = __webpack_require__(232); +Triangle.Equals = __webpack_require__(773); +Triangle.GetPoint = __webpack_require__(235); +Triangle.GetPoints = __webpack_require__(234); Triangle.InCenter = __webpack_require__(389); -Triangle.Perimeter = __webpack_require__(767); +Triangle.Perimeter = __webpack_require__(772); Triangle.Offset = __webpack_require__(390); -Triangle.Random = __webpack_require__(160); -Triangle.Rotate = __webpack_require__(766); -Triangle.RotateAroundPoint = __webpack_require__(765); -Triangle.RotateAroundXY = __webpack_require__(231); +Triangle.Random = __webpack_require__(161); +Triangle.Rotate = __webpack_require__(771); +Triangle.RotateAroundPoint = __webpack_require__(770); +Triangle.RotateAroundXY = __webpack_require__(233); module.exports = Triangle; /***/ }), -/* 780 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -131029,7 +132703,7 @@ module.exports = Scale; /***/ }), -/* 781 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131038,7 +132712,7 @@ module.exports = Scale; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Between = __webpack_require__(153); +var Between = __webpack_require__(154); var ContainsRect = __webpack_require__(392); var Point = __webpack_require__(5); @@ -131100,7 +132774,7 @@ module.exports = RandomOutside; /***/ }), -/* 782 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131157,7 +132831,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 783 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -131191,7 +132865,7 @@ module.exports = Overlaps; /***/ }), -/* 784 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -131225,7 +132899,7 @@ module.exports = OffsetPoint; /***/ }), -/* 785 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -131260,7 +132934,7 @@ module.exports = Offset; /***/ }), -/* 786 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -131304,7 +132978,7 @@ module.exports = MergeXY; /***/ }), -/* 787 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -131350,7 +133024,7 @@ module.exports = MergeRect; /***/ }), -/* 788 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -131402,7 +133076,7 @@ module.exports = MergePoints; /***/ }), -/* 789 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131412,7 +133086,7 @@ module.exports = MergePoints; */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(238); +var Intersects = __webpack_require__(240); /** * Takes two Rectangles and first checks to see if they intersect. @@ -131453,7 +133127,7 @@ module.exports = Intersection; /***/ }), -/* 790 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131462,7 +133136,7 @@ module.exports = Intersection; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(157); +var CenterOn = __webpack_require__(158); // Increases the size of the Rectangle object by the specified amounts. // The center point of the Rectangle object stays the same, and its size increases @@ -131496,7 +133170,7 @@ module.exports = Inflate; /***/ }), -/* 791 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131537,7 +133211,7 @@ module.exports = GetSize; /***/ }), -/* 792 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131577,7 +133251,7 @@ module.exports = GetCenter; /***/ }), -/* 793 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -131612,7 +133286,7 @@ module.exports = FloorAll; /***/ }), -/* 794 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -131645,7 +133319,7 @@ module.exports = Floor; /***/ }), -/* 795 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131654,7 +133328,7 @@ module.exports = Floor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(234); +var GetAspectRatio = __webpack_require__(236); // Fits the target rectangle around the source rectangle. // Preserves aspect ration. @@ -131698,7 +133372,7 @@ module.exports = FitOutside; /***/ }), -/* 796 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131707,7 +133381,7 @@ module.exports = FitOutside; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(234); +var GetAspectRatio = __webpack_require__(236); // Fits the target rectangle into the source rectangle. // Preserves aspect ratio. @@ -131751,7 +133425,7 @@ module.exports = FitInside; /***/ }), -/* 797 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -131785,7 +133459,7 @@ module.exports = Equals; /***/ }), -/* 798 */ +/* 803 */ /***/ (function(module, exports) { /** @@ -131816,7 +133490,7 @@ module.exports = CopyFrom; /***/ }), -/* 799 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131825,7 +133499,7 @@ module.exports = CopyFrom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(31); +var Contains = __webpack_require__(32); /** * [description] @@ -131847,7 +133521,7 @@ module.exports = ContainsPoint; /***/ }), -/* 800 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131877,7 +133551,7 @@ module.exports = Clone; /***/ }), -/* 801 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -131912,7 +133586,7 @@ module.exports = CeilAll; /***/ }), -/* 802 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -131945,7 +133619,7 @@ module.exports = Ceil; /***/ }), -/* 803 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -131973,7 +133647,7 @@ module.exports = Area; /***/ }), -/* 804 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -132014,7 +133688,7 @@ module.exports = GetNumberArray; /***/ }), -/* 805 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132070,7 +133744,7 @@ module.exports = GetAABB; /***/ }), -/* 806 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132079,7 +133753,7 @@ module.exports = GetAABB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(235); +var Contains = __webpack_require__(237); /** * [description] @@ -132101,7 +133775,7 @@ module.exports = ContainsPoint; /***/ }), -/* 807 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132131,7 +133805,7 @@ module.exports = Clone; /***/ }), -/* 808 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132142,17 +133816,17 @@ module.exports = Clone; var Polygon = __webpack_require__(394); -Polygon.Clone = __webpack_require__(807); -Polygon.Contains = __webpack_require__(235); -Polygon.ContainsPoint = __webpack_require__(806); -Polygon.GetAABB = __webpack_require__(805); -Polygon.GetNumberArray = __webpack_require__(804); +Polygon.Clone = __webpack_require__(812); +Polygon.Contains = __webpack_require__(237); +Polygon.ContainsPoint = __webpack_require__(811); +Polygon.GetAABB = __webpack_require__(810); +Polygon.GetNumberArray = __webpack_require__(809); module.exports = Polygon; /***/ }), -/* 809 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132196,7 +133870,7 @@ module.exports = SetMagnitude; /***/ }), -/* 810 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132240,7 +133914,7 @@ module.exports = ProjectUnit; /***/ }), -/* 811 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132286,7 +133960,7 @@ module.exports = Project; /***/ }), -/* 812 */ +/* 817 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132321,7 +133995,7 @@ module.exports = Negative; /***/ }), -/* 813 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -132351,7 +134025,7 @@ module.exports = Invert; /***/ }), -/* 814 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132392,7 +134066,7 @@ module.exports = Interpolate; /***/ }), -/* 815 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132462,7 +134136,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 816 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132525,7 +134199,7 @@ module.exports = GetCentroid; /***/ }), -/* 817 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -132555,7 +134229,7 @@ module.exports = Floor; /***/ }), -/* 818 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -132584,7 +134258,7 @@ module.exports = Equals; /***/ }), -/* 819 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -132615,7 +134289,7 @@ module.exports = CopyFrom; /***/ }), -/* 820 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132645,7 +134319,7 @@ module.exports = Clone; /***/ }), -/* 821 */ +/* 826 */ /***/ (function(module, exports) { /** @@ -132675,7 +134349,7 @@ module.exports = Ceil; /***/ }), -/* 822 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132686,27 +134360,27 @@ module.exports = Ceil; var Point = __webpack_require__(5); -Point.Ceil = __webpack_require__(821); -Point.Clone = __webpack_require__(820); -Point.CopyFrom = __webpack_require__(819); -Point.Equals = __webpack_require__(818); -Point.Floor = __webpack_require__(817); -Point.GetCentroid = __webpack_require__(816); +Point.Ceil = __webpack_require__(826); +Point.Clone = __webpack_require__(825); +Point.CopyFrom = __webpack_require__(824); +Point.Equals = __webpack_require__(823); +Point.Floor = __webpack_require__(822); +Point.GetCentroid = __webpack_require__(821); Point.GetMagnitude = __webpack_require__(396); Point.GetMagnitudeSq = __webpack_require__(395); -Point.GetRectangleFromPoints = __webpack_require__(815); -Point.Interpolate = __webpack_require__(814); -Point.Invert = __webpack_require__(813); -Point.Negative = __webpack_require__(812); -Point.Project = __webpack_require__(811); -Point.ProjectUnit = __webpack_require__(810); -Point.SetMagnitude = __webpack_require__(809); +Point.GetRectangleFromPoints = __webpack_require__(820); +Point.Interpolate = __webpack_require__(819); +Point.Invert = __webpack_require__(818); +Point.Negative = __webpack_require__(817); +Point.Project = __webpack_require__(816); +Point.ProjectUnit = __webpack_require__(815); +Point.SetMagnitude = __webpack_require__(814); module.exports = Point; /***/ }), -/* 823 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -132734,7 +134408,7 @@ module.exports = Width; /***/ }), -/* 824 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -132762,7 +134436,7 @@ module.exports = Slope; /***/ }), -/* 825 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -132802,7 +134476,7 @@ module.exports = SetToAngle; /***/ }), -/* 826 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132811,7 +134485,7 @@ module.exports = SetToAngle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(236); +var RotateAroundXY = __webpack_require__(238); /** * Rotate a line around a point by the given angle in radians. @@ -132836,7 +134510,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 827 */ +/* 832 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132845,7 +134519,7 @@ module.exports = RotateAroundPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(236); +var RotateAroundXY = __webpack_require__(238); /** * Rotate a line around its midpoint by the given angle in radians. @@ -132872,7 +134546,7 @@ module.exports = Rotate; /***/ }), -/* 828 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132906,7 +134580,7 @@ module.exports = ReflectAngle; /***/ }), -/* 829 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -132934,7 +134608,7 @@ module.exports = PerpSlope; /***/ }), -/* 830 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -132972,7 +134646,7 @@ module.exports = Offset; /***/ }), -/* 831 */ +/* 836 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133003,7 +134677,7 @@ module.exports = NormalY; /***/ }), -/* 832 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133034,7 +134708,7 @@ module.exports = NormalX; /***/ }), -/* 833 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -133062,7 +134736,7 @@ module.exports = Height; /***/ }), -/* 834 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133106,7 +134780,7 @@ module.exports = GetNormal; /***/ }), -/* 835 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133144,7 +134818,7 @@ module.exports = GetMidPoint; /***/ }), -/* 836 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -133178,7 +134852,7 @@ module.exports = Equals; /***/ }), -/* 837 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -133209,7 +134883,7 @@ module.exports = CopyFrom; /***/ }), -/* 838 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133218,7 +134892,7 @@ module.exports = CopyFrom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(97); +var Line = __webpack_require__(98); /** * Clone the given line. @@ -133239,7 +134913,7 @@ module.exports = Clone; /***/ }), -/* 839 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -133279,7 +134953,7 @@ module.exports = CenterOn; /***/ }), -/* 840 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133288,39 +134962,39 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(97); +var Line = __webpack_require__(98); Line.Angle = __webpack_require__(82); -Line.BresenhamPoints = __webpack_require__(576); -Line.CenterOn = __webpack_require__(839); -Line.Clone = __webpack_require__(838); -Line.CopyFrom = __webpack_require__(837); -Line.Equals = __webpack_require__(836); -Line.GetMidPoint = __webpack_require__(835); -Line.GetNormal = __webpack_require__(834); +Line.BresenhamPoints = __webpack_require__(581); +Line.CenterOn = __webpack_require__(844); +Line.Clone = __webpack_require__(843); +Line.CopyFrom = __webpack_require__(842); +Line.Equals = __webpack_require__(841); +Line.GetMidPoint = __webpack_require__(840); +Line.GetNormal = __webpack_require__(839); Line.GetPoint = __webpack_require__(296); -Line.GetPoints = __webpack_require__(163); -Line.Height = __webpack_require__(833); +Line.GetPoints = __webpack_require__(164); +Line.Height = __webpack_require__(838); Line.Length = __webpack_require__(71); Line.NormalAngle = __webpack_require__(397); -Line.NormalX = __webpack_require__(832); -Line.NormalY = __webpack_require__(831); -Line.Offset = __webpack_require__(830); -Line.PerpSlope = __webpack_require__(829); -Line.Random = __webpack_require__(162); -Line.ReflectAngle = __webpack_require__(828); -Line.Rotate = __webpack_require__(827); -Line.RotateAroundPoint = __webpack_require__(826); -Line.RotateAroundXY = __webpack_require__(236); -Line.SetToAngle = __webpack_require__(825); -Line.Slope = __webpack_require__(824); -Line.Width = __webpack_require__(823); +Line.NormalX = __webpack_require__(837); +Line.NormalY = __webpack_require__(836); +Line.Offset = __webpack_require__(835); +Line.PerpSlope = __webpack_require__(834); +Line.Random = __webpack_require__(163); +Line.ReflectAngle = __webpack_require__(833); +Line.Rotate = __webpack_require__(832); +Line.RotateAroundPoint = __webpack_require__(831); +Line.RotateAroundXY = __webpack_require__(238); +Line.SetToAngle = __webpack_require__(830); +Line.Slope = __webpack_require__(829); +Line.Width = __webpack_require__(828); module.exports = Line; /***/ }), -/* 841 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133329,7 +135003,7 @@ module.exports = Line; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ContainsArray = __webpack_require__(237); +var ContainsArray = __webpack_require__(239); var Decompose = __webpack_require__(398); var LineToLine = __webpack_require__(147); @@ -133408,7 +135082,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 842 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133462,7 +135136,7 @@ module.exports = TriangleToLine; /***/ }), -/* 843 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133525,7 +135199,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 844 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -133565,7 +135239,7 @@ module.exports = RectangleToValues; /***/ }), -/* 845 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133575,8 +135249,8 @@ module.exports = RectangleToValues; */ var LineToLine = __webpack_require__(147); -var Contains = __webpack_require__(31); -var ContainsArray = __webpack_require__(237); +var Contains = __webpack_require__(32); +var ContainsArray = __webpack_require__(239); var Decompose = __webpack_require__(399); /** @@ -133658,7 +135332,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 846 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133699,7 +135373,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 847 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -133800,7 +135474,7 @@ module.exports = LineToRectangle; /***/ }), -/* 848 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133810,7 +135484,7 @@ module.exports = LineToRectangle; */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(238); +var RectangleToRectangle = __webpack_require__(240); /** * [description] @@ -133845,7 +135519,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 849 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -133899,7 +135573,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 850 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133930,7 +135604,7 @@ module.exports = CircleToCircle; /***/ }), -/* 851 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -133964,7 +135638,7 @@ module.exports = OffsetPoint; /***/ }), -/* 852 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -133999,7 +135673,7 @@ module.exports = Offset; /***/ }), -/* 853 */ +/* 858 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134039,7 +135713,7 @@ module.exports = GetBounds; /***/ }), -/* 854 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -134073,7 +135747,7 @@ module.exports = Equals; /***/ }), -/* 855 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -134105,7 +135779,7 @@ module.exports = CopyFrom; /***/ }), -/* 856 */ +/* 861 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134141,7 +135815,7 @@ module.exports = ContainsRect; /***/ }), -/* 857 */ +/* 862 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134172,7 +135846,7 @@ module.exports = ContainsPoint; /***/ }), -/* 858 */ +/* 863 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134181,7 +135855,7 @@ module.exports = ContainsPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); /** * Creates a new Circle instance based on the values contained in the given source. @@ -134202,7 +135876,7 @@ module.exports = Clone; /***/ }), -/* 859 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -134230,7 +135904,7 @@ module.exports = Area; /***/ }), -/* 860 */ +/* 865 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134239,29 +135913,29 @@ module.exports = Area; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); -Circle.Area = __webpack_require__(859); +Circle.Area = __webpack_require__(864); Circle.Circumference = __webpack_require__(298); Circle.CircumferencePoint = __webpack_require__(138); -Circle.Clone = __webpack_require__(858); +Circle.Clone = __webpack_require__(863); Circle.Contains = __webpack_require__(33); -Circle.ContainsPoint = __webpack_require__(857); -Circle.ContainsRect = __webpack_require__(856); -Circle.CopyFrom = __webpack_require__(855); -Circle.Equals = __webpack_require__(854); -Circle.GetBounds = __webpack_require__(853); +Circle.ContainsPoint = __webpack_require__(862); +Circle.ContainsRect = __webpack_require__(861); +Circle.CopyFrom = __webpack_require__(860); +Circle.Equals = __webpack_require__(859); +Circle.GetBounds = __webpack_require__(858); Circle.GetPoint = __webpack_require__(301); Circle.GetPoints = __webpack_require__(299); -Circle.Offset = __webpack_require__(852); -Circle.OffsetPoint = __webpack_require__(851); -Circle.Random = __webpack_require__(164); +Circle.Offset = __webpack_require__(857); +Circle.OffsetPoint = __webpack_require__(856); +Circle.Random = __webpack_require__(165); module.exports = Circle; /***/ }), -/* 861 */ +/* 866 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134376,7 +136050,7 @@ module.exports = LightsPlugin; /***/ }), -/* 862 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134386,9 +136060,9 @@ module.exports = LightsPlugin; */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Quad = __webpack_require__(239); +var Quad = __webpack_require__(241); /** * Creates a new Quad Game Object and returns it. @@ -134426,7 +136100,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 863 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134436,7 +136110,7 @@ GameObjectCreator.register('quad', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var GetValue = __webpack_require__(3); var Mesh = __webpack_require__(148); @@ -134481,7 +136155,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 864 */ +/* 869 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134490,7 +136164,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Quad = __webpack_require__(239); +var Quad = __webpack_require__(241); var GameObjectFactory = __webpack_require__(9); /** @@ -134527,7 +136201,7 @@ if (true) /***/ }), -/* 865 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134577,7 +136251,7 @@ if (true) /***/ }), -/* 866 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -134606,7 +136280,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 867 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134724,7 +136398,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 868 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134738,12 +136412,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(867); + renderWebGL = __webpack_require__(872); } if (true) { - renderCanvas = __webpack_require__(866); + renderCanvas = __webpack_require__(871); } module.exports = { @@ -134755,7 +136429,7 @@ module.exports = { /***/ }), -/* 869 */ +/* 874 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134764,9 +136438,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Zone = __webpack_require__(165); +var Zone = __webpack_require__(166); /** * Creates a new Zone Game Object and returns it. @@ -134794,7 +136468,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 870 */ +/* 875 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134804,9 +136478,9 @@ GameObjectCreator.register('zone', function (config) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var TileSprite = __webpack_require__(240); +var TileSprite = __webpack_require__(242); /** * @typedef {object} TileSprite @@ -134860,7 +136534,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 871 */ +/* 876 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134871,7 +136545,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var BitmapText = __webpack_require__(149); var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var GetValue = __webpack_require__(3); @@ -134913,7 +136587,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 872 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134924,9 +136598,9 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) var BuildGameObject = __webpack_require__(25); var BuildGameObjectAnimation = __webpack_require__(130); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Sprite3D = __webpack_require__(156); +var Sprite3D = __webpack_require__(157); /** * Creates a new Sprite3D Game Object and returns it. @@ -134968,7 +136642,7 @@ GameObjectCreator.register('sprite3D', function (config, addToScene) /***/ }), -/* 873 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134978,9 +136652,9 @@ GameObjectCreator.register('sprite3D', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var RenderTexture = __webpack_require__(241); +var RenderTexture = __webpack_require__(243); /** * @typedef {object} RenderTextureConfig @@ -135027,7 +136701,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 874 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135036,10 +136710,10 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var GetFastValue = __webpack_require__(1); -var ParticleEmitterManager = __webpack_require__(242); +var ParticleEmitterManager = __webpack_require__(244); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -135084,7 +136758,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 875 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135093,8 +136767,8 @@ GameObjectCreator.register('particles', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); -var Group = __webpack_require__(113); +var GameObjectCreator = __webpack_require__(14); +var Group = __webpack_require__(114); /** * Creates a new Group Game Object and returns it. @@ -135117,7 +136791,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 876 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135126,9 +136800,9 @@ GameObjectCreator.register('group', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(245); +var BitmapText = __webpack_require__(247); var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); /** @@ -135177,7 +136851,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 877 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135188,8 +136862,8 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var Container = __webpack_require__(246); -var GameObjectCreator = __webpack_require__(13); +var Container = __webpack_require__(248); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); /** @@ -135226,7 +136900,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 878 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135235,9 +136909,9 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(247); +var Blitter = __webpack_require__(249); var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); /** @@ -135276,7 +136950,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 879 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135285,7 +136959,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Zone = __webpack_require__(165); +var Zone = __webpack_require__(166); var GameObjectFactory = __webpack_require__(9); /** @@ -135318,7 +136992,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 880 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135327,7 +137001,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileSprite = __webpack_require__(240); +var TileSprite = __webpack_require__(242); var GameObjectFactory = __webpack_require__(9); /** @@ -135362,7 +137036,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 881 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135406,7 +137080,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 882 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135415,7 +137089,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Sprite3D = __webpack_require__(156); +var Sprite3D = __webpack_require__(157); var GameObjectFactory = __webpack_require__(9); /** @@ -135454,7 +137128,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) /***/ }), -/* 883 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135464,7 +137138,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var RenderTexture = __webpack_require__(241); +var RenderTexture = __webpack_require__(243); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -135488,7 +137162,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height) /***/ }), -/* 884 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135536,7 +137210,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 885 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135546,7 +137220,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var ParticleEmitterManager = __webpack_require__(242); +var ParticleEmitterManager = __webpack_require__(244); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -135582,7 +137256,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 886 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135591,7 +137265,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Group = __webpack_require__(113); +var Group = __webpack_require__(114); var GameObjectFactory = __webpack_require__(9); /** @@ -135614,7 +137288,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 887 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135623,7 +137297,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var DynamicBitmapText = __webpack_require__(245); +var DynamicBitmapText = __webpack_require__(247); var GameObjectFactory = __webpack_require__(9); /** @@ -135657,7 +137331,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 888 */ +/* 893 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135698,7 +137372,7 @@ GameObjectFactory.register('dom', function (x, y, element) /***/ }), -/* 889 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135708,7 +137382,7 @@ GameObjectFactory.register('dom', function (x, y, element) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Container = __webpack_require__(246); +var Container = __webpack_require__(248); var GameObjectFactory = __webpack_require__(9); /** @@ -135732,7 +137406,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 890 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135741,7 +137415,7 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(247); +var Blitter = __webpack_require__(249); var GameObjectFactory = __webpack_require__(9); /** @@ -135774,7 +137448,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 891 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -135809,7 +137483,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 892 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135869,7 +137543,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 893 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135883,12 +137557,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(892); + renderWebGL = __webpack_require__(897); } if (true) { - renderCanvas = __webpack_require__(891); + renderCanvas = __webpack_require__(896); } module.exports = { @@ -135900,7 +137574,7 @@ module.exports = { /***/ }), -/* 894 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136016,7 +137690,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 895 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -136132,7 +137806,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 896 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136141,7 +137815,7 @@ module.exports = RETRO_FONT_CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(895); +var RETRO_FONT_CONST = __webpack_require__(900); var Extend = __webpack_require__(17); /** @@ -136164,7 +137838,7 @@ var Extend = __webpack_require__(17); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(894) }; +var RetroFont = { Parse: __webpack_require__(899) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -136173,7 +137847,7 @@ module.exports = RetroFont; /***/ }), -/* 897 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -136206,7 +137880,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 898 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136269,7 +137943,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 899 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136283,12 +137957,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(898); + renderWebGL = __webpack_require__(903); } if (true) { - renderCanvas = __webpack_require__(897); + renderCanvas = __webpack_require__(902); } module.exports = { @@ -136300,7 +137974,7 @@ module.exports = { /***/ }), -/* 900 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136323,7 +137997,7 @@ module.exports = { /***/ }), -/* 901 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -136444,7 +138118,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 902 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136594,7 +138268,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 903 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136608,12 +138282,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(902); + renderWebGL = __webpack_require__(907); } if (true) { - renderCanvas = __webpack_require__(901); + renderCanvas = __webpack_require__(906); } module.exports = { @@ -136625,7 +138299,7 @@ module.exports = { /***/ }), -/* 904 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136635,7 +138309,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(243); +var FloatBetween = __webpack_require__(245); var GetEaseFunction = __webpack_require__(64); var GetFastValue = __webpack_require__(1); var Wrap = __webpack_require__(40); @@ -137294,7 +138968,7 @@ module.exports = EmitterOp; /***/ }), -/* 905 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137312,14 +138986,14 @@ module.exports = { GravityWell: __webpack_require__(429), Particle: __webpack_require__(428), ParticleEmitter: __webpack_require__(427), - ParticleEmitterManager: __webpack_require__(242), - Zones: __webpack_require__(900) + ParticleEmitterManager: __webpack_require__(244), + Zones: __webpack_require__(905) }; /***/ }), -/* 906 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137328,7 +139002,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTransform = __webpack_require__(118); +var SetTransform = __webpack_require__(119); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -137495,7 +139169,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 907 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137801,7 +139475,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 908 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137815,12 +139489,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(907); + renderWebGL = __webpack_require__(912); } if (true) { - renderCanvas = __webpack_require__(906); + renderCanvas = __webpack_require__(911); } module.exports = { @@ -137832,7 +139506,7 @@ module.exports = { /***/ }), -/* 909 */ +/* 914 */ /***/ (function(module, exports) { /** @@ -137873,7 +139547,7 @@ module.exports = [ /***/ }), -/* 910 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137904,7 +139578,7 @@ module.exports = { /***/ }), -/* 911 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -137987,7 +139661,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 912 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -138065,7 +139739,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 913 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138080,12 +139754,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(912); + renderWebGL = __webpack_require__(917); } if (true) { - renderCanvas = __webpack_require__(911); + renderCanvas = __webpack_require__(916); } module.exports = { @@ -138097,7 +139771,7 @@ module.exports = { /***/ }), -/* 914 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138476,7 +140150,7 @@ module.exports = Bob; /***/ }), -/* 915 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -138604,7 +140278,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 916 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138734,7 +140408,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 917 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138748,12 +140422,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(916); + renderWebGL = __webpack_require__(921); } if (true) { - renderCanvas = __webpack_require__(915); + renderCanvas = __webpack_require__(920); } module.exports = { @@ -138765,7 +140439,7 @@ module.exports = { /***/ }), -/* 918 */ +/* 923 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138774,7 +140448,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTransform = __webpack_require__(118); +var SetTransform = __webpack_require__(119); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -138851,50 +140525,6 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, lineOffsetX = (lineData.longest - lineData.lengths[0]); } - /* - // Alpha - - var alpha = camera.alpha * src.alpha; - - if (alpha === 0) - { - // Nothing to see, so abort early - return; - } - - // Blend Mode - ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; - - // Alpha - ctx.globalAlpha = alpha; - - var tx = (src.x - camera.scrollX * src.scrollFactorX) + src.frame.x; - var ty = (src.y - camera.scrollY * src.scrollFactorY) + src.frame.y; - - var roundPixels = camera.roundPixels; - - if (roundPixels) - { - tx |= 0; - ty |= 0; - } - - ctx.save(); - - if (parentMatrix) - { - parentMatrix.copyToContext(ctx); - } - - ctx.translate(tx, ty); - - ctx.rotate(src.rotation); - - ctx.translate(-src.displayOriginX, -src.displayOriginY); - - ctx.scale(src.scaleX, src.scaleY); - */ - ctx.translate(-src.displayOriginX, -src.displayOriginY); var roundPixels = camera.roundPixels; @@ -138984,7 +140614,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 919 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139213,7 +140843,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 920 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139227,12 +140857,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(919); + renderWebGL = __webpack_require__(924); } if (true) { - renderCanvas = __webpack_require__(918); + renderCanvas = __webpack_require__(923); } module.exports = { @@ -139244,7 +140874,7 @@ module.exports = { /***/ }), -/* 921 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139297,7 +140927,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 922 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -139539,7 +141169,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 923 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139555,69 +141185,69 @@ module.exports = GetBitmapTextSize; var GameObjects = { DisplayList: __webpack_require__(476), - GameObjectCreator: __webpack_require__(13), + GameObjectCreator: __webpack_require__(14), GameObjectFactory: __webpack_require__(9), UpdateList: __webpack_require__(448), - Components: __webpack_require__(14), + Components: __webpack_require__(13), BuildGameObject: __webpack_require__(25), BuildGameObjectAnimation: __webpack_require__(130), GameObject: __webpack_require__(15), BitmapText: __webpack_require__(149), - Blitter: __webpack_require__(247), - Container: __webpack_require__(246), + Blitter: __webpack_require__(249), + Container: __webpack_require__(248), DOMElement: __webpack_require__(445), - DynamicBitmapText: __webpack_require__(245), - Graphics: __webpack_require__(117), - Group: __webpack_require__(113), + DynamicBitmapText: __webpack_require__(247), + Graphics: __webpack_require__(118), + Group: __webpack_require__(114), Image: __webpack_require__(69), - Particles: __webpack_require__(905), + Particles: __webpack_require__(910), PathFollower: __webpack_require__(422), - RenderTexture: __webpack_require__(241), - RetroFont: __webpack_require__(896), - Sprite3D: __webpack_require__(156), + RenderTexture: __webpack_require__(243), + RetroFont: __webpack_require__(901), + Sprite3D: __webpack_require__(157), Sprite: __webpack_require__(35), - Text: __webpack_require__(111), - TileSprite: __webpack_require__(240), - Zone: __webpack_require__(165), + Text: __webpack_require__(112), + TileSprite: __webpack_require__(242), + Zone: __webpack_require__(166), // Game Object Factories Factories: { - Blitter: __webpack_require__(890), - Container: __webpack_require__(889), - DOMElement: __webpack_require__(888), - DynamicBitmapText: __webpack_require__(887), + Blitter: __webpack_require__(895), + Container: __webpack_require__(894), + DOMElement: __webpack_require__(893), + DynamicBitmapText: __webpack_require__(892), Graphics: __webpack_require__(413), - Group: __webpack_require__(886), + Group: __webpack_require__(891), Image: __webpack_require__(412), - Particles: __webpack_require__(885), - PathFollower: __webpack_require__(884), - RenderTexture: __webpack_require__(883), - Sprite3D: __webpack_require__(882), + Particles: __webpack_require__(890), + PathFollower: __webpack_require__(889), + RenderTexture: __webpack_require__(888), + Sprite3D: __webpack_require__(887), Sprite: __webpack_require__(411), - StaticBitmapText: __webpack_require__(881), + StaticBitmapText: __webpack_require__(886), Text: __webpack_require__(410), - TileSprite: __webpack_require__(880), - Zone: __webpack_require__(879) + TileSprite: __webpack_require__(885), + Zone: __webpack_require__(884) }, Creators: { - Blitter: __webpack_require__(878), - Container: __webpack_require__(877), - DynamicBitmapText: __webpack_require__(876), + Blitter: __webpack_require__(883), + Container: __webpack_require__(882), + DynamicBitmapText: __webpack_require__(881), Graphics: __webpack_require__(409), - Group: __webpack_require__(875), + Group: __webpack_require__(880), Image: __webpack_require__(408), - Particles: __webpack_require__(874), - RenderTexture: __webpack_require__(873), - Sprite3D: __webpack_require__(872), + Particles: __webpack_require__(879), + RenderTexture: __webpack_require__(878), + Sprite3D: __webpack_require__(877), Sprite: __webpack_require__(407), - StaticBitmapText: __webpack_require__(871), + StaticBitmapText: __webpack_require__(876), Text: __webpack_require__(406), - TileSprite: __webpack_require__(870), - Zone: __webpack_require__(869) + TileSprite: __webpack_require__(875), + Zone: __webpack_require__(874) } }; @@ -139626,25 +141256,25 @@ if (true) { // WebGL only Game Objects GameObjects.Mesh = __webpack_require__(148); - GameObjects.Quad = __webpack_require__(239); + GameObjects.Quad = __webpack_require__(241); - GameObjects.Factories.Mesh = __webpack_require__(865); - GameObjects.Factories.Quad = __webpack_require__(864); + GameObjects.Factories.Mesh = __webpack_require__(870); + GameObjects.Factories.Quad = __webpack_require__(869); - GameObjects.Creators.Mesh = __webpack_require__(863); - GameObjects.Creators.Quad = __webpack_require__(862); + GameObjects.Creators.Mesh = __webpack_require__(868); + GameObjects.Creators.Quad = __webpack_require__(867); GameObjects.Light = __webpack_require__(405); __webpack_require__(404); - __webpack_require__(861); + __webpack_require__(866); } module.exports = GameObjects; /***/ }), -/* 924 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139660,16 +141290,16 @@ module.exports = GameObjects; module.exports = { AddToDOM: __webpack_require__(85), - DOMContentLoaded: __webpack_require__(263), - ParseXML: __webpack_require__(262), - RemoveFromDOM: __webpack_require__(261), - RequestAnimationFrame: __webpack_require__(260) + DOMContentLoaded: __webpack_require__(264), + ParseXML: __webpack_require__(263), + RemoveFromDOM: __webpack_require__(153), + RequestAnimationFrame: __webpack_require__(262) }; /***/ }), -/* 925 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139678,7 +141308,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ComponentToHex = __webpack_require__(514); +var ComponentToHex = __webpack_require__(519); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -139713,7 +141343,7 @@ module.exports = RGBToString; /***/ }), -/* 926 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -139785,7 +141415,7 @@ module.exports = RGBToHSV; /***/ }), -/* 927 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139794,8 +141424,8 @@ module.exports = RGBToHSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Between = __webpack_require__(153); -var Color = __webpack_require__(30); +var Between = __webpack_require__(154); +var Color = __webpack_require__(31); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -139821,7 +141451,7 @@ module.exports = RandomRGB; /***/ }), -/* 928 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139830,7 +141460,7 @@ module.exports = RandomRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(124); +var Linear = __webpack_require__(125); /** * Interpolates color values @@ -139924,7 +141554,7 @@ module.exports = { /***/ }), -/* 929 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139933,7 +141563,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HSVToRGB = __webpack_require__(512); +var HSVToRGB = __webpack_require__(517); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -139965,7 +141595,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 930 */ +/* 935 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139974,8 +141604,8 @@ module.exports = HSVColorWheel; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); -var HueToComponent = __webpack_require__(513); +var Color = __webpack_require__(31); +var HueToComponent = __webpack_require__(518); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -140015,7 +141645,7 @@ module.exports = HSLToColor; /***/ }), -/* 931 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -140055,7 +141685,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 932 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -140102,7 +141732,7 @@ module.exports = UserSelect; /***/ }), -/* 933 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -140137,7 +141767,7 @@ module.exports = TouchAction; /***/ }), -/* 934 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140152,17 +141782,17 @@ module.exports = TouchAction; module.exports = { - Interpolation: __webpack_require__(264), - Pool: __webpack_require__(24), + Interpolation: __webpack_require__(265), + Pool: __webpack_require__(22), Smoothing: __webpack_require__(133), - TouchAction: __webpack_require__(933), - UserSelect: __webpack_require__(932) + TouchAction: __webpack_require__(938), + UserSelect: __webpack_require__(937) }; /***/ }), -/* 935 */ +/* 940 */ /***/ (function(module, exports) { /** @@ -140192,7 +141822,7 @@ module.exports = GetOffsetY; /***/ }), -/* 936 */ +/* 941 */ /***/ (function(module, exports) { /** @@ -140222,7 +141852,7 @@ module.exports = GetOffsetX; /***/ }), -/* 937 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140237,18 +141867,18 @@ module.exports = GetOffsetX; module.exports = { - CenterOn: __webpack_require__(601), + CenterOn: __webpack_require__(606), GetBottom: __webpack_require__(51), - GetCenterX: __webpack_require__(92), - GetCenterY: __webpack_require__(89), + GetCenterX: __webpack_require__(93), + GetCenterY: __webpack_require__(90), GetLeft: __webpack_require__(49), - GetOffsetX: __webpack_require__(936), - GetOffsetY: __webpack_require__(935), + GetOffsetX: __webpack_require__(941), + GetOffsetY: __webpack_require__(940), GetRight: __webpack_require__(47), GetTop: __webpack_require__(45), SetBottom: __webpack_require__(50), - SetCenterX: __webpack_require__(91), - SetCenterY: __webpack_require__(90), + SetCenterX: __webpack_require__(92), + SetCenterY: __webpack_require__(91), SetLeft: __webpack_require__(48), SetRight: __webpack_require__(46), SetTop: __webpack_require__(44) @@ -140257,7 +141887,7 @@ module.exports = { /***/ }), -/* 938 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140301,7 +141931,7 @@ module.exports = TopRight; /***/ }), -/* 939 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140345,7 +141975,7 @@ module.exports = TopLeft; /***/ }), -/* 940 */ +/* 945 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140354,10 +141984,10 @@ module.exports = TopLeft; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(92); +var GetCenterX = __webpack_require__(93); var GetTop = __webpack_require__(45); var SetBottom = __webpack_require__(50); -var SetCenterX = __webpack_require__(91); +var SetCenterX = __webpack_require__(92); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -140389,7 +142019,7 @@ module.exports = TopCenter; /***/ }), -/* 941 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140433,7 +142063,7 @@ module.exports = RightTop; /***/ }), -/* 942 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140442,9 +142072,9 @@ module.exports = RightTop; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetRight = __webpack_require__(47); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetLeft = __webpack_require__(48); /** @@ -140477,7 +142107,7 @@ module.exports = RightCenter; /***/ }), -/* 943 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140521,7 +142151,7 @@ module.exports = RightBottom; /***/ }), -/* 944 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140565,7 +142195,7 @@ module.exports = LeftTop; /***/ }), -/* 945 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140574,9 +142204,9 @@ module.exports = LeftTop; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetLeft = __webpack_require__(49); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetRight = __webpack_require__(46); /** @@ -140609,7 +142239,7 @@ module.exports = LeftCenter; /***/ }), -/* 946 */ +/* 951 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140653,7 +142283,7 @@ module.exports = LeftBottom; /***/ }), -/* 947 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140697,7 +142327,7 @@ module.exports = BottomRight; /***/ }), -/* 948 */ +/* 953 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140741,7 +142371,7 @@ module.exports = BottomLeft; /***/ }), -/* 949 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140751,8 +142381,8 @@ module.exports = BottomLeft; */ var GetBottom = __webpack_require__(51); -var GetCenterX = __webpack_require__(92); -var SetCenterX = __webpack_require__(91); +var GetCenterX = __webpack_require__(93); +var SetCenterX = __webpack_require__(92); var SetTop = __webpack_require__(44); /** @@ -140785,7 +142415,7 @@ module.exports = BottomCenter; /***/ }), -/* 950 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140800,24 +142430,24 @@ module.exports = BottomCenter; module.exports = { - BottomCenter: __webpack_require__(949), - BottomLeft: __webpack_require__(948), - BottomRight: __webpack_require__(947), - LeftBottom: __webpack_require__(946), - LeftCenter: __webpack_require__(945), - LeftTop: __webpack_require__(944), - RightBottom: __webpack_require__(943), - RightCenter: __webpack_require__(942), - RightTop: __webpack_require__(941), - TopCenter: __webpack_require__(940), - TopLeft: __webpack_require__(939), - TopRight: __webpack_require__(938) + BottomCenter: __webpack_require__(954), + BottomLeft: __webpack_require__(953), + BottomRight: __webpack_require__(952), + LeftBottom: __webpack_require__(951), + LeftCenter: __webpack_require__(950), + LeftTop: __webpack_require__(949), + RightBottom: __webpack_require__(948), + RightCenter: __webpack_require__(947), + RightTop: __webpack_require__(946), + TopCenter: __webpack_require__(945), + TopLeft: __webpack_require__(944), + TopRight: __webpack_require__(943) }; /***/ }), -/* 951 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140832,22 +142462,22 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(605), - BottomLeft: __webpack_require__(604), - BottomRight: __webpack_require__(603), - Center: __webpack_require__(602), - LeftCenter: __webpack_require__(600), - QuickSet: __webpack_require__(606), - RightCenter: __webpack_require__(599), - TopCenter: __webpack_require__(598), - TopLeft: __webpack_require__(597), - TopRight: __webpack_require__(596) + BottomCenter: __webpack_require__(610), + BottomLeft: __webpack_require__(609), + BottomRight: __webpack_require__(608), + Center: __webpack_require__(607), + LeftCenter: __webpack_require__(605), + QuickSet: __webpack_require__(611), + RightCenter: __webpack_require__(604), + TopCenter: __webpack_require__(603), + TopLeft: __webpack_require__(602), + TopRight: __webpack_require__(601) }; /***/ }), -/* 952 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140865,8 +142495,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(951), - To: __webpack_require__(950) + In: __webpack_require__(956), + To: __webpack_require__(955) }; @@ -140877,7 +142507,7 @@ module.exports = Align; /***/ }), -/* 953 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140892,17 +142522,17 @@ module.exports = Align; module.exports = { - Align: __webpack_require__(952), - Bounds: __webpack_require__(937), - Canvas: __webpack_require__(934), - Color: __webpack_require__(515), - Masks: __webpack_require__(511) + Align: __webpack_require__(957), + Bounds: __webpack_require__(942), + Canvas: __webpack_require__(939), + Color: __webpack_require__(520), + Masks: __webpack_require__(516) }; /***/ }), -/* 954 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141042,7 +142672,7 @@ module.exports = MoveTo; /***/ }), -/* 955 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141054,14 +142684,14 @@ module.exports = MoveTo; // 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__(524); -var EllipseCurve = __webpack_require__(522); +var CubicBezierCurve = __webpack_require__(529); +var EllipseCurve = __webpack_require__(527); var GameObjectFactory = __webpack_require__(9); -var LineCurve = __webpack_require__(521); -var MovePathTo = __webpack_require__(954); -var QuadraticBezierCurve = __webpack_require__(520); +var LineCurve = __webpack_require__(526); +var MovePathTo = __webpack_require__(959); +var QuadraticBezierCurve = __webpack_require__(525); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(518); +var SplineCurve = __webpack_require__(523); var Vector2 = __webpack_require__(4); /** @@ -141868,7 +143498,7 @@ module.exports = Path; /***/ }), -/* 956 */ +/* 961 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141889,19 +143519,19 @@ module.exports = Path; */ module.exports = { - Path: __webpack_require__(955), + Path: __webpack_require__(960), - CubicBezier: __webpack_require__(524), + CubicBezier: __webpack_require__(529), Curve: __webpack_require__(86), - Ellipse: __webpack_require__(522), - Line: __webpack_require__(521), - QuadraticBezier: __webpack_require__(520), - Spline: __webpack_require__(518) + Ellipse: __webpack_require__(527), + Line: __webpack_require__(526), + QuadraticBezier: __webpack_require__(525), + Spline: __webpack_require__(523) }; /***/ }), -/* 957 */ +/* 962 */ /***/ (function(module, exports) { /** @@ -141939,7 +143569,7 @@ module.exports = { /***/ }), -/* 958 */ +/* 963 */ /***/ (function(module, exports) { /** @@ -141977,7 +143607,7 @@ module.exports = { /***/ }), -/* 959 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -142015,7 +143645,7 @@ module.exports = { /***/ }), -/* 960 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -142053,7 +143683,7 @@ module.exports = { /***/ }), -/* 961 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142089,17 +143719,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(267), - C64: __webpack_require__(960), - CGA: __webpack_require__(959), - JMP: __webpack_require__(958), - MSX: __webpack_require__(957) + ARNE16: __webpack_require__(268), + C64: __webpack_require__(965), + CGA: __webpack_require__(964), + JMP: __webpack_require__(963), + MSX: __webpack_require__(962) }; /***/ }), -/* 962 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142114,14 +143744,14 @@ module.exports = { module.exports = { - GenerateTexture: __webpack_require__(268), - Palettes: __webpack_require__(961) + GenerateTexture: __webpack_require__(269), + Palettes: __webpack_require__(966) }; /***/ }), -/* 963 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142131,8 +143761,8 @@ module.exports = { */ var Class = __webpack_require__(0); -var OrthographicCamera = __webpack_require__(526); -var PerspectiveCamera = __webpack_require__(525); +var OrthographicCamera = __webpack_require__(531); +var PerspectiveCamera = __webpack_require__(530); var PluginCache = __webpack_require__(10); /** @@ -142405,7 +144035,7 @@ module.exports = CameraManager; /***/ }), -/* 964 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142420,16 +144050,16 @@ module.exports = CameraManager; module.exports = { - Camera: __webpack_require__(270), - CameraManager: __webpack_require__(963), - OrthographicCamera: __webpack_require__(526), - PerspectiveCamera: __webpack_require__(525) + Camera: __webpack_require__(271), + CameraManager: __webpack_require__(968), + OrthographicCamera: __webpack_require__(531), + PerspectiveCamera: __webpack_require__(530) }; /***/ }), -/* 965 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142918,7 +144548,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 966 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143228,7 +144858,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 967 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143243,14 +144873,14 @@ module.exports = FixedKeyControl; module.exports = { - FixedKeyControl: __webpack_require__(966), - SmoothedKeyControl: __webpack_require__(965) + FixedKeyControl: __webpack_require__(971), + SmoothedKeyControl: __webpack_require__(970) }; /***/ }), -/* 968 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143265,15 +144895,15 @@ module.exports = { module.exports = { - Controls: __webpack_require__(967), - Scene2D: __webpack_require__(573), - Sprite3D: __webpack_require__(964) + Controls: __webpack_require__(972), + Scene2D: __webpack_require__(578), + Sprite3D: __webpack_require__(969) }; /***/ }), -/* 969 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143322,7 +144952,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 970 */ +/* 975 */ /***/ (function(module, exports) { /** @@ -143357,7 +144987,7 @@ module.exports = ToggleVisible; /***/ }), -/* 971 */ +/* 976 */ /***/ (function(module, exports) { /** @@ -143411,7 +145041,7 @@ module.exports = Spread; /***/ }), -/* 972 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143420,7 +145050,7 @@ module.exports = Spread; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmoothStep = __webpack_require__(159); +var MathSmoothStep = __webpack_require__(160); /** * [description] @@ -143467,7 +145097,7 @@ module.exports = SmoothStep; /***/ }), -/* 973 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143523,7 +145153,7 @@ module.exports = SmootherStep; /***/ }), -/* 974 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143532,7 +145162,7 @@ module.exports = SmootherStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArrayShuffle = __webpack_require__(96); +var ArrayShuffle = __webpack_require__(97); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -143556,7 +145186,7 @@ module.exports = Shuffle; /***/ }), -/* 975 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143684,7 +145314,7 @@ module.exports = ShiftPosition; /***/ }), -/* 976 */ +/* 981 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143725,7 +145355,7 @@ module.exports = SetY; /***/ }), -/* 977 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143772,7 +145402,7 @@ module.exports = SetXY; /***/ }), -/* 978 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143813,7 +145443,7 @@ module.exports = SetX; /***/ }), -/* 979 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143851,7 +145481,7 @@ module.exports = SetVisible; /***/ }), -/* 980 */ +/* 985 */ /***/ (function(module, exports) { /** @@ -143890,7 +145520,7 @@ module.exports = SetTint; /***/ }), -/* 981 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143931,7 +145561,7 @@ module.exports = SetScaleY; /***/ }), -/* 982 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143972,7 +145602,7 @@ module.exports = SetScaleX; /***/ }), -/* 983 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144019,7 +145649,7 @@ module.exports = SetScale; /***/ }), -/* 984 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144060,7 +145690,7 @@ module.exports = SetRotation; /***/ }), -/* 985 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144107,7 +145737,7 @@ module.exports = SetOrigin; /***/ }), -/* 986 */ +/* 991 */ /***/ (function(module, exports) { /** @@ -144144,7 +145774,7 @@ module.exports = SetHitArea; /***/ }), -/* 987 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144185,7 +145815,7 @@ module.exports = SetDepth; /***/ }), -/* 988 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144225,7 +145855,7 @@ module.exports = SetBlendMode; /***/ }), -/* 989 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144266,7 +145896,7 @@ module.exports = SetAlpha; /***/ }), -/* 990 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144307,7 +145937,7 @@ module.exports = ScaleY; /***/ }), -/* 991 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144354,7 +145984,7 @@ module.exports = ScaleXY; /***/ }), -/* 992 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144395,7 +146025,7 @@ module.exports = ScaleX; /***/ }), -/* 993 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144444,7 +146074,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 994 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144490,7 +146120,7 @@ module.exports = RotateAround; /***/ }), -/* 995 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144531,7 +146161,7 @@ module.exports = Rotate; /***/ }), -/* 996 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144540,7 +146170,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(160); +var Random = __webpack_require__(161); /** * [description] @@ -144569,7 +146199,7 @@ module.exports = RandomTriangle; /***/ }), -/* 997 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144578,7 +146208,7 @@ module.exports = RandomTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(161); +var Random = __webpack_require__(162); /** * [description] @@ -144607,7 +146237,7 @@ module.exports = RandomRectangle; /***/ }), -/* 998 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144616,7 +146246,7 @@ module.exports = RandomRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(162); +var Random = __webpack_require__(163); /** * [description] @@ -144645,7 +146275,7 @@ module.exports = RandomLine; /***/ }), -/* 999 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144683,7 +146313,7 @@ module.exports = RandomEllipse; /***/ }), -/* 1000 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144692,7 +146322,7 @@ module.exports = RandomEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(164); +var Random = __webpack_require__(165); /** * [description] @@ -144721,7 +146351,7 @@ module.exports = RandomCircle; /***/ }), -/* 1001 */ +/* 1006 */ /***/ (function(module, exports) { /** @@ -144758,7 +146388,7 @@ module.exports = PlayAnimation; /***/ }), -/* 1002 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144768,7 +146398,7 @@ module.exports = PlayAnimation; */ // var GetPointsOnLine = require('../geom/line/GetPointsOnLine'); -var BresenhamPoints = __webpack_require__(576); +var BresenhamPoints = __webpack_require__(581); /** * [description] @@ -144818,7 +146448,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 1003 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144827,7 +146457,7 @@ module.exports = PlaceOnTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MarchingAnts = __webpack_require__(577); +var MarchingAnts = __webpack_require__(582); var RotateLeft = __webpack_require__(293); var RotateRight = __webpack_require__(292); @@ -144879,7 +146509,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 1004 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144888,7 +146518,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoints = __webpack_require__(163); +var GetPoints = __webpack_require__(164); /** * [description] @@ -144923,7 +146553,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 1005 */ +/* 1010 */ /***/ (function(module, exports) { /** @@ -144973,7 +146603,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 1006 */ +/* 1011 */ /***/ (function(module, exports) { /** @@ -145020,7 +146650,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 1007 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145061,7 +146691,7 @@ module.exports = IncY; /***/ }), -/* 1008 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145108,7 +146738,7 @@ module.exports = IncXY; /***/ }), -/* 1009 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145149,7 +146779,7 @@ module.exports = IncX; /***/ }), -/* 1010 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145190,7 +146820,7 @@ module.exports = IncAlpha; /***/ }), -/* 1011 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145199,11 +146829,11 @@ module.exports = IncAlpha; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AlignIn = __webpack_require__(606); +var AlignIn = __webpack_require__(611); var CONST = __webpack_require__(302); var GetFastValue = __webpack_require__(1); var NOOP = __webpack_require__(2); -var Zone = __webpack_require__(165); +var Zone = __webpack_require__(166); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -145314,7 +146944,7 @@ module.exports = GridAlign; /***/ }), -/* 1012 */ +/* 1017 */ /***/ (function(module, exports) { /** @@ -145372,7 +147002,7 @@ module.exports = GetLast; /***/ }), -/* 1013 */ +/* 1018 */ /***/ (function(module, exports) { /** @@ -145430,7 +147060,7 @@ module.exports = GetFirst; /***/ }), -/* 1014 */ +/* 1019 */ /***/ (function(module, exports) { /** @@ -145475,7 +147105,7 @@ module.exports = Call; /***/ }), -/* 1015 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145516,11 +147146,6 @@ module.exports = Angle; /***/ }), -/* 1016 */, -/* 1017 */, -/* 1018 */, -/* 1019 */, -/* 1020 */, /* 1021 */, /* 1022 */, /* 1023 */, @@ -145535,7 +147160,12 @@ module.exports = Angle; /* 1032 */, /* 1033 */, /* 1034 */, -/* 1035 */ +/* 1035 */, +/* 1036 */, +/* 1037 */, +/* 1038 */, +/* 1039 */, +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -145544,9 +147174,9 @@ module.exports = Angle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(616); +__webpack_require__(621); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var Extend = __webpack_require__(17); /** @@ -145555,36 +147185,36 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(607), - Animation: __webpack_require__(575), - Cache: __webpack_require__(574), - Cameras: __webpack_require__(968), + Actions: __webpack_require__(612), + Animation: __webpack_require__(580), + Cache: __webpack_require__(579), + Cameras: __webpack_require__(973), Class: __webpack_require__(0), - Create: __webpack_require__(962), - Curves: __webpack_require__(956), - Data: __webpack_require__(517), - Display: __webpack_require__(953), - DOM: __webpack_require__(924), - Events: __webpack_require__(509), - Game: __webpack_require__(506), - GameObjects: __webpack_require__(923), + Create: __webpack_require__(967), + Curves: __webpack_require__(961), + Data: __webpack_require__(522), + Display: __webpack_require__(958), + DOM: __webpack_require__(929), + Events: __webpack_require__(514), + Game: __webpack_require__(507), + GameObjects: __webpack_require__(928), Geom: __webpack_require__(403), Input: __webpack_require__(388), - Loader: __webpack_require__(764), - Math: __webpack_require__(749), + Loader: __webpack_require__(769), + Math: __webpack_require__(754), Physics: { - Arcade: __webpack_require__(710) + Arcade: __webpack_require__(715) }, Plugins: __webpack_require__(334), - Scene: __webpack_require__(200), + Scene: __webpack_require__(201), Scenes: __webpack_require__(332), Sound: __webpack_require__(330), Structs: __webpack_require__(329), Textures: __webpack_require__(328), - Tilemaps: __webpack_require__(675), + Tilemaps: __webpack_require__(680), Time: __webpack_require__(312), Tweens: __webpack_require__(310), - Utils: __webpack_require__(626) + Utils: __webpack_require__(631) }; @@ -145604,7 +147234,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(221))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(223))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index 7fa4179a1..723418c13 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,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=1035)}([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,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),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=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),a=s?s+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);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){var n=i(16),s=i(3);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(10),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){t.exports={Alpha:i(595),Animation:i(306),BlendMode:i(594),ComputedSize:i(593),Crop:i(592),Depth:i(591),Flip:i(590),GetBounds:i(589),Mask:i(588),Origin:i(587),Pipeline:i(294),ScaleMode:i(586),ScrollFactor:i(585),Size:i(584),Texture:i(583),TextureCrop:i(582),Tint:i(581),ToJSON:i(580),Transform:i(579),TransformMatrix:i(32),Visible:i(578)}},function(t,e,i){var n=i(0),s=i(14),r=i(59),o=i(8),a=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,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(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=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.ToJSON(this)},willRender:function(t){return!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter>0&&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(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,t.exports=a},function(t,e,i){var n=i(300),s={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:new n};t.exports=s},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},u=2),l===u&&(h=this,--u);u=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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("fileprogress",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("filecomplete",e,i,t),this.loader.emit("filecomplete-"+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}});l.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)}},l.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=l},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>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;no.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},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(18),r=i(19),o=i(6),a=i(1),h=i(3),u=i(7),l=new n({Extends:r,initialize:function(t,e,i,n,o){var l="json";if(u(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),l=a(c,"extension",l),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:l,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),u(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;ss||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(158),r=i(287),o=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.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,n){return void 0===n&&(n=255),this.red=t,this.green=e,this.blue=i,this.alpha=n,this.update()},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this.update()},setFromRGB:function(t){return this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this.update()},update:function(){return this._color=s(this.r,this.g,this.b),this._color32=r(this.r,this.g,this.b,this.a),this._rgba="rgba("+this.r+","+this.g+","+this.b+","+this.a/255+")",this},clone:function(){return new o(this.r,this.g,this.b,this.a)},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()}},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()}},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()}},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()}},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()}},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()}},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()}}});t.exports=o},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){var n=new(i(0))({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)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+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],u=i[5],l=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=l*s+c*o,v.b=l*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+u,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],u=e*r+i*a+n[4],l=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+u,n[5]=g*o+v*h+l,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=t*a+e*u,o[1]=t*h+e*l,o[2]=i*a+n*u,o[3]=i*h+n*l,o[4]=s*a+r*u+c,o[5]=s*h+r*l+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],u=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+u,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*i,a=n*n,h=s*s,u=r*r,l=Math.sqrt(o+h),c=Math.sqrt(a+u);return t.translateX=e[4],t.translateY=e[5],t.scaleX=l,t.scaleY=c,t.rotation=Math.acos(i/l)*(Math.atan(-s/i)<0?-1:1),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},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=n},function(t,e){t.exports=function(t,e,i){return t.radius>0&&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){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,i){var n=i(0),s=i(14),r=i(15),o=i(529),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")},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)}});t.exports=a},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=new(i(0))({initialize:function(t,e,i,n){this.loader=t,this.type=e,this.key=i,this.files=n,this.complete=!1,this.pending=n.length,this.failed=0,this.config={};for(var s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=0&&m>=0&&v+m<1}},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){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e,i){var n=i(125);t.exports=function(t,e){if("string"==typeof t&&n.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,n[t].apply(this,i)}}return n[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,n.Power0)}},function(t,e,i){var n=i(20);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(14),r=i(393),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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/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.height-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.tilemapLayer;return t?t.tileset: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,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var n=i(0),s=i(61),r=i(233),o=i(232),a=i(97),h=i(160),u=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},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,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=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}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=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(14),r=i(15),o=i(432),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=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 this.entries.length=t}}});t.exports=n},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,i){var n=i(101),s=i(12),r=i(63),o=i(64),a=i(73),h=i(170),u=i(103),l=i(3),c=i(102),d=i(100),f=i(99);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:u(e),g=h(e),v=a(e,"delay",i.delay),m=a(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=o(l(e,"ease",i.ease),y),w=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),T=a(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),A=r(e,"flipX",i.flipX),C=r(e,"flipY",i.flipY),_=[],M=0;M=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("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:o,onBlur:o,onFocus:o,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("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.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("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("detune",this,t)}}});t.exports=a},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,s=i(57),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){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var s=new Array(i),r=1;ru&&(r=u),o>u&&(o=u),a=s,h=r;;)if(a0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;if(void 0===i&&(i=!0),e)"string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e);else if(t.parentElement)return t;return n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},function(t,e,i){var n=i(0),s=i(266),r=i(11),o=i(4),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(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){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(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,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-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],u=s[4],l=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],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+m)*w,this.y=(e*o+i*l+n*p+y)*w,this.z=(e*a+i*c+n*g+x)*w,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}});t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(301),o=i(299),a=i(164),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},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 a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},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){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e,i){var n=i(151),s=i(0),r=i(2),o=i(83),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){return t&&(this._sortKey=t,o.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},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.GetFirstElement(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(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,u=this.cutY,l=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=u+(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,w=e+n,b=i+r;if(!(x.rw||x.y>b)){var T=Math.max(x.x,e),S=Math.max(x.y,i),A=Math.min(x.r,w)-T,C=Math.min(x.b,b)-S;v=A,m=C,p=o?h+(l-(T-x.x)-A):h+(T-x.x),g=a?u+(c-(S-x.y)-C):u+(S-x.y),e=T,i=S,n=A,r=C}else p=0,g=0,v=0,m=0}else o&&(p=h+(l-e-n)),a&&(g=u+(c-i-r));var _=this.source.width,M=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/M),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+m)/M),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.texture=null,this.source=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(34);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){t.exports=function(t){for(var e=t.length-1;e>0;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(0),s=i(296),r=i(163),o=i(162),a=i(4),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=0),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 o(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 a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),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=h},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(0),s=i(13),r=i(9),o=i(62),a=new n({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var n=0;n0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},stop:function(t){this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state=o.PENDING_REMOVE)},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.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 o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function n(t){return!!t.getEnd&&"function"==typeof t.getEnd}var s=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)a=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===u?a=e:"object"===u&&(i(o=e)||n(o))?(n(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(3);t.exports=function(t){var e=n(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation","orthogonal"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[])}});t.exports=r},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",{}),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null)}});t.exports=r},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&eu){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var m=l[c].length?c:c+1,y=l.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h],h0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},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){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(607),s=i(0),r=i(1),o=i(3),a=i(7),h=i(248),u=i(70),l=i(35),c=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?a(e[0])&&(i=e,e=null):a(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;l--)if((u=d[l]).active===i){if(++c===e)break}else u=null;return u?("number"==typeof s&&(u.x=s),"number"==typeof r&&(u.y=r),u):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&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<-a&&(s=h+s%h-a)),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this},slice:function(t,e,i,n,s,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?s<-h?s=-h-a:s>=0&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<=-a&&(s=h+s%h-a)),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-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;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.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(r.game.renderer,this,0,f.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture))),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new n(0,0,0,0),t.exports=f},function(t,e){t.exports=function(t,e,i,n,s){var r=n.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(n.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return s?(o.multiplyWithOffset(s,-n.scrollX*i.scrollFactorX,-n.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=n.scrollX*i.scrollFactorX,a.f-=n.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),!0}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i0},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("start",this),this.events.emit("ready",this,t)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(t){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("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;ef.right&&(p=h(p,p+(v-f.right),this.lerp.x)),mf.bottom&&(g=h(g,g+(m-f.bottom),this.lerp.y))):(p=h(p,v-l,this.lerp.x),g=h(g,m-c,this.lerp.y))}this.useBounds&&(p=this.clampX(p),g=this.clampY(g)),this.roundPixels&&(l=Math.round(l),c=Math.round(c)),this.scrollX=p,this.scrollY=g;var y=p+r,x=g+o;this.midPoint.set(y,x);var w=i/a,b=n/a;this.worldView.setTo(y-w/2,x-b/2,w,b),u.loadIdentity(),u.scale(e,e),u.translate(this.x+l,this.y+c),u.rotate(this.rotation),u.scale(a,a),u.translate(-l,-c),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,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===o&&(o=s),this._follow=t,this.roundPixels=e,i=r(i,0,1),n=r(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,o);var a=this.width/2,h=this.height/2,u=t.x-s,l=t.y-o;return this.midPoint.set(u,l),this.scrollX=u-a,this.scrollY=l-h,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(){n.prototype.destroy.call(this),this.resetFX(),this._follow=null,this.deadzone=null}});t.exports=c},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;e0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(253),r=i(1),o=i(499),a=i(498),h=i(497),u=i(32),l=i(21),c=i(132),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._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this._tempMatrix4=new u,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=null,this.firstQuad=[0,0,0,0],this.prevQuad=[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 this.renderer.setTexture2D(t,e),this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize,s=this.renderer;if(0!==e)return s.setBlankTexture(),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},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,u=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.width,v=o.height,m=-t.displayOriginX+f,y=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,u=x.v0,c=x.u1,d=x.v1,g=x.width,v=x.height,f=x.x,p=x.y,m=-t.displayOriginX+f,y=-t.displayOriginY+p}t.flipX&&(m+=g,g*=-1),t.flipY&&(y+=v,v*=-1);var w=m+g,b=y+v;s.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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=r.getX(m,y),S=r.getY(m,y),A=r.getX(m,b),C=r.getY(m,b),_=r.getX(w,b),M=r.getY(w,b),E=r.getX(w,y),P=r.getY(w,y),L=l.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),k=l.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),F=l.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),R=l.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(T|=0,S|=0,A|=0,C|=0,_|=0,M|=0,E|=0,P|=0),this.setTexture2D(a,0);var O=t._isTinted&&t.tintFill;this.batchQuad(T,S,A,C,_,M,E,P,h,u,c,d,L,k,F,R,O)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v){var m=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),m=!0);var y=this.vertexViewF32,x=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount-1;return y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=v,x[++w]=d,y[++w]=i,y[++w]=n,y[++w]=h,y[++w]=c,y[++w]=v,x[++w]=p,y[++w]=s,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=v,x[++w]=g,y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=v,x[++w]=d,y[++w]=s,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=v,x[++w]=g,y[++w]=o,y[++w]=a,y[++w]=l,y[++w]=u,y[++w]=v,x[++w]=f,this.vertexCount+=6,m},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f){var p=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),p=!0);var g=this.vertexViewF32,v=this.vertexViewU32,m=this.vertexCount*this.vertexComponentCount-1;return g[++m]=t,g[++m]=e,g[++m]=o,g[++m]=a,g[++m]=f,v[++m]=l,g[++m]=i,g[++m]=n,g[++m]=o,g[++m]=u,g[++m]=f,v[++m]=c,g[++m]=s,g[++m]=r,g[++m]=h,g[++m]=u,g[++m]=f,v[++m]=d,this.vertexCount+=3,p},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,w,b,T,S,A,C,_,M,E,P){this.renderer.setPipeline(this,t);var L=this._tempMatrix1,k=this._tempMatrix2,F=this._tempMatrix3,R=m/i+_,O=y/n+M,D=(m+x)/i+_,I=(y+w)/n+M,B=o,Y=a,X=-g,z=-v;if(t.isCropped){var N=t._crop;B=N.width,Y=N.height,o=N.width,a=N.height;var U=m=N.x,G=y=N.y;c&&(U=x-N.x-N.width),d&&!e.isRenderTexture&&(G=w-N.y-N.height),R=U/i+_,O=G/n+M,D=(U+N.width)/i+_,I=(G+N.height)/n+M,X=-g+m,z=-v+y}d^=e.isRenderTexture?1:0,c&&(B*=-1,X+=o),d&&(Y*=-1,z+=a);var W=X+B,V=z+Y;k.applyITRS(s,r,l,h,u),L.copyFrom(E.matrix),P?(L.multiplyWithOffset(P,-E.scrollX*f,-E.scrollY*p),k.e=s,k.f=r,L.multiply(k,F)):(k.e-=E.scrollX*f,k.f-=E.scrollY*p,L.multiply(k,F));var H=F.getX(X,z),j=F.getY(X,z),q=F.getX(X,V),K=F.getY(X,V),J=F.getX(W,V),Z=F.getY(W,V),Q=F.getX(W,z),$=F.getY(W,z);E.roundPixels&&(H|=0,j|=0,q|=0,K|=0,J|=0,Z|=0,Q|=0,$|=0),this.setTexture2D(e,0),this.batchQuad(H,j,q,K,J,Z,Q,$,R,O,D,I,b,T,S,A,C)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=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(u,c),m=h.getY(u,c),y=h.getX(u,i),x=h.getY(u,i);this.setTexture2D(t.glTexture,0),n=l.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)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n,h=l.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.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=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,w=m.u1,b=m.v1;this.batchQuad(u,l,c,d,f,p,g,v,y,x,w,b,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.multiply(o,h);var u=h.getX(t,e),l=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(u,l,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 u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,u=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;fthis.vertexCapacity&&this.flush();var d=i-t,f=n-e,p=Math.sqrt(d*d+f*f),g=s*(n-e)/p,v=s*(t-i)/p,m=r*(n-e)/p,y=r*(t-i)/p,x=i-m,w=n-y,b=t-g,T=e-v,S=i+m,A=n+y,C=t+g,_=e+v,M=c.getX(x,w),E=c.getY(x,w),P=c.getX(b,T),L=c.getY(b,T),k=c.getX(S,A),F=c.getY(S,A),R=c.getX(C,_),O=c.getY(C,_),D=this.strokeTint,I=this.tintEffect,B=D.TL,Y=D.TR,X=D.BL,z=D.BR,N=this.currentFrame,U=N.u0,G=N.v0,W=N.u1,V=N.v1;if(this.batchQuad(R,O,P,L,M,E,k,F,U,G,W,V,B,Y,X,z,I),!(o<=1)){var H=this.prevQuad,j=this.firstQuad;a>0?this.batchQuad(R,O,P,L,H[0],H[1],H[2],H[3],U,G,W,V,B,Y,X,z,I):(j[0]=P,j[1]=L,j[2]=R,j[3]=O),h?this.batchQuad(j[0],j[1],j[2],j[3],M,E,k,F,U,G,W,V,B,Y,X,z,I):(H[0]=M,H[1]=E,H[2]=k,H[3]=F)}}});t.exports=d},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,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,s){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:s}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*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)):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},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){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;i=(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(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},function(t,e,i){var n=i(98),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=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(5);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=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&&t=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e,i){var n=i(0),s=i(14),r=i(15),o=i(868),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var n=i.cull(e),s=Math.min(n.length,10);if(0===s)return this;this.active=!0;var r,o=this.renderer,a=this.program,h=e.matrix,u={x:0,y:0},l=o.height;for(r=0;r<10;++r)o.setFloat1(a,"uLights["+r+"].radius",0);for(o.setFloat4(a,"uCamera",e.x,e.y,e.rotation,e.zoom),o.setFloat3(a,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(l.texture,0),n.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,w,b,T,S,A,C,_,M,E,P){if(this.active){var L;this.renderer.setPipeline(this),t.texture?L=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(L=t.tileset.image.dataSource[0]),L||(L=this.defaultNormalMap),this.setTexture2D(L.glTexture,1);var k=this._tempMatrix1,F=this._tempMatrix2,R=this._tempMatrix3,O=o,D=a,I=-g,B=-v;d^=e.isRenderTexture?1:0,c&&(O*=-1,I+=o),d&&(D*=-1,B+=a),E.roundPixels&&(I|=0,B|=0);var Y=I+O,X=B+D;F.applyITRS(s,r,l,h,u),k.copyFrom(E.matrix),P?(k.multiplyWithOffset(P,-E.scrollX*f,-E.scrollY*p),F.e=s,F.f=r,k.multiply(F,R)):(F.e-=E.scrollX*f,F.f-=E.scrollY*p,k.multiply(F,R));var z=I*R.a+B*R.c+R.e,N=I*R.b+B*R.d+R.f,U=I*R.a+X*R.c+R.e,G=I*R.b+X*R.d+R.f,W=Y*R.a+X*R.c+R.e,V=Y*R.b+X*R.d+R.f,H=Y*R.a+B*R.c+R.e,j=Y*R.b+B*R.d+R.f;E.roundPixels&&(z|=0,N|=0,U|=0,G|=0,W|=0,V|=0,H|=0,j|=0);var q=m/i+_,K=y/n+M,J=(m+x)/i+_,Z=(y+w)/n+M;this.setTexture2D(e,0),this.batchVertices(z,N,U,G,W,V,H,j,q,K,J,Z,b,T,S,A,C)}},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},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),r.prototype.batchSprite.call(this,t,e,i))}}});o.LIGHT_COUNT=10,t.exports=o},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(16);t.exports=function(t){return t*n.RAD_TO_DEG}},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,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-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=i(0),s=i(15),r=i(35),o=i(4),a=i(155),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},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}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},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=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=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,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var n=i(71),s=i(5);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,u=t.y2,l=0;l1?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(52),s=i(88),r=i(33),o=i(0),a=i(14),h=i(15),u=i(11),l=i(31),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.ScaleMode,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){return void 0===i&&(i=!0),this.width=t,this.height=e,i&&this.input&&this.input.hitArea instanceof u&&(this.input.hitArea.width=t,this.input.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){var i=-t/2,n=-e/2;return this.setDropZone(new u(i,n,t,e),l)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(8),r=i(72),o=i(62),a=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},add:function(t){return this.queue(r(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),s=e;switch(i){case"+":s+=n;break;case"-":s-=n}return Math.max(0,s)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n0?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=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;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 o.ACTIVE:for(var n=this.totalData,s=0;s0?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){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=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot: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(0),s=i(19),r=i(1),o=i(109),a=i(7),h=new n({Extends:s,initialize:function(t,e,i,n){if(a(e)){var o=e;e=r(o,"key"),n=r(o,"config",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,h),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t=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=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",e,this,t),this.pad.emit("down",i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit("up",e,this,t),this.pad.emit("up",i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,w+=3;break;case n.FILL_STYLE:g=u[w+1],f=u[w+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",w+=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(u[w+1],u[w+2],u[w+3],u[w+4]):c.fillRect(u[w+1],u[w+2],u[w+3],u[w+4]),w+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.fill(),w+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.stroke(),w+=6;break;case n.LINE_TO:c.lineTo(u[w+1],u[w+2]),w+=2;break;case n.MOVE_TO:c.moveTo(u[w+1],u[w+2]),w+=2;break;case n.LINE_FX_TO:c.lineTo(u[w+1],u[w+2]),w+=5;break;case n.MOVE_FX_TO:c.moveTo(u[w+1],u[w+2]),w+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(u[w+1],u[w+2]),w+=2;break;case n.SCALE:c.scale(u[w+1],u[w+2]),w+=2;break;case n.ROTATE:c.rotate(u[w+1]),w+=1;break;case n.GRADIENT_FILL_STYLE:w+=5;break;case n.GRADIENT_LINE_STYLE:w+=6;break;case n.SET_TEXTURE:w+=2}c.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},function(t,e,i){var n=i(184),s=i(114),r=i(65),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;hr;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,m=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)m--}0===a(t[r],g)?n(t,r,m):n(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),s=0;s-1;r--)n[s][r]=t[r][s]}return n}},function(t,e,i){t.exports={AtlasXML:i(486),Canvas:i(485),Image:i(484),JSONArray:i(483),JSONHash:i(482),SpriteSheet:i(481),SpriteSheetFromAtlas:i(480),UnityYAML:i(479)}},function(t,e,i){var n=i(24),s=i(0),r=i(84),o=i(60),a=new s({initialize:function(t,e,i,n){var s=t.manager.game;this.renderer=s.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=n||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isRenderTexture="RenderTexture"===e.type,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&this.renderer.canvasToTexture(this.image,this.glTexture)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){var n=i(24),s=i(487),r=i(0),o=i(30),a=i(22),h=i(8),u=i(268),l=i(3),c=i(189),d=i(120),f=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once("boot",this.boot,this)},boot:function(){this._pending=2,this.on("onload",this.updatePending,this),this.on("onerror",this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once("destroy",this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off("onload"),this.off("onerror"),this.game.events.emit("texturesready"))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit("removetexture",t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit("onerror",t)},n.onload=function(){var e=i.create(t,n);c.Image(e,0),i.emit("addtexture",t,e),i.emit("onload",t,e)},n.src=e}},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var r="",o=this.getFrame(t,e);if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,s),n.remove(h)}return r},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),c.Image(n,0),i&&n.setDataSource(i),this.emit("addtexture",t,n)),n},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit("addtexture",t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,u(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var s=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,s)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new s(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new s(this,t,e,e.width,e.height),this.list[t]=n,this.emit("addtexture",t,n)),n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var s=null;if(this.checkKey(t)){if(s=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var s=this.getFrame(i,n);if(s){var r=s.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],n=1;n0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("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("ended",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.emit("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.emit("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,"rate",t)||(this.calculateRate(),this.emit("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,"detune",t)||(this.calculateRate(),this.emit("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("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("loop",this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=s},function(t,e,i){var n=i(79),s=i(0),r=i(196),o=new s({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var n=0;n-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("transitioninit",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("complete",this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;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)}},resize:function(t,e){for(var i=0;i=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=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,i){var n=i(0),s=i(8),r=i(6),o=i(13),a=i(9),h=i(1),u=i(10),l=i(202),c=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once("boot",this.boot,this)},boot:function(){var t,e,i,n,s,r,o,a=this.game.config,u=a.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t10&&(t=10-this.pointersTotal);for(var i=0;i0},queueTouchStart:function(t){if(this.queue.push(s.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueTouchMove:function(t){if(this.queue.push(s.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueTouchEnd:function(t){if(this.queue.push(s.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},queueMouseDown:function(t){if(this.queue.push(s.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueMouseMove:function(t){if(this.queue.push(s.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueMouseUp:function(t){if(this.queue.push(s.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t){var e=t.input;if(!e||!e.enabled||!t.willRender())return!1;var i=!0,n=t.parentContainer;if(n)do{if(!n.visible){i=!1;break}n=n.parentContainer}while(n);return i},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var s=this._tempPoint,r=i._cx,o=i._cy,a=i._cw,h=i._ch,u=i.scrollX,l=i.scrollY;n.length=0;var d=t.x,f=t.y;if(!(d>=r&&f>=o&&d<=r+a&&f<=o+h))return n;i.getWorldPoint(d,f,s),t.worldX=s.x,t.worldY=s.y;for(var p={x:0,y:0},g=this._tempMatrix,v=0;ve.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=i(20),s=i(0),r=i(215),o=i(214),a=i(3),h=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,a(i,"frames",[]),a(i,"defaultTextureKey",null)),this.frameRate=a(i,"frameRate",null),this.duration=a(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=a(i,"skipMissedFrames",!0),this.delay=a(i,"delay",0),this.repeat=a(i,"repeat",0),this.repeatDelay=a(i,"repeatDelay",0),this.yoyo=a(i,"yoyo",!1),this.showOnStart=a(i,"showOnStart",!1),this.hideOnComplete=a(i,"hideOnComplete",!1),this.paused=!1,this.manager.on("pauseall",this.pause,this),this.manager.on("resumeall",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=u[0],u[0].prevFrame=s;var v=1/(u.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._timeScale=1,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),r(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?(t.forward=!1,this._updateAndGetNextTick(t,e.prevFrame)):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this._updateAndGetNextTick(t,e.nextFrame)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?(t.forward=!0,this._updateAndGetNextTick(t,e.nextFrame)):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this._updateAndGetNextTick(t,t.currentFrame)):(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);t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,t.parent.emit("animationrepeat",this,t.currentFrame,t.repeatCounter)))},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=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off("pauseall",this.pause,this),this.manager.off("resumeall",this.resume,this),this.manager.remove(this.key);for(var t=0;t=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,u,l,d,f,p,g,v,m,y;for(u=l=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(l,t.leaf?o(r):r),c+=d(l);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,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;tu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,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,i){var n=i(5),s=i(71);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},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){for(var n=!1,s=-1,r=t.points.length-1;++s=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(0),s=i(148),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,t=this.frame,this.uv[0]=t.u0,this.uv[1]=t.v0,this.uv[2]=t.u0,this.uv[3]=t.v1,this.uv[4]=t.u1,this.uv[5]=t.v1,this.uv[6]=t.u0,this.uv[7]=t.v0,this.uv[8]=t.u1,this.uv[9]=t.v1,this.uv[10]=t.u1,this.uv[11]=t.v0,this},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e,i){var n=i(24),s=i(0),r=i(14),o=i(22),a=i(15),h=i(414),u=i(893),l=i(4),c=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.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,u,c){var d=t.sys.game.renderer;a.call(this,t,"TileSprite"),this._tilePosition=new l,this._tileScale=new l(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=null,this.displayFrame=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.setTexture(u,c),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.displayFrame.width),this.potHeight=h(this.displayFrame.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.dirty=!0,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(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,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.displayFrame=this.displayTexture.get(t),this.displayFrame.cutWidth&&this.displayFrame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.displayFrame.customPivot?this.setOrigin(this.displayFrame.pivotX,this.displayFrame.pivotY):this.updateDisplayOrigin()),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&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){if(this.dirty){var t=this.displayFrame,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.resize(this.width,this.height)),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context,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=c},function(t,e,i){var n=i(289),s=i(24),r=i(0),o=i(14),a=i(22),h=i(94),u=i(15),l=i(899),c=i(421),d=new r({Extends:u,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,l],initialize:function(t,e,i,r,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=32),void 0===o&&(o=32),u.call(this,t,"RenderTexture"),this.renderer=t.sys.game.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=s.create2D(this,r,o),this.context=this.canvas.getContext("2d"),this.framebuffer=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(c(),this.canvas),this.frame=this.texture.get(),this.camera=new n(0,0,r,o),this.dirty=!1,this.gl=null;var h=this.renderer;if(h.type===a.WEBGL){var l=h.gl;this.gl=l,this.drawGameObject=this.batchGameObjectWebGL,this.framebuffer=h.createFramebuffer(r,o,this.frame.source.glTexture,!1)}else h.type===a.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas);this.camera.setScene(t),this.setPosition(e,i),this.setSize(r,o),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline")},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){if(void 0===e&&(e=t),t!==this.width||e!==this.height){if(this.canvas)this.canvas.width=t,this.canvas.height=e;else{var i=this.gl;this.renderer.deleteTexture(this.frame.source.glTexture),this.renderer.deleteFramebuffer(this.framebuffer),this.frame.source.glTexture=this.renderer.createTexture2D(0,i.NEAREST,i.NEAREST,i.CLAMP_TO_EDGE,i.CLAMP_TO_EDGE,i.RGBA,null,t,e,!1),this.framebuffer=this.renderer.createFramebuffer(t,e,this.texture,!1),this.frame.glTexture=this.frame.source.glTexture}this.camera.setSize(t,e),this.frame.setSize(t,e),this.width=t,this.height=e}return 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.texture},fill:function(t,e){void 0===e&&(e=1);var i=255&(t>>16|0),n=255&(t>>8|0),s=255&(0|t);if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var r=this.gl;r.clearColor(i/255,n/255,s/255,e),r.clear(r.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else this.context.fillStyle="rgb("+i+","+n+","+s+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height);return this},clear:function(){if(this.dirty){if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,this.canvas.width,this.canvas.height),e.restore()}this.dirty=!1}return 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,1),r){this.renderer.setFramebuffer(this.framebuffer);var o=this.pipeline;o.projOrtho(0,this.width,0,this.height,-1e3,1e3),this.batchList(t,e,i,n,s),o.flush(),this.renderer.setFramebuffer(null),o.projOrtho(0,o.width,o.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,1),o){this.renderer.setFramebuffer(this.framebuffer);var h=this.pipeline;h.projOrtho(0,this.width,0,this.height,-1e3,1e3),h.batchTextureFrame(a,i,n,r,s,this.camera.matrix,null),h.flush(),this.renderer.setFramebuffer(null),h.projOrtho(0,h.width,h.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i,n,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;r0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;s0)for(var e=this.list,i=new a,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=c},function(t,e,i){var n=i(917),s=i(914),r=i(0),o=i(14),a=i(94),h=i(15),u=i(93),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},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=l},function(t,e,i){var n=i(3),s=i(96),r=function(t,e,i){for(var n=[],s=0;s0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(4);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var u=Math.sin(-r),l=Math.cos(-r),c=l*o,d=-u*o,f=u*a,p=l*a,g=c*p-d*f,v=p/g,m=-d/g,y=-f/g,x=c/g,w=(f*s-p*i)/g,b=-(c*s-d*i)/g;return h.x=t*v+e*y+w,h.y=t*m+e*x+b,h}},function(t,e,i){var n=i(159);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,m=v?e[0]*i:t.length,y=s(t,0,m,i,!0),x=[];if(!y)return x;if(v&&(y=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)return null;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,u=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,u*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(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,l=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(u,l,e,i,n),p=t.nextZ;p&&p.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;p=p.nextZ}for(p=t.prevZ;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}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&w(s,r)&&w(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),S(n),S(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&v(h,u)){var l=b(h,u);return h=r(h,h.next),l=r(l,l.next),o(h,e,i,n,s,a),void o(l,e,i,n,s,a)}u=u.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>=l&&s!==n.x&&g(ri.x)&&w(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(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)&&w(t,e)&&w(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 w(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 b(t,e){var i=new A(t.i,t.x,t.y),n=new A(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 T(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(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 C(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,i){var n=i(0),s=i(502),r=i(501),o=i(132),a=new n({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:s,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var n=t.bitmapMask,s=this.renderer,r=this.gl,o=n.visible;n&&r&&(s.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.visible=!0,n.renderWebGL(s,n,0,i),n.visible=o,s.flush(),s.setFramebuffer(t.mainFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT))},endMask:function(t){var e=t.bitmapMask,i=this.renderer,n=this.gl;e&&(i.setFramebuffer(null),i.setPipeline(this),i.setTexture2D(t.maskTexture,1),i.setTexture2D(t.mainTexture,0),i.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),n.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var n=t.getContext("experimental-webgl"),s=new Uint8Array(n.drawingBufferWidth*n.drawingBufferHeight*4);n.readPixels(0,0,n.drawingBufferWidth,n.drawingBufferHeight,n.RGBA,n.UNSIGNED_BYTE,s);var r,o=document.createElement("canvas"),a=o.getContext("2d");o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;for(var h=(r=a.getImageData(0,0,o.width,o.height)).data,u=0;u2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.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>16&&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){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl,i=this.width,n=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture&&(i=t.renderTexture.width,n=t.renderTexture.height),e.bindFramebuffer(e.FRAMEBUFFER,t),e.viewport(0,0,i,n),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 o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR&&this.config.antialias&&(a=o.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},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&&o(this.nativeTextures,e),this.gl.deleteTexture(t),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,s=t._ch;if(this.pushScissor(e,i,n,s),t.backgroundColor.alphaGL>0){var r=t.backgroundColor;this.pipelines.TextureTintPipeline.drawFillRect(e,i,n,s,a.getTintFromFloats(r.redGL,r.greenGL,r.blueGL,1),r.alphaGL)}},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;t.flashEffect.postRenderWebGL(e,a.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,a.getTintFromFloats),t.dirty=!1,this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&(t.enable(t.SCISSOR_TEST),t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height)),this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;u=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===y&&(v>=0?v=-(v+f):v<0&&(v=Math.abs(v)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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.scale(m,y),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.drawImage(e.source.image,l,c,d,f,g,v,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=l},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;var t=this;this.step=function e(i){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.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,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){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},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(57);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&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","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=function(t,e,i,n,s){var r=.5*(n-e),o=.5*(s-i),a=t*t;return(2*i-2*n+r+o)*(t*a)+(-3*i+3*n-2*r-o)*a+r*t+i}},function(t,e,i){var n=i(11);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,r,o=Number.MAX_VALUE,a=Number.MAX_VALUE,h=Number.MIN_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER,l=0;l16777215?{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(30),s=i(285);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e,i){var n=i(30);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,i){var n=i(0),s=i(39),r=i(8),o=i(11),a=i(32),h=i(134),u=i(4),l=new n({Extends:r,initialize:function(t,e,i,n){r.call(this),this.scene,this.sceneManager,this.config,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.visible=!0,this.useBounds=!1,this.worldView=new o,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 o,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new a,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.alpha=1,this.disableCull=!1,this.culledObjects=[],this.midPoint=new u(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},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 u);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},centerOn:function(t,e){var i=.5*this.width,n=.5*this.height;return this.midPoint.set(t,e),this.scrollX=t-i,this.scrollY=e-n,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),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],u=this.scrollX,l=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;g-m&&T>-y&&b-m&&A>-y&&Ss&&(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=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=h(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return 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},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=t,this.config=t.sys.game.config,this.sceneManager=t.sys.game.scene;var e=this.config.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,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},setVisible:function(t){return this.visible=t,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(){var t=!1;if(0!==this._x||0!==this._y)t=!0;else{var e=this.config.width,i=this.config.height;e===this._width&&i===this._height||(t=!0)}var n=this.sceneManager;t&&!this._customViewport?n.customViewports++:!t&&this._customViewport&&n.customViewports--,this.dirty=!0,this._customViewport=t},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.config=null,this.sceneManager=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=l},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,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){void 0===e&&(e=1);for(var i=null,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;i--){var n=Math.floor(this.frac()*(e+1)),s=t[n];t[n]=t[i],t[i]=s}return t}});t.exports=n},function(t,e,i){var n=i(138),s=i(65),r=i(16),o=i(5);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){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},,,function(t,e,i){var n=i(0),s=i(59),r=i(8),o=(i(3),i(507),new n({Extends:r,initialize:function(t,e){r.call(this),this.game=t,this.data=new s(this),this.on("setdata",this.setDataHandler,this),this.on("changedata",this.changeDataHandler,this),this.hasLoaded=!1,this.dataLocked=!1,this.apis=[],this.entryPoint="",this.entryPointData=null,this.contextID=0,this.contextType="",this.locale="",this.platform="",this.version="",this.playerID="",this.playerName="",this.playerPhotoURL=""},setDataHandler:function(t,e,i){if(!this.dataLocked){console.log("set data:",e,i);var n={};n[e]=i;var s=this;FBInstant.player.setDataAsync(n).then(function(){console.log("sdh saved",n),s.emit("savedata",n)})}},changeDataHandler:function(t,e,i){if(!this.dataLocked){console.log("change data:",e,i);var n={};n[e]=i;var s=this;FBInstant.player.setDataAsync(n).then(function(){console.log("cdh saved",n),s.emit("savedata",n)})}},showLoadProgress:function(t){return t.load.on("progress",function(t){this.hasLoaded||(console.log(t),FBInstant.setLoadingProgress(100*t))},this),t.load.on("complete",function(){this.hasLoaded=!0,console.log("loaded"),FBInstant.startGameAsync().then(this.gameStarted.bind(this))},this),this},gameStarted:function(){console.log("FBP gameStarted"),this.apis=FBInstant.getSupportedAPIs(),this.contextID=FBInstant.context.getID(),this.contextType=FBInstant.context.getType(),this.locale=FBInstant.getLocale(),this.platform=FBInstant.getPlatform(),this.version=FBInstant.getSDKVersion(),this.playerID=FBInstant.player.getID(),this.playerName=FBInstant.player.getName(),this.playerPhotoURL=FBInstant.player.getPhoto();var t=this;FBInstant.onPause(function(){t.emit("pause")}),FBInstant.getEntryPointAsync().then(function(e){t.entryPoint=e,t.entryPointData=FBInstant.getEntryPointData(),t.emit("startgame")})},loadPlayerPhoto:function(t,e){return console.log("load"),t.load.setCORS("anonymous"),t.load.image(e,this.playerPhotoURL),t.load.on("complete",function(){this.emit("photocomplete",e)},this),t.load.start(),this},getData:function(t){Array.isArray(t)||(t=[t]),console.log("getdata",t);var e=this;return FBInstant.player.getDataAsync(t).then(function(t){for(var i in console.log("getdata req",t),e.dataLocked=!0,t)e.data.set(i,t[i]);e.dataLocked=!1,e.emit("getdata",t)}),this},saveData:function(t){var e=this;return FBInstant.player.setDataAsync(t).then(function(){console.log("data saved to fb"),e.emit("savedata",t)}),this},getStats:function(t){var e=this;return FBInstant.player.getStatsAsync(t).then(function(t){console.log("stats got from fb"),e.emit("getstats",t)}),this},saveStats:function(t){var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var n=this;return FBInstant.player.setStatsAsync(e).then(function(){console.log("stats saved to fb"),n.emit("savestats",e)}),this},incStats:function(t){var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var n=this;return FBInstant.player.incrementStatsAsync(e).then(function(t){console.log("stats modified"),n.emit("incstats",t)}),this},saveSession:function(t){return JSON.stringify(t).length<=1e3?FBInstant.setSessionData(t):console.warn("Session data too long. Max 1000 chars."),this},openShare:function(t,e,i,n){return this._share("SHARE",t,e,i,n)},openInvite:function(t,e,i,n){return this._share("INVITE",t,e,i,n)},openRequest:function(t,e,i,n){return this._share("REQUEST",t,e,i,n)},openChallenge:function(t,e,i,n){return this._share("CHALLENGE",t,e,i,n)},createShortcut:function(){var t=this;FBInstant.canCreateShortcutAsync().then(function(e){e&&FBInstant.createShortcutAsync().then(function(){t.emit("shortcutcreated")}).catch(function(){t.emit("shortcutfailed")})})},_share:function(t,e,i,n,s){if(void 0===s&&(s={}),i)var r=this.game.textures.getBase64(i,n);var o={intent:t,image:r,text:e,data:s},a=this;return FBInstant.shareAsync(o).then(function(){a.emit("resume")}),this},log:function(t,e,i){return void 0===i&&(i={}),t.length>=2&&t.length<=40&&FBInstant.logEvent(t,parseFloat(e),i),this},destroy:function(){FBInstant.quit(),this.game=null}}));t.exports=o},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once("remove",this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,this._timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this._delay=0,this._repeat=0,this._repeatDelay=0,this._yoyo=!1,this.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,i){return this.play(e,!0,i),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._startAnimation(t,i))},playReverse:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,i))},_startAnimation:function(t,e){this.load(t,e);var i=this.currentAnim,n=this.parent;return this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,i.showOnStart&&(n.visible=!0),n.emit("animationstart",this.currentAnim,this.currentFrame),n},reverse:function(t){return this.isPlaying&&this.currentAnim.key===t?(this._reverse=!this._reverse,this.forward=!this.forward,this.parent):this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=0,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){return void 0===t&&(t=!1),this.currentAnim.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(this.currentAnim.frames[0]),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t=this.parent;return t.emit("animationcomplete",this.currentAnim,this.currentFrame),t},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=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.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("animationupdate",i,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(168),r=i(10),o=i(167),a=i(62),h=i(72),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.timeScale=1},createTimeline:function(t){return o(this,t)},timeline:function(t){var e=o(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return h(this,t)},add:function(t){var e=h(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=s(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active;for(t=0;t-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;ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","object layer"),this.opacity=s(t,"opacity",1),this.properties=s(t,"properties",{}),this.propertyTypes=s(t,"propertytypes",{}),this.type=s(t,"type","objectgroup"),this.visible=s(t,"visible",!0),this.objects=s(t,"objects",[])}});t.exports=r},function(t,e,i){var n=i(640),s=i(320),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=s(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?(a.ellipse=t.ellipse,a.width=t.width,a.height=t.height):t.text?(a.width=t.width,a.height=t.height,a.text=t.text):(a.rectangle=!0,a.width=t.width,a.height=t.height);return a}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t-1}return!1}},function(t,e,i){var n=i(23);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),u=0;u=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off("update",this.step,this),t.events.emit("transitioncomplete",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){return this.manager.add(t,e,i),this},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){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),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)},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("shutdown",this.shutdown,this),t.off("postupdate",this.step,this),t.off("transitionout")},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),t.exports=a},function(t,e,i){var n=i(80),s=i(17),r={SceneManager:i(201),ScenePlugin:i(331),Settings:i(199),Systems:i(121)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(172),s=new(i(0))({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this)},boot:function(){}});t.exports=s},function(t,e,i){t.exports={BasePlugin:i(172),DefaultPlugins:i(123),PluginCache:i(10),PluginManager:i(203),ScenePlugin:i(333)}},,,,function(t,e,i){var n=i(33),s=i(0),r=i(43),o=i(31),a=i(4),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,n){void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y);var s=this.gameObject;return!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.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),this.offset.set(i,n),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.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)},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;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),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=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(43);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(43);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=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(33),s=i(0),r=i(43),o=i(154),a=i(11),h=i(31),u=i(32),l=i(4),c=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.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x,e.y),this.prev=new l(e.x,e.y),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new l(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=r.FACING_NONE,this.immovable=!1,this.moves=!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.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.physicsType=r.DYNAMIC_BODY,this._reset=!0,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._bounds=new a,this._tempMatrix=new u},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this._tempMatrix);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY;var n=!1;if(this.syncBounds){var s=t.getBounds(this._bounds);this.width=s.width,this.height=s.height,n=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},update:function(t){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,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.none=!0,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1,this.updateBounds();var e=this.transform;if(this.position.x=e.x+e.scaleX*(this.offset.x-e.displayOriginX),this.position.y=e.y+e.scaleY*(this.offset.y-e.displayOriginY),this.updateCenter(),this.rotation=e.rotation,this.preRotation=this.rotation,this._reset&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves){this.world.updateMotion(this,t);var i=this.velocity.x,n=this.velocity.y;this.newVelocity.set(i*t,n*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(n,i),this.speed=Math.sqrt(i*i+n*n),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit("worldbounds",this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.deltaX(),this._dy=this.deltaY()},postUpdate:function(){this._dx=this.deltaX(),this._dy=this.deltaY(),this.moves&&(0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this._dx<0?this.facing=r.FACING_LEFT:this._dx>0&&(this.facing=r.FACING_RIGHT),this._dy<0?this.facing=r.FACING_UP:this._dy>0&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),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(this.position),this.prev.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?n(this,t,e):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.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},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(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,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){return void 0===t&&(t=!0),this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),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},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=c},function(t,e,i){var n=i(343),s=i(20),r=i(0),o=i(342),a=i(43),h=i(58),u=i(8),l=i(356),c=i(355),d=i(354),f=i(341),p=i(340),g=i(3),v=i(229),m=i(696),y=i(11),x=i(228),w=i(695),b=i(690),T=i(689),S=i(70),A=i(338),C=i(339),_=i(4),M=i(40),E=new r({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.bodies=new S,this.staticBodies=new S,this.pendingDestroy=new S,this.colliders=new v,this.gravity=new _(g(e,"gravity.x",0),g(e,"gravity.y",0)),this.bounds=new y(g(e,"x",0),g(e,"y",0),g(e,"width",t.sys.game.config.width),g(e,"height",t.sys.game.config.height)),this.checkCollision={up:g(e,"checkCollision.up",!0),down:g(e,"checkCollision.down",!0),left:g(e,"checkCollision.left",!0),right:g(e,"checkCollision.right",!0)},this.fps=g(e,"fps",60),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(e,"timeScale",1),this.OVERLAP_BIAS=g(e,"overlapBias",4),this.TILE_BIAS=g(e,"tileBias",16),this.forceX=g(e,"forceX",!1),this.isPaused=g(e,"isPaused",!1),this._total=0,this.drawDebug=g(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(e,"debugShowBody",!0),debugShowStaticBody:g(e,"debugShowStaticBody",!0),debugShowVelocity:g(e,"debugShowVelocity",!0),bodyDebugColor:g(e,"debugBodyColor",16711935),staticBodyDebugColor:g(e,"debugStaticBodyColor",255),velocityDebugColor:g(e,"debugVelocityColor",65280)},this.maxEntries=g(e,"maxEntries",16),this.useTree=g(e,"useTree",!0),this.tree=new x(this.maxEntries),this.staticTree=new x(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=a.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=s;)this._elapsed-=s,i++,this.step(n);this.stepsLastFrame=i}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;ta.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(l.x,l.y,u.right,u.y)-l.radius):l.y>u.bottom&&(l.xu.right&&(a=h(l.x,l.y,u.right,u.bottom)-l.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,g=t.mass,v=e.velocity.x,m=e.velocity.y,y=e.mass,x=c*Math.cos(o)+d*Math.sin(o),w=c*Math.sin(o)-d*Math.cos(o),b=v*Math.cos(o)+m*Math.sin(o),T=v*Math.sin(o)-m*Math.cos(o),S=((g-y)*x+2*y*b)/(g+y),A=(2*g*x+(y-g)*b)/(g+y);t.immovable||(t.velocity.x=(S*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+S*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(A*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+A*Math.sin(o))*e.bounce.y,v=e.velocity.x,m=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>c?t.velocity.x*=-1:v<0&&!e.immovable&&c0&&!t.immovable&&m>d?t.velocity.y*=-1:m<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&v0&&!e.immovable&&c>v?e.velocity.x*=-1:d<0&&!t.immovable&&m0&&!e.immovable&&c>m&&(e.velocity.y*=-1));var C=this._frameTime;return t.immovable||(t.x+=t.velocity.x*C-a*Math.cos(o),t.y+=t.velocity.y*C-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*C+a*Math.cos(o),e.y+=e.velocity.y*C+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("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;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)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,u,l=t.body;if(0!==e.length&&l&&l.enable)if(this.useTree){var c=this.treeMinMax;c.minX=l.left,c.minY=l.top,c.maxX=l.right,c.maxY=l.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,u+=d}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,p=e.getTilesWithinWorldXY(a,h,u,l);if(0===p.length)return!1;for(var g={left:0,right:0,top:0,bottom:0},v=0;ve-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=0?t:t+2*Math.PI}},function(t,e,i){var n=i(0),s=i(18),r=i(70),o=i(8),a=i(6),h=i(1),u=i(10),l=i(75),c=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=l(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=s.LOADER_IDLE,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this.systems.events.once("shutdown",this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},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("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("update",this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit("progress",this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.size0&&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,i){var n=i(0),s=i(8),r=i(3),o=i(76),a=i(178),h=i(110),u=i(177),l=i(374),c=i(373),d=i(372),f=i(146),p=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.keys=[],this.combos=[],this.queue=[],this.onKeyHandler,this.time=0,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.settings.input,e=this.scene.sys.game.config;this.enabled=r(t,"keyboard",e.inputKeyboard),this.target=r(t,"keyboard.target",e.inputKeyboardEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=function(e){if(!e.defaultPrevented&&t.isActive()){t.queue.push(e);var i=t.keys[e.keyCode];i&&i.preventDefault&&e.preventDefault()}};this.onKeyHandler=e,this.target.addEventListener("keydown",e,!1),this.target.addEventListener("keyup",e,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("keydown",this.onKeyHandler),this.target.removeEventListener("keyup",this.onKeyHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},createCursorKeys:function(){return this.addKeys({up:h.UP,down:h.DOWN,left:h.LEFT,right:h.RIGHT,space:h.SPACE,shift:h.SHIFT})},addKeys:function(t){var e={};if("string"==typeof t){t=t.split(",");for(var i=0;i-1?e[i]=t:e[t.keyCode]=t,t}return"string"==typeof t&&(t=h[t.toUpperCase()]),e[t]||(e[t]=new a(t)),e[t]},removeKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=h[t.toUpperCase()]);e[t]&&(e[t]=void 0)},createCombo:function(t,e){return new u(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=f(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.queue.length;if(this.enabled&&0!==e)for(var i=this.queue.splice(0,e),n=this.keys,s=0;s=e}}},function(t,e,i){var n=i(88),s=i(33),r=i(0),o=i(182),a=i(380),h=i(58),u=i(115),l=i(55),c=i(8),d=i(1),f=i(76),p=i(7),g=i(10),v=i(11),m=i(31),y=i(68),x=i(61),w=new r({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,f.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once("destroy",this.destroy,this),this.pluginEvents.emit("boot")},start:function(){var t=this.systems.events;t.on("transitionstart",this.transitionIn,this),t.on("transitionout",this.transitionOut,this),t.on("transitioncomplete",this.transitionComplete,this),t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.enabled=!0,this.pluginEvents.emit("start")},preUpdate:function(){this.pluginEvents.emit("preUpdate");var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){this.pluginEvents.emit("update",t,e);var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(n=!0,this._pollTimer=this.pollRate)),n)for(var s=this.manager.pointers,r=0;r0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,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=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var a=[];for(i=0;i1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3===t.dragState){for(s=this._drag[t.id],i=0;i0?(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),u[0]?(r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):r.target=null)}else!r.target&&u[0]&&(r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target));var c=t.x-n.input.dragX,d=t.y-n.input.dragY;n.emit("drag",t,c,d),this.emit("drag",t,n,c,d)}return s.length}if(5===t.dragState){for(s=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,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 a(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,a=!1;if(p(e)){var h=e;e=d(h,"hitArea",null),i=d(h,"hitAreaCallback",null),n=d(h,"draggable",!1),s=d(h,"dropZone",!1),r=d(h,"cursor",!1),a=d(h,"useHandCursor",!1);var u=d(h,"pixelPerfect",!1),l=d(h,"alphaTolerance",1);u&&(e={},i=this.makePixelPerfect(l)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;ct.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){t.exports={CircleToCircle:i(850),CircleToRectangle:i(849),GetRectangleIntersection:i(848),LineToCircle:i(401),LineToLine:i(147),LineToRectangle:i(847),PointToLine:i(400),PointToLineSegment:i(846),RectangleToRectangle:i(238),RectangleToTriangle:i(845),RectangleToValues:i(844),TriangleToCircle:i(843),TriangleToLine:i(842),TriangleToTriangle:i(841)}},function(t,e,i){t.exports={Circle:i(860),Ellipse:i(244),Intersects:i(402),Line:i(840),Point:i(822),Polygon:i(808),Rectangle:i(393),Triangle:i(779)}},function(t,e,i){var n=i(0),s=i(405),r=i(152),o=i(21),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},u=t.matrix,l=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),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=a},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(111);s.register("text",function(t,e){void 0===t&&(t={});var i=r(t,"text",""),s=r(t,"style",null),a=r(t,"padding",null);null!==a&&(s.padding=a);var h=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h})},function(t,e,i){var n=i(25),s=i(130),r=i(13),o=i(12),a=i(35);r.register("sprite",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),s(h,t),h})},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(69);s.register("image",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},function(t,e,i){var n=i(13),s=i(117);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new s(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(111);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(35);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(69);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(117);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<r;h--){for(u=0;u0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e){t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}},function(t,e,i){var n=i(0),s=i(39),r=i(63),o=i(3),a=i(35),h=i(62),u=i(4),l=new n({Extends:a,initialize:function(t,e,i,n,s,r){a.call(this,t,i,n,s,r),this.path=e,this.rotateToPath=!1,this.pathRotationVerticalAdjust=!1,this.pathRotationOffset=0,this.pathOffset=new u(i,n),this.pathVector=new u,this.pathTween,this.pathConfig=null,this._prevDirection=h.PLAYING_FORWARD},setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=!1),this.rotateToPath=t,this.pathRotationOffset=e,this.pathRotationVerticalAdjust=i,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=0,t.to=1;var n=r(t,"positionOnPath",!1);if(this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0),this.pathRotationVerticalAdjust=r(t,"verticalAdjust",!1),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),n&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=h.PLAYING_FORWARD,this.rotateToPath){var a=this.path.getPoint(.1);this.rotation=Math.atan2(a.y-this.y,a.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},preUpdate:function(t,e){this.anims.update(t,e);var i=this.pathTween;if(i){var n=i.data[0];if(n.state!==h.PLAYING_FORWARD&&n.state!==h.PLAYING_BACKWARD)return;var r=this.pathVector;this.path.getPoint(i.getValue(),r),r.add(this.pathOffset);var o=this.x,a=this.y;this.setPosition(r.x,r.y);var u=this.x-o,l=this.y-a;if(0===u&&0===l)return;if(n.state!==this._prevDirection)return void(this._prevDirection=n.state);this.rotateToPath&&(this.rotation=Math.atan2(l,u)+s(this.pathRotationOffset),this.pathRotationVerticalAdjust&&(this.flipY=0!==this.rotation&&n.state===h.PLAYING_BACKWARD))}}});t.exports=l},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e){t.exports=function(t,e){for(var i=0;ithis._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,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=i(52),s=i(0),r=i(14),o=i(426),a=i(425),h=i(904),u=i(1),l=i(150),c=i(424),d=i(112),f=i(428),p=i(423),g=i(11),v=i(83),m=i(4),y=i(40),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),this.y=new h(e,"y",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),this.angle=new h(e,"angle",{min:0,max:360}),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?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(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},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=i(0),s=i(39),r=i(58),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>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"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*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"),this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=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>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.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(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&&e.cameraFilter&r.id)o&&(o.style.display="none");else{var a=t.pipelines.TextureTintPipeline._tempMatrix1,h=t.pipelines.TextureTintPipeline._tempMatrix2,u=t.pipelines.TextureTintPipeline._tempMatrix3,l=e.originX*e.width,c=e.originY*e.height;h.applyITRS(e.x-l-r.scrollX*e.scrollFactorX,e.y-c-r.scrollY*e.scrollFactorY,e.rotation,e.scaleX,e.scaleY),a.copyFrom(r.matrix),a.multiply(h,u),o.style.display="block",o.style.opacity=e.alpha,o.style.zIndex=e._depth,o.style.pointerEvents="auto",o.style.mixBlendMode=n[e._blendMode],o.style.transform=u.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",o.style.transformOrigin=100*e.originX+"% "+100*e.originY+"%"}}},function(t,e,i){var n=i(0),s=i(14),r=i(910),o=i(15),a=i(155),h=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.skewX=0,this.skewY=0,this.rotate3d=new a,this.rotate3dAngle="deg",this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),n&&this.setElement(n)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e,i){var n=i(56);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return n(t,s)}},function(t,e,i){var n=i(29);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;ht.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(249);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),o=0;o=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(i>0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e,i){var n=i(29);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){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 u=e[h];t.splice(i,0,u),s&&s.call(r,u)}return e}},function(t,e){t.exports=function(t,e,i,n,s){if(void 0===s&&(s=t),i>0){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.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t},tick:function(){this.step(window.performance.now())},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(window.performance.now())},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){var i=0,n=function(t,e,n,s){var r=i-s.y-s.height;t.add(n,e,s.x,r,s.width,s.height)};t.exports=function(t,e,s){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=s.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;cx||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var _=u,M=u,E=0,P=e.sourceIndex,L=0;Lg||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,w=0;wr&&(y=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+m,h-y,u-x),(v+=h+p)+h>r&&(v=f,m+=u+p)}return t}},function(t,e,i){var n=i(34);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=n(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var n=i(34);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a=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,i){var n=i(57),s=i(81),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(57),browser:i(81),features:i(122),input:i(494),audio:i(493),video:i(492),fullscreen:i(491),canvasFeatures:i(209)}},function(t,e,i){var n=i(22);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="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),a=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),u.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),u.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),u[0]=h,console.log.apply(console,u)}}}},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){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 tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid texture-based tint"," color.rgb = mix(texture.rgb, outTint.rgb, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},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],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*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],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*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],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*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],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*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],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*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],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*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),u=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*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,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){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];","","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(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_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_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,i){var n=i(264),s=i(24),r=i(22),o=i(122);t.exports=function(t){var e,a,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.antialias||s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width*h.resolution,h.height*h.resolution,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||n.setCrisp(t.canvas),t.canvas.style.width=(h.width*h.zoom).toString()+"px",t.canvas.style.height=(h.height*h.zoom).toString()+"px",h.renderType!==r.HEADLESS&&(e=i(259),a=i(256),h.renderType===r.WEBGL?(t.renderer=new a(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(85);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style=["display: block;","width: "+t.canvas.width+"px;","height: "+t.canvas.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e,i){var n=i(0),s=i(22),r=i(1),o=i(3),a=i(7),h=i(16),u=i(2),l=i(123),c=i(134),d=new n({initialize:function(t){void 0===t&&(t={});this.width=o(t,"width",1024),this.height=o(t,"height",768),this.zoom=o(t,"zoom",1),this.resolution=o(t,"resolution",1),this.renderType=o(t,"type",s.AUTO),this.parent=o(t,"parent",null),this.canvas=o(t,"canvas",null),this.context=o(t,"context",null),this.canvasStyle=o(t,"canvasStyle",null),this.sceneConfig=o(t,"scene",null),this.seed=o(t,"seed",[(Date.now()*Math.random()).toString()]),h.RND.init(this.seed),this.gameTitle=o(t,"title",""),this.gameURL=o(t,"url","https://phaser.io"),this.gameVersion=o(t,"version",""),this.autoFocus=o(t,"autoFocus",!0),this.domCreateContainer=o(t,"dom.createContainer",!1),this.domBehindCanvas=o(t,"dom.behindCanvas",!1),this.inputKeyboard=o(t,"input.keyboard",!0),this.inputKeyboardEventTarget=o(t,"input.keyboard.target",window),this.inputMouse=o(t,"input.mouse",!0),this.inputMouseEventTarget=o(t,"input.mouse.target",null),this.inputMouseCapture=o(t,"input.mouse.capture",!0),this.inputTouch=o(t,"input.touch",!0),this.inputTouchEventTarget=o(t,"input.touch.target",null),this.inputTouchCapture=o(t,"input.touch.capture",!0),this.inputActivePointers=o(t,"input.activePointers",1),this.inputGamepad=o(t,"input.gamepad",!1),this.inputGamepadEventTarget=o(t,"input.gamepad.target",window),this.disableContextMenu=o(t,"disableContextMenu",!1),this.audio=o(t,"audio"),this.hideBanner=!1===o(t,"banner",null),this.hidePhaser=o(t,"banner.hidePhaser",!1),this.bannerTextColor=o(t,"banner.text","#ffffff"),this.bannerBackgroundColor=o(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(t,"fps",null);var e=o(t,"render",t);this.autoResize=o(e,"autoResize",!1),this.antialias=o(e,"antialias",!0),this.roundPixels=o(e,"roundPixels",!1),this.pixelArt=o(e,"pixelArt",!1),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(e,"transparent",!1),this.clearBeforeRender=o(e,"clearBeforeRender",!0),this.premultipliedAlpha=o(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=o(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=o(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(e,"powerPreference","default"),this.batchSize=o(e,"batchSize",2e3);var i=o(t,"backgroundColor",0);this.backgroundColor=c(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(t,"callbacks.preBoot",u),this.postBoot=o(t,"callbacks.postBoot",u),this.physics=o(t,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(t,"loader.baseURL",""),this.loaderPath=o(t,"loader.path",""),this.loaderMaxParallelDownloads=o(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(t,"loader.crossOrigin",void 0),this.loaderResponseType=o(t,"loader.responseType",""),this.loaderAsync=o(t,"loader.async",!0),this.loaderUser=o(t,"loader.user",""),this.loaderPassword=o(t,"loader.password",""),this.loaderTimeout=o(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var n=o(t,"plugins",null),d=l.DefaultScene;n&&(Array.isArray(n)?this.defaultPlugins=n:a(n)&&(this.installGlobalPlugins=r(n,"global",[]),this.installScenePlugins=r(n,"scene",[]),Array.isArray(n.default)?d=n.default:Array.isArray(n.defaultMerge)&&(d=d.concat(n.defaultMerge)))),this.defaultPlugins=d;var f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(t,"images.default",f+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(t,"images.missing",f+"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=d},function(t,e,i){var n=i(85),s=i(213),r=i(211),o=i(24),a=i(0),h=i(505),u=i(504),l=i(503),c=i(59),d=i(496),f=i(495),p=i(263),g=i(8),v=i(305),m=i(208),y=i(10),x=i(203),w=i(201),b=i(198),T=i(191),S=i(478),A=i(477),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 T(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.sound=b.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new v(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isOver=!0,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("texturesready",this.texturesReady,this)):console.warn("Core Phaser Plugins missing. Cannot start.")},texturesReady:function(){this.events.emit("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("hidden",this.onHidden,this),t.on("visible",this.onVisible,this),t.on("blur",this.onBlur,this),t.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e);var n=this.renderer;n.preRender(),i.emit("prerender",n,t,e),this.scene.render(n),n.postRender(),i.emit("postrender",n,t,e)},headlessStep:function(t,e){var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e),i.emit("prerender"),i.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.domContainer&&(this.domContainer.style.width=t+"px",this.domContainer.style.height=e+"px"),this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=new(i(0))({initialize:function(){this.value,this.valueFormatted,this.timestamp,this.rank,this.data}});t.exports=n},function(t,e,i){var n=i(0),s=i(8),r=i(10),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){t.exports={EventEmitter:i(508)}},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,u=[],l=!1,c=-1;function d(){l&&h&&(l=!1,h.length?u=h.concat(u):c=-1,u.length&&f())}function f(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c1)for(var i=1;i1&&(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){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e,i){var n=i(30);n.ColorToRGBA=i(931),n.ComponentToHex=i(514),n.GetColor=i(158),n.GetColor32=i(287),n.HexStringToColor=i(288),n.HSLToColor=i(930),n.HSVColorWheel=i(929),n.HSVToRGB=i(512),n.HueToComponent=i(513),n.IntegerToColor=i(286),n.IntegerToRGB=i(285),n.Interpolate=i(928),n.ObjectToColor=i(284),n.RandomRGB=i(927),n.RGBStringToColor=i(283),n.RGBToHSV=i(926),n.RGBToString=i(925),n.ValueToColor=i(134),t.exports=n},function(t,e,i){var n=i(0),s=i(59),r=i(10),o=new n({Extends:s,initialize:function(t){s.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.events=this.systems.events,this.events.once("destroy",this.destroy,this)},start:function(){this.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",o,"data"),t.exports=o},function(t,e,i){t.exports={DataManager:i(59),DataManagerPlugin:i(516)}},function(t,e,i){var n=i(265),s=i(0),r=i(86),o=i(4),a=new s({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.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,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;ei;)n-=i;n0&&(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?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.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,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),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*u,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(87),s=i(269),r=i(531),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=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){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,i){var n=i(126),s=i(0),r=i(1),o=i(10),a=i(31),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.baseScale=1,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.systems.events.once("destroy",this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on("update",this.update,this),e.once("shutdown",this.shutdown,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new n(t,e,i,s);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,s=0;s0&&(h.preRender(r,o),t.render(n,e,i,h))}},resetAll:function(){for(var t=0;t=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var n=i(20),s=i(0),r=i(4),o=i(125),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,a){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===s&&(s=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning?h:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(h.scrollX,h.scrollY),this.destination.set(t,e),h.getScroll(t,e,this.current),"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("camerapanstart",this.camera,this,i,t,e),h)},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-h&&(c-=h,n+=u),f=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){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){var n=i(16),s=i(32),r=i(218),o=i(217),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t){void 0===t&&(t=new s);var e=this.parentContainer;if(!e)return this.getLocalTransformMatrix(t);for(var i=[];e;)i.unshift(e),e=e.parentContainer;t.loadIdentity();for(var n=i.length,r=0;r>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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(60),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(220),s=i(219),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new s(this.scene,t)}};t.exports=r},function(t,e,i){var n=i(11),s=i(295),r=i(4),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,s,r,o,a,h,u;if(void 0===t&&(t=new n),this.parentContainer){var l=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t),h=t.x,u=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},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)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e,i){var n=i(20),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},function(t,e,i){var n=i(47),s=i(45),r=i(46),o=i(44);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(45),r=i(48),o=i(44);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(92),s=i(45),r=i(91),o=i(44);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(89),s=i(47),r=i(90),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(89),s=i(49),r=i(90),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(91),s=i(90);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(601),s=i(92),r=i(89);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(51),s=i(47),r=i(50),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(49),r=i(50),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(51),s=i(92),r=i(50),o=i(91);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(302),s=[];s[n.BOTTOM_CENTER]=i(605),s[n.BOTTOM_LEFT]=i(604),s[n.BOTTOM_RIGHT]=i(603),s[n.CENTER]=i(602),s[n.LEFT_CENTER]=i(600),s[n.RIGHT_CENTER]=i(599),s[n.TOP_CENTER]=i(598),s[n.TOP_LEFT]=i(597),s[n.TOP_RIGHT]=i(596);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(1015),Call:i(1014),GetFirst:i(1013),GetLast:i(1012),GridAlign:i(1011),IncAlpha:i(1010),IncX:i(1009),IncXY:i(1008),IncY:i(1007),PlaceOnCircle:i(1006),PlaceOnEllipse:i(1005),PlaceOnLine:i(1004),PlaceOnRectangle:i(1003),PlaceOnTriangle:i(1002),PlayAnimation:i(1001),PropertyValueInc:i(36),PropertyValueSet:i(26),RandomCircle:i(1e3),RandomEllipse:i(999),RandomLine:i(998),RandomRectangle:i(997),RandomTriangle:i(996),Rotate:i(995),RotateAround:i(994),RotateAroundDistance:i(993),ScaleX:i(992),ScaleXY:i(991),ScaleY:i(990),SetAlpha:i(989),SetBlendMode:i(988),SetDepth:i(987),SetHitArea:i(986),SetOrigin:i(985),SetRotation:i(984),SetScale:i(983),SetScaleX:i(982),SetScaleY:i(981),SetTint:i(980),SetVisible:i(979),SetX:i(978),SetXY:i(977),SetY:i(976),ShiftPosition:i(975),Shuffle:i(974),SmootherStep:i(973),SmoothStep:i(972),Spread:i(971),ToggleVisible:i(970),WrapInRectangle:i(969)}},function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s0){var s=t.gl,r=this.pipeline,o=r.vertexBuffer,a=e.tileset.glTexture;t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer,t.setPipeline(r),t.setTexture2D(a,0),s.drawArrays(r.topology,0,e.vertexCount),r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}}},function(t,e,i){var n=i(2),s=i(2);n=i(630),s=i(629),t.exports={renderWebGL:n,renderCanvas:s}},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,u=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,a.multiply(h,u));var l=e.tileset,c=t.currentContext,d=l.image.getSourceImage();c.save(),u.copyToContext(c);for(var f=n.alpha*e.alpha,p=0;p-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(17);t.exports=function(t){for(var e,i,s,r,o,a=0;a>>0;return n}},function(t,e,i){var n=i(643),s=i(1),r=i(105),o=i(320),a=i(66);t.exports=function(t,e){for(var i=[],h=0;h0){var m=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);m.rotation=v.rotation,m.flipX=v.flipped,d.push(m)}else{var y=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(y)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e,i){t.exports={Parse:i(323),Parse2DArray:i(223),ParseCSV:i(322),Impact:i(316),Tiled:i(321)}},function(t,e,i){var n=i(54),s=i(53),r=i(4);t.exports=function(t,e,i,o,a,h){return void 0===o&&(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e,i){var n=i(23);t.exports=function(t,e,i,s,r,o){if(void 0!==r){var a,h=n(t,e,i,s,null,o),u=0;for(a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e,i){var n=i(67),s=i(41),r=i(112);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;ae)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(67),s=i(41),r=i(224);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;a=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;r=0&&p=0&&g0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},function(t,e,i){var n=i(341);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),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},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(691);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},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(693);t.exports=function(t,e,i,s,r){var o=0;return t.deltaX()<0&&!t.blocked.left&&e.collideRight&&t.checkCollision.left?e.faceRight&&t.x0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e,i){var n=i(694),s=i(692),r=i(339);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,m=0,y=1;if(e.deltaAbsX()>e.deltaAbsY()?m=-1:e.deltaAbsX()=0;a--){var h=e[a],u=r(s,o,h.x,h.y);u=0;a--){var h=e[a],u=r(s,o,h.x,h.y);u>i&&(n=h,i=u)}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 l),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new l),i.setToPolar(t,e)},shutdown:function(){var t=this.systems.events;t.off("update",this.world.update,this.world),t.off("postupdate",this.world.postUpdate,this.world),t.off("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("start",this.start,this),this.scene=null,this.systems=null}});u.register("ArcadePhysics",d,"arcadePhysics"),t.exports=d},function(t,e,i){var n=i(43),s=i(17),r={ArcadePhysics:i(709),Body:i(343),Collider:i(342),Factory:i(349),Group:i(346),Image:i(348),Sprite:i(144),StaticBody:i(338),StaticGroup:i(345),World:i(344)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},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;o1?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,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e){return t/e/1e3}},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.floor(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},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.ceil(t*n)/n}},function(t,e){t.exports=function(t){for(var e=0,i=0;i0&&0==(t&t-1)}},function(t,e,i){t.exports={GetNext:i(414),IsSize:i(84),IsValue:i(727)}},function(t,e,i){var n=i(290);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(124);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?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(265);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?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[i=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e'),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?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)e.x&&t.ye.y}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},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,i){var n=Math.min(t.x,e),s=Math.max(t.right,e);t.x=n,t.width=s-n;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var s=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=s,t.height=r-s,t}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;on(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,i){var n=i(234);t.exports=function(t,e){var i=n(t);return ii&&(i=h.x),h.xr&&(r=h.y),h.ye.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(61),s=i(147);t.exports=function(t,e){return!!(n(t,e.getPointA())||n(t,e.getPointB())||s(t.getLineA(),e)||s(t.getLineB(),e)||s(t.getLineC(),e))}},function(t,e,i){var n=i(401),s=i(61);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottomt.right+r||it.bottom+r||st.right||e.rightt.bottom||e.bottom0}},function(t,e,i){var n=i(400);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){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(11),s=i(238);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){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(58);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},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){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e,i){var n=i(33);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,i){var n=i(33);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(88);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(88);n.Area=i(859),n.Circumference=i(298),n.CircumferencePoint=i(138),n.Clone=i(858),n.Contains=i(33),n.ContainsPoint=i(857),n.ContainsRect=i(856),n.CopyFrom=i(855),n.Equals=i(854),n.GetBounds=i(853),n.GetPoint=i(301),n.GetPoints=i(299),n.Offset=i(852),n.OffsetPoint=i(851),n.Random=i(164),t.exports=n},function(t,e,i){var n=i(0),s=i(404),r=i(10),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(239);s.register("quad",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"key",null),h=r(t,"frame",null),u=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(3),a=i(148);s.register("mesh",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=o(t,"vertices",[]),u=o(t,"colors",[]),l=o(t,"alphas",[]),c=o(t,"uv",[]),d=new a(this.scene,0,0,h,c,u,l,i,s);return void 0!==e&&(t.add=e),n(this.scene,d,t),d})},function(t,e,i){var n=i(239);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(148);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=this.pipeline;t.setPipeline(o,e);var a=o._tempMatrix1,h=o._tempMatrix2,u=o._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,u)):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY,a.multiply(h,u));var l=e.frame.glTexture,c=e.vertices,d=e.uv,f=e.colors,p=e.alphas,g=c.length,v=Math.floor(.5*g);o.vertexCount+v>=o.vertexCapacity&&o.flush(),o.setTexture2D(l,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,w=0,b=e.tintFill,T=0;Ta.length&&(p=a.length);for(var g=u,v=l,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x?@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(895),s=i(17),r={Parse:i(894)};r=s(!1,r,n),t.exports=r},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(21);t.exports=function(t,e,i,s,r){var o=e.frame,a=o.width,h=o.height,u=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a,h,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,u(e._tintTL,s.alpha*e._alphaTL),u(e._tintTR,s.alpha*e._alphaTR),u(e._tintBL,s.alpha*e._alphaBL),u(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r),t.setBlankTexture(!0)}},function(t,e,i){var n=i(2),s=i(2);n=i(898),s=i(897),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(426),EdgeZone:i(425),RandomZone:i(423)}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.emitters.list,o=r.length;if(0!==o){var a=t._tempMatrix1.copyFrom(n.matrix),h=t._tempMatrix2,u=t._tempMatrix3,l=t._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);a.multiply(l);var c=n.roundPixels,d=t.currentContext;d.save();for(var f=0;f0&&e.cropHeight>0&&(h.save(),h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var R=0;R0&&e.cropHeight>0&&h.restore(),h.restore()}}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var u=e.cropWidth>0||e.cropHeight>0;u&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var l=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),l.copyFrom(s.matrix),r?(l.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,l.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,l.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,w=e._isTinted&&e.tintFill,b=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),S=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),A=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var C,_,M=0,E=0,P=0,L=0,k=e.letterSpacing,F=0,R=0,O=0,D=0,I=e.scrollX,B=e.scrollY,Y=e.fontData,X=Y.chars,z=Y.lineHeight,N=e.fontSize/Y.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;Jv&&(r=v),o>m&&(o=m);var L=v+g.xAdvance,k=m+l;aC&&(C=M),MC&&(C=M),M>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e){t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(i){t.style[i+"user-select"]=e}),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e,i){t.exports={Interpolation:i(264),Pool:i(24),Smoothing:i(133),TouchAction:i(933),UserSelect:i(932)}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e,i){t.exports={CenterOn:i(601),GetBottom:i(51),GetCenterX:i(92),GetCenterY:i(89),GetLeft:i(49),GetOffsetX:i(936),GetOffsetY:i(935),GetRight:i(47),GetTop:i(45),SetBottom:i(50),SetCenterX:i(91),SetCenterY:i(90),SetLeft:i(48),SetRight:i(46),SetTop:i(44)}},function(t,e,i){var n=i(47),s=i(45),r=i(50),o=i(46);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(45),r=i(50),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(92),s=i(45),r=i(50),o=i(91);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(45),r=i(48),o=i(44);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(89),s=i(47),r=i(90),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(51),s=i(47),r=i(50),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(45),r=i(46),o=i(44);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(89),s=i(49),r=i(90),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),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),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(47),r=i(46),o=i(44);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(51),s=i(49),r=i(48),o=i(44);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(51),s=i(92),r=i(91),o=i(44);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){t.exports={BottomCenter:i(949),BottomLeft:i(948),BottomRight:i(947),LeftBottom:i(946),LeftCenter:i(945),LeftTop:i(944),RightBottom:i(943),RightCenter:i(942),RightTop:i(941),TopCenter:i(940),TopLeft:i(939),TopRight:i(938)}},function(t,e,i){t.exports={BottomCenter:i(605),BottomLeft:i(604),BottomRight:i(603),Center:i(602),LeftCenter:i(600),QuickSet:i(606),RightCenter:i(599),TopCenter:i(598),TopLeft:i(597),TopRight:i(596)}},function(t,e,i){var n=i(302),s=i(17),r={In:i(951),To:i(950)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(952),Bounds:i(937),Canvas:i(934),Color:i(515),Masks:i(511)}},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t,e){this.active=!1,this.p0=new s(t,e)},getPoint:function(t,e){return void 0===e&&(e=new s),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},function(t,e,i){var n=i(0),s=i(524),r=i(522),o=i(9),a=i(521),h=i(954),u=i(520),l=i(11),c=i(518),d=i(4),f=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,u,l=this.getEndPoint();return t instanceof d?(a=t,h=e,u=i):(a=new d(i,n),h=new d(r,o),u=new d(t,e)),this.add(new s(l,a,h,u))},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 u(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 this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?(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<.1&&(e.zoom=.1))}},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){var n=i(0),s=i(3),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.speedX=0,this.speedY=0;var e=s(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=s(t,"speed.x",0),this.speedY=s(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<.1&&(e.zoom=.1)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed)}},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={FixedKeyControl:i(966),SmoothedKeyControl:i(965)}},function(t,e,i){t.exports={Controls:i(967),Scene2D:i(573),Sprite3D:i(964)}},function(t,e,i){var n=i(40);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a0&&(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,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),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=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),a=s?s+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);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){var n=i(16),s=i(3);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){t.exports={Alpha:i(600),Animation:i(306),BlendMode:i(599),ComputedSize:i(598),Crop:i(597),Depth:i(596),Flip:i(595),GetBounds:i(594),Mask:i(593),Origin:i(592),Pipeline:i(294),ScaleMode:i(591),ScrollFactor:i(590),Size:i(589),Texture:i(588),TextureCrop:i(587),Tint:i(586),ToJSON:i(585),Transform:i(584),TransformMatrix:i(27),Visible:i(583)}},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){var n=i(0),s=i(13),r=i(59),o=i(8),a=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,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(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=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.ToJSON(this)},willRender:function(t){return!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter>0&&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(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,t.exports=a},function(t,e,i){var n=i(300),s={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:new n};t.exports=s},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},u=2),l===u&&(h=this,--u);u=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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("fileprogress",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("filecomplete",e,i,t),this.loader.emit("filecomplete-"+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}});l.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)}},l.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=l},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>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;no.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n=new(i(0))({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)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+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],u=i[5],l=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=l*s+c*o,v.b=l*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+u,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],u=e*r+i*a+n[4],l=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+u,n[5]=g*o+v*h+l,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=t*a+e*u,o[1]=t*h+e*l,o[2]=i*a+n*u,o[3]=i*h+n*l,o[4]=s*a+r*u+c,o[5]=s*h+r*l+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],u=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+u,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*i,a=n*n,h=s*s,u=r*r,l=Math.sqrt(o+h),c=Math.sqrt(a+u);return t.translateX=e[4],t.translateY=e[5],t.scaleX=l,t.scaleY=c,t.rotation=Math.acos(i/l)*(Math.atan(-s/i)<0?-1:1),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},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=n},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(18),r=i(19),o=i(6),a=i(1),h=i(3),u=i(7),l=new n({Extends:r,initialize:function(t,e,i,n,o){var l="json";if(u(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),l=a(c,"extension",l),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:l,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),u(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;ss||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(159),r=i(288),o=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.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,n){return void 0===n&&(n=255),this.red=t,this.green=e,this.blue=i,this.alpha=n,this.update()},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this.update()},setFromRGB:function(t){return this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this.update()},update:function(){return this._color=s(this.r,this.g,this.b),this._color32=r(this.r,this.g,this.b,this.a),this._rgba="rgba("+this.r+","+this.g+","+this.b+","+this.a/255+")",this},clone:function(){return new o(this.r,this.g,this.b,this.a)},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()}},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()}},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()}},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()}},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()}},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()}},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()}}});t.exports=o},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){return t.radius>0&&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){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,i){var n=i(0),s=i(13),r=i(15),o=i(534),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")},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)}});t.exports=a},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=new(i(0))({initialize:function(t,e,i,n){this.loader=t,this.type=e,this.key=i,this.files=n,this.complete=!1,this.pending=n.length,this.failed=0,this.config={};for(var s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=0&&m>=0&&v+m<1}},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){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e,i){var n=i(126);t.exports=function(t,e){if("string"==typeof t&&n.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,n[t].apply(this,i)}}return n[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,n.Power0)}},function(t,e,i){var n=i(20);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(13),r=i(393),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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/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.height-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.tilemapLayer;return t?t.tileset: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,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var n=i(0),s=i(61),r=i(235),o=i(234),a=i(98),h=i(161),u=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},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,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=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}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=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(13),r=i(15),o=i(432),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=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 this.entries.length=t}}});t.exports=n},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,i){var n=i(102),s=i(12),r=i(63),o=i(64),a=i(73),h=i(171),u=i(104),l=i(3),c=i(103),d=i(101),f=i(100);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:u(e),g=h(e),v=a(e,"delay",i.delay),m=a(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=o(l(e,"ease",i.ease),y),w=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),T=a(e,"repeatDelay",i.repeatDelay),A=r(e,"yoyo",i.yoyo),S=r(e,"flipX",i.flipX),C=r(e,"flipY",i.flipY),_=[],M=0;M=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("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:o,onBlur:o,onFocus:o,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("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.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("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("detune",this,t)}}});t.exports=a},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,s=i(57),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){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var s=new Array(i),r=1;ru&&(r=u),o>u&&(o=u),a=s,h=r;;)if(a0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;if(void 0===i&&(i=!0),e)"string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e);else if(t.parentElement)return t;return n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},function(t,e,i){var n=i(0),s=i(267),r=i(11),o=i(4),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(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){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(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,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-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],u=s[4],l=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],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+m)*w,this.y=(e*o+i*l+n*p+y)*w,this.z=(e*a+i*c+n*g+x)*w,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}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(39),o=i(8),a=i(11),h=i(27),u=i(134),l=i(4),c=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.config,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new a,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 a,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new h,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new l(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1},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 l);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},centerOn:function(t,e){var i=.5*this.width,n=.5*this.height;return this.midPoint.set(t,e),this.scrollX=t-i,this.scrollY=e-n,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),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],u=this.scrollX,l=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;g-m&&T>-y&&b-m&&S>-y&&As&&(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 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},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=t,this.config=t.sys.game.config,this.sceneManager=t.sys.game.scene;var e=this.config.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,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},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.config){var t=!1;if(0!==this._x||0!==this._y)t=!0;else{var e=this.config.width,i=this.config.height;e===this._width&&i===this._height||(t=!0)}var n=this.sceneManager;t&&!this._customViewport?n.customViewports++:!t&&this._customViewport&&n.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.config=null,this.sceneManager=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=c},function(t,e,i){var n=i(0),s=i(33),r=i(301),o=i(299),a=i(165),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},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 a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},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){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e,i){var n=i(151),s=i(0),r=i(2),o=i(83),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){return t&&(this._sortKey=t,o.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},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.GetFirstElement(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(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,u=this.cutY,l=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=u+(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,w=e+n,b=i+r;if(!(x.rw||x.y>b)){var T=Math.max(x.x,e),A=Math.max(x.y,i),S=Math.min(x.r,w)-T,C=Math.min(x.b,b)-A;v=S,m=C,p=o?h+(l-(T-x.x)-S):h+(T-x.x),g=a?u+(c-(A-x.y)-C):u+(A-x.y),e=T,i=A,n=S,r=C}else p=0,g=0,v=0,m=0}else o&&(p=h+(l-e-n)),a&&(g=u+(c-i-r));var _=this.source.width,M=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/M),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+m)/M),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.texture=null,this.source=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(34);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){t.exports=function(t){for(var e=t.length-1;e>0;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(0),s=i(296),r=i(164),o=i(163),a=i(4),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=0),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 o(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 a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),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=h},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(0),s=i(14),r=i(9),o=i(62),a=new n({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var n=0;n0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},stop:function(t){this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state=o.PENDING_REMOVE)},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.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 o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function n(t){return!!t.getEnd&&"function"==typeof t.getEnd}var s=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)a=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===u?a=e:"object"===u&&(i(o=e)||n(o))?(n(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(3);t.exports=function(t){var e=n(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation","orthogonal"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[])}});t.exports=r},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",{}),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null)}});t.exports=r},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&eu){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var m=l[c].length?c:c+1,y=l.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h],h0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},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){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(612),s=i(0),r=i(1),o=i(3),a=i(7),h=i(250),u=i(70),l=i(35),c=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?a(e[0])&&(i=e,e=null):a(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;l--)if((u=d[l]).active===i){if(++c===e)break}else u=null;return u?("number"==typeof s&&(u.x=s),"number"==typeof r&&(u.y=r),u):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&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<-a&&(s=h+s%h-a)),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this},slice:function(t,e,i,n,s,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?s<-h?s=-h-a:s>=0&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<=-a&&(s=h+s%h-a)),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-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.game.config.width),void 0===i&&(i=r.game.config.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.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,f.TargetCamera,null,s,!1),o.gl&&n&&(n.source[0].glTexture=o.canvasToTexture(s.canvas,n.source[0].glTexture))),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new n,t.exports=f},function(t,e){t.exports=function(t,e,i,n,s){var r=n.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(n.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return s?(o.multiplyWithOffset(s,-n.scrollX*i.scrollFactorX,-n.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=n.scrollX*i.scrollFactorX,a.f-=n.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),!0}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i0},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("start",this),this.events.emit("ready",this,t)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(t){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("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?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(255),r=i(1),o=i(500),a=i(499),h=i(498),u=i(27),l=i(21),c=i(132),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._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this._tempMatrix4=new u,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=null,this.firstQuad=[0,0,0,0],this.prevQuad=[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 this.renderer.setTexture2D(t,e),this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize,s=this.renderer;if(0!==e)return s.setBlankTexture(),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},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,u=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.width,v=o.height,m=-t.displayOriginX+f,y=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,u=x.v0,c=x.u1,d=x.v1,g=x.width,v=x.height,f=x.x,p=x.y,m=-t.displayOriginX+f,y=-t.displayOriginY+p}t.flipX&&(m+=g,g*=-1),t.flipY&&(y+=v,v*=-1);var w=m+g,b=y+v;s.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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=r.getX(m,y),A=r.getY(m,y),S=r.getX(m,b),C=r.getY(m,b),_=r.getX(w,b),M=r.getY(w,b),E=r.getX(w,y),P=r.getY(w,y),L=l.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),k=l.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),F=l.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),R=l.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(T|=0,A|=0,S|=0,C|=0,_|=0,M|=0,E|=0,P|=0),this.setTexture2D(a,0);var O=t._isTinted&&t.tintFill;this.batchQuad(T,A,S,C,_,M,E,P,h,u,c,d,L,k,F,R,O)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v){var m=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),m=!0);var y=this.vertexViewF32,x=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount-1;return y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=v,x[++w]=d,y[++w]=i,y[++w]=n,y[++w]=h,y[++w]=c,y[++w]=v,x[++w]=p,y[++w]=s,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=v,x[++w]=g,y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=v,x[++w]=d,y[++w]=s,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=v,x[++w]=g,y[++w]=o,y[++w]=a,y[++w]=l,y[++w]=u,y[++w]=v,x[++w]=f,this.vertexCount+=6,m},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f){var p=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),p=!0);var g=this.vertexViewF32,v=this.vertexViewU32,m=this.vertexCount*this.vertexComponentCount-1;return g[++m]=t,g[++m]=e,g[++m]=o,g[++m]=a,g[++m]=f,v[++m]=l,g[++m]=i,g[++m]=n,g[++m]=o,g[++m]=u,g[++m]=f,v[++m]=c,g[++m]=s,g[++m]=r,g[++m]=h,g[++m]=u,g[++m]=f,v[++m]=d,this.vertexCount+=3,p},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,w,b,T,A,S,C,_,M,E,P){this.renderer.setPipeline(this,t);var L=this._tempMatrix1,k=this._tempMatrix2,F=this._tempMatrix3,R=m/i+_,O=y/n+M,D=(m+x)/i+_,I=(y+w)/n+M,B=o,Y=a,X=-g,z=-v;if(t.isCropped){var N=t._crop;B=N.width,Y=N.height,o=N.width,a=N.height;var U=m=N.x,G=y=N.y;c&&(U=x-N.x-N.width),d&&!e.isRenderTexture&&(G=w-N.y-N.height),R=U/i+_,O=G/n+M,D=(U+N.width)/i+_,I=(G+N.height)/n+M,X=-g+m,z=-v+y}d^=e.isRenderTexture?1:0,c&&(B*=-1,X+=o),d&&(Y*=-1,z+=a);var W=X+B,V=z+Y;k.applyITRS(s,r,l,h,u),L.copyFrom(E.matrix),P?(L.multiplyWithOffset(P,-E.scrollX*f,-E.scrollY*p),k.e=s,k.f=r,L.multiply(k,F)):(k.e-=E.scrollX*f,k.f-=E.scrollY*p,L.multiply(k,F));var H=F.getX(X,z),j=F.getY(X,z),q=F.getX(X,V),K=F.getY(X,V),J=F.getX(W,V),Z=F.getY(W,V),Q=F.getX(W,z),$=F.getY(W,z);E.roundPixels&&(H|=0,j|=0,q|=0,K|=0,J|=0,Z|=0,Q|=0,$|=0),this.setTexture2D(e,0),this.batchQuad(H,j,q,K,J,Z,Q,$,R,O,D,I,b,T,A,S,C)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=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(u,c),m=h.getY(u,c),y=h.getX(u,i),x=h.getY(u,i);this.setTexture2D(t.glTexture,0),n=l.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)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n,h=l.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.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=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,w=m.u1,b=m.v1;this.batchQuad(u,l,c,d,f,p,g,v,y,x,w,b,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.multiply(o,h);var u=h.getX(t,e),l=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(u,l,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 u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,u=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;fthis.vertexCapacity&&this.flush();var d=i-t,f=n-e,p=Math.sqrt(d*d+f*f),g=s*(n-e)/p,v=s*(t-i)/p,m=r*(n-e)/p,y=r*(t-i)/p,x=i-m,w=n-y,b=t-g,T=e-v,A=i+m,S=n+y,C=t+g,_=e+v,M=c.getX(x,w),E=c.getY(x,w),P=c.getX(b,T),L=c.getY(b,T),k=c.getX(A,S),F=c.getY(A,S),R=c.getX(C,_),O=c.getY(C,_),D=this.strokeTint,I=this.tintEffect,B=D.TL,Y=D.TR,X=D.BL,z=D.BR,N=this.currentFrame,U=N.u0,G=N.v0,W=N.u1,V=N.v1;if(this.batchQuad(R,O,P,L,M,E,k,F,U,G,W,V,B,Y,X,z,I),!(o<=1)){var H=this.prevQuad,j=this.firstQuad;a>0?this.batchQuad(R,O,P,L,H[0],H[1],H[2],H[3],U,G,W,V,B,Y,X,z,I):(j[0]=P,j[1]=L,j[2]=R,j[3]=O),h?this.batchQuad(j[0],j[1],j[2],j[3],M,E,k,F,U,G,W,V,B,Y,X,z,I):(H[0]=M,H[1]=E,H[2]=k,H[3]=F)}}});t.exports=d},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,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,s){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:s}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*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)):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},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){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;i=(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(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},function(t,e,i){var n=i(99),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=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(5);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=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&&t=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e,i){var n=i(0),s=i(13),r=i(15),o=i(873),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var n=i.cull(e),s=Math.min(n.length,10);if(0===s)return this;this.active=!0;var r,o=this.renderer,a=this.program,h=e.matrix,u={x:0,y:0},l=o.height;for(r=0;r<10;++r)o.setFloat1(a,"uLights["+r+"].radius",0);for(o.setFloat4(a,"uCamera",e.x,e.y,e.rotation,e.zoom),o.setFloat3(a,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(l.texture,0),n.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,w,b,T,A,S,C,_,M,E,P){if(this.active){var L;this.renderer.setPipeline(this),t.texture?L=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(L=t.tileset.image.dataSource[0]),L||(L=this.defaultNormalMap),this.setTexture2D(L.glTexture,1);var k=this._tempMatrix1,F=this._tempMatrix2,R=this._tempMatrix3,O=o,D=a,I=-g,B=-v;d^=e.isRenderTexture?1:0,c&&(O*=-1,I+=o),d&&(D*=-1,B+=a),E.roundPixels&&(I|=0,B|=0);var Y=I+O,X=B+D;F.applyITRS(s,r,l,h,u),k.copyFrom(E.matrix),P?(k.multiplyWithOffset(P,-E.scrollX*f,-E.scrollY*p),F.e=s,F.f=r,k.multiply(F,R)):(F.e-=E.scrollX*f,F.f-=E.scrollY*p,k.multiply(F,R));var z=I*R.a+B*R.c+R.e,N=I*R.b+B*R.d+R.f,U=I*R.a+X*R.c+R.e,G=I*R.b+X*R.d+R.f,W=Y*R.a+X*R.c+R.e,V=Y*R.b+X*R.d+R.f,H=Y*R.a+B*R.c+R.e,j=Y*R.b+B*R.d+R.f;E.roundPixels&&(z|=0,N|=0,U|=0,G|=0,W|=0,V|=0,H|=0,j|=0);var q=m/i+_,K=y/n+M,J=(m+x)/i+_,Z=(y+w)/n+M;this.setTexture2D(e,0),this.batchVertices(z,N,U,G,W,V,H,j,q,K,J,Z,b,T,A,S,C)}},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},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),r.prototype.batchSprite.call(this,t,e,i))}}});o.LIGHT_COUNT=10,t.exports=o},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(16);t.exports=function(t){return t*n.RAD_TO_DEG}},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,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-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=i(0),s=i(15),r=i(35),o=i(4),a=i(156),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},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}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},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=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=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,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var n=i(71),s=i(5);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,u=t.y2,l=0;l1?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(52),s=i(89),r=i(33),o=i(0),a=i(13),h=i(15),u=i(11),l=i(32),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.ScaleMode,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){return void 0===i&&(i=!0),this.width=t,this.height=e,i&&this.input&&this.input.hitArea instanceof u&&(this.input.hitArea.width=t,this.input.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){var i=-t/2,n=-e/2;return this.setDropZone(new u(i,n,t,e),l)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(8),r=i(72),o=i(62),a=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},add:function(t){return this.queue(r(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),s=e;switch(i){case"+":s+=n;break;case"-":s-=n}return Math.max(0,s)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n0?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=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;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 o.ACTIVE:for(var n=this.totalData,s=0;s0?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){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=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot: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(0),s=i(19),r=i(1),o=i(110),a=i(7),h=new n({Extends:s,initialize:function(t,e,i,n){if(a(e)){var o=e;e=r(o,"key"),n=r(o,"config",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,h),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t=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=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",e,this,t),this.pad.emit("down",i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit("up",e,this,t),this.pad.emit("up",i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,w+=3;break;case n.FILL_STYLE:g=u[w+1],f=u[w+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",w+=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(u[w+1],u[w+2],u[w+3],u[w+4]):c.fillRect(u[w+1],u[w+2],u[w+3],u[w+4]),w+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.fill(),w+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.stroke(),w+=6;break;case n.LINE_TO:c.lineTo(u[w+1],u[w+2]),w+=2;break;case n.MOVE_TO:c.moveTo(u[w+1],u[w+2]),w+=2;break;case n.LINE_FX_TO:c.lineTo(u[w+1],u[w+2]),w+=5;break;case n.MOVE_FX_TO:c.moveTo(u[w+1],u[w+2]),w+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(u[w+1],u[w+2]),w+=2;break;case n.SCALE:c.scale(u[w+1],u[w+2]),w+=2;break;case n.ROTATE:c.rotate(u[w+1]),w+=1;break;case n.GRADIENT_FILL_STYLE:w+=5;break;case n.GRADIENT_LINE_STYLE:w+=6;break;case n.SET_TEXTURE:w+=2}c.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},function(t,e,i){var n=i(185),s=i(115),r=i(65),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;hr;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,m=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)m--}0===a(t[r],g)?n(t,r,m):n(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),s=0;s-1;r--)n[s][r]=t[r][s]}return n}},function(t,e,i){t.exports={AtlasXML:i(486),Canvas:i(485),Image:i(484),JSONArray:i(483),JSONHash:i(482),SpriteSheet:i(481),SpriteSheetFromAtlas:i(480),UnityYAML:i(479)}},function(t,e,i){var n=i(22),s=i(0),r=i(84),o=i(60),a=new s({initialize:function(t,e,i,n){var s=t.manager.game;this.renderer=s.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=n||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isRenderTexture="RenderTexture"===e.type,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&this.renderer.canvasToTexture(this.image,this.glTexture)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){var n=i(22),s=i(487),r=i(0),o=i(31),a=i(23),h=i(8),u=i(269),l=i(3),c=i(190),d=i(121),f=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once("boot",this.boot,this)},boot:function(){this._pending=2,this.on("onload",this.updatePending,this),this.on("onerror",this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once("destroy",this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off("onload"),this.off("onerror"),this.game.events.emit("texturesready"))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit("removetexture",t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit("onerror",t)},n.onload=function(){var e=i.create(t,n);c.Image(e,0),i.emit("addtexture",t,e),i.emit("onload",t,e)},n.src=e}return this},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var r="",o=this.getFrame(t,e);if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,s),n.remove(h)}return r},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),c.Image(n,0),i&&n.setDataSource(i),this.emit("addtexture",t,n)),n},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit("addtexture",t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,u(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var s=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,s)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new s(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new s(this,t,e,e.width,e.height),this.list[t]=n,this.emit("addtexture",t,n)),n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var s=null;if(this.checkKey(t)){if(s=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var s=this.getFrame(i,n);if(s){var r=s.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],n=1;n0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("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("ended",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.emit("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.emit("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,"rate",t)||(this.calculateRate(),this.emit("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,"detune",t)||(this.calculateRate(),this.emit("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("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("loop",this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=s},function(t,e,i){var n=i(79),s=i(0),r=i(197),o=new s({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var n=0;n-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("transitioninit",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("complete",this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;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)}},resize:function(t,e){for(var i=0;i=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=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,i){var n=i(0),s=i(8),r=i(6),o=i(14),a=i(9),h=i(1),u=i(10),l=i(203),c=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once("boot",this.boot,this)},boot:function(){var t,e,i,n,s,r,o,a=this.game.config,u=a.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t10&&(t=10-this.pointersTotal);for(var i=0;i0},queueTouchStart:function(t){if(this.queue.push(s.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueTouchMove:function(t){if(this.queue.push(s.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueTouchEnd:function(t){if(this.queue.push(s.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},queueMouseDown:function(t){if(this.queue.push(s.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueMouseMove:function(t){if(this.queue.push(s.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueMouseUp:function(t){if(this.queue.push(s.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t){var e=t.input;if(!e||!e.enabled||!t.willRender())return!1;var i=!0,n=t.parentContainer;if(n)do{if(!n.visible){i=!1;break}n=n.parentContainer}while(n);return i},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var s=this._tempPoint,r=i._cx,o=i._cy,a=i._cw,h=i._ch,u=i.scrollX,l=i.scrollY;n.length=0;var d=t.x,f=t.y;if(!(d>=r&&f>=o&&d<=r+a&&f<=o+h))return n;i.getWorldPoint(d,f,s),t.worldX=s.x,t.worldY=s.y;for(var p={x:0,y:0},g=this._tempMatrix,v=0;vf.right&&(p=l(p,p+(v-f.right),this.lerp.x)),mf.bottom&&(g=l(g,g+(m-f.bottom),this.lerp.y))):(p=l(p,v-u,this.lerp.x),g=l(g,m-c,this.lerp.y))}this.useBounds&&(p=this.clampX(p),g=this.clampY(g)),this.roundPixels&&(u=Math.round(u),c=Math.round(c)),this.scrollX=p,this.scrollY=g;var y=p+s,x=g+o;this.midPoint.set(y,x);var w=i/a,b=n/a;this.worldView.setTo(y-w/2,x-b/2,w,b),h.loadIdentity(),h.scale(e,e),h.translate(this.x+u,this.y+c),h.rotate(this.rotation),h.scale(a,a),h.translate(-u,-c),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,u=t.x-s,l=t.y-r;return this.midPoint.set(u,l),this.scrollX=u-a,this.scrollY=l-h,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(){n.prototype.destroy.call(this),this.resetFX(),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(214),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","html","obj","tilemap","xml"],e=0;ee.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=i(20),s=i(0),r=i(217),o=i(216),a=i(3),h=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,a(i,"frames",[]),a(i,"defaultTextureKey",null)),this.frameRate=a(i,"frameRate",null),this.duration=a(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=a(i,"skipMissedFrames",!0),this.delay=a(i,"delay",0),this.repeat=a(i,"repeat",0),this.repeatDelay=a(i,"repeatDelay",0),this.yoyo=a(i,"yoyo",!1),this.showOnStart=a(i,"showOnStart",!1),this.hideOnComplete=a(i,"hideOnComplete",!1),this.paused=!1,this.manager.on("pauseall",this.pause,this),this.manager.on("resumeall",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=u[0],u[0].prevFrame=s;var v=1/(u.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._timeScale=1,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),r(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?(t.forward=!1,this._updateAndGetNextTick(t,e.prevFrame)):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this._updateAndGetNextTick(t,e.nextFrame)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?(t.forward=!0,this._updateAndGetNextTick(t,e.nextFrame)):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this._updateAndGetNextTick(t,t.currentFrame)):(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);t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,t.parent.emit("animationrepeat",this,t.currentFrame,t.repeatCounter)))},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=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off("pauseall",this.pause,this),this.manager.off("resumeall",this.resume,this),this.manager.remove(this.key);for(var t=0;t=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,u,l,d,f,p,g,v,m,y;for(u=l=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(l,t.leaf?o(r):r),c+=d(l);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,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;tu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,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,i){var n=i(5),s=i(71);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},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){for(var n=!1,s=-1,r=t.points.length-1;++s=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(0),s=i(148),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,t=this.frame,this.uv[0]=t.u0,this.uv[1]=t.v0,this.uv[2]=t.u0,this.uv[3]=t.v1,this.uv[4]=t.u1,this.uv[5]=t.v1,this.uv[6]=t.u0,this.uv[7]=t.v0,this.uv[8]=t.u1,this.uv[9]=t.v1,this.uv[10]=t.u1,this.uv[11]=t.v0,this},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e,i){var n=i(22),s=i(0),r=i(13),o=i(23),a=i(15),h=i(414),u=i(898),l=i(4),c=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.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,u,c){var d=t.sys.game.renderer;a.call(this,t,"TileSprite"),this._tilePosition=new l,this._tileScale=new l(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=null,this.displayFrame=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.setTexture(u,c),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.displayFrame.width),this.potHeight=h(this.displayFrame.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.dirty=!0,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(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,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.displayFrame=this.displayTexture.get(t),this.displayFrame.cutWidth&&this.displayFrame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.displayFrame.customPivot?this.setOrigin(this.displayFrame.pivotX,this.displayFrame.pivotY):this.updateDisplayOrigin()),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&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){if(this.dirty){var t=this.displayFrame,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.resize(this.width,this.height)),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context,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=c},function(t,e,i){var n=i(88),s=i(22),r=i(0),o=i(13),a=i(23),h=i(95),u=i(15),l=i(904),c=i(421),d=new r({Extends:u,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,l],initialize:function(t,e,i,r,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=32),void 0===o&&(o=32),u.call(this,t,"RenderTexture"),this.renderer=t.sys.game.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=s.create2D(this,r,o),this.context=this.canvas.getContext("2d"),this.framebuffer=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(c(),this.canvas),this.frame=this.texture.get(),this.camera=new n(0,0,r,o),this.dirty=!1,this.gl=null;var h=this.renderer;if(h.type===a.WEBGL){var l=h.gl;this.gl=l,this.drawGameObject=this.batchGameObjectWebGL,this.framebuffer=h.createFramebuffer(r,o,this.frame.source.glTexture,!1)}else h.type===a.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas);this.camera.setScene(t),this.setPosition(e,i),this.setSize(r,o),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline")},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){if(void 0===e&&(e=t),t!==this.width||e!==this.height){if(this.canvas)this.canvas.width=t,this.canvas.height=e;else{var i=this.gl;this.renderer.deleteTexture(this.frame.source.glTexture),this.renderer.deleteFramebuffer(this.framebuffer),this.frame.source.glTexture=this.renderer.createTexture2D(0,i.NEAREST,i.NEAREST,i.CLAMP_TO_EDGE,i.CLAMP_TO_EDGE,i.RGBA,null,t,e,!1),this.framebuffer=this.renderer.createFramebuffer(t,e,this.texture,!1),this.frame.glTexture=this.frame.source.glTexture}this.camera.setSize(t,e),this.frame.setSize(t,e),this.width=t,this.height=e}return 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.texture},fill:function(t,e){void 0===e&&(e=1);var i=255&(t>>16|0),n=255&(t>>8|0),s=255&(0|t);if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var r=this.gl;r.clearColor(i/255,n/255,s/255,e),r.clear(r.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else this.context.fillStyle="rgb("+i+","+n+","+s+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height);return this},clear:function(){if(this.dirty){if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,this.canvas.width,this.canvas.height),e.restore()}this.dirty=!1}return 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,1),r){this.renderer.setFramebuffer(this.framebuffer);var o=this.pipeline;o.projOrtho(0,this.width,0,this.height,-1e3,1e3),this.batchList(t,e,i,n,s),o.flush(),this.renderer.setFramebuffer(null),o.projOrtho(0,o.width,o.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,1),o){this.renderer.setFramebuffer(this.framebuffer);var h=this.pipeline;h.projOrtho(0,this.width,0,this.height,-1e3,1e3),h.batchTextureFrame(a,i,n,r,s,this.camera.matrix,null),h.flush(),this.renderer.setFramebuffer(null),h.projOrtho(0,h.width,h.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i,n,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;r0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;s0)for(var e=this.list,i=new a,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=c},function(t,e,i){var n=i(922),s=i(919),r=i(0),o=i(13),a=i(95),h=i(15),u=i(94),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},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=l},function(t,e,i){var n=i(3),s=i(97),r=function(t,e,i){for(var n=[],s=0;s0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(4);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var u=Math.sin(-r),l=Math.cos(-r),c=l*o,d=-u*o,f=u*a,p=l*a,g=c*p-d*f,v=p/g,m=-d/g,y=-f/g,x=c/g,w=(f*s-p*i)/g,b=-(c*s-d*i)/g;return h.x=t*v+e*y+w,h.y=t*m+e*x+b,h}},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){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,m=v?e[0]*i:t.length,y=s(t,0,m,i,!0),x=[];if(!y)return x;if(v&&(y=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(A(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(A(n),(n=e=n.prev)===n.next)return null;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,u=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,u*=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),A(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(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,l=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(u,l,e,i,n),p=t.nextZ;p&&p.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;p=p.nextZ}for(p=t.prevZ;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}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&w(s,r)&&w(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),A(n),A(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&v(h,u)){var l=b(h,u);return h=r(h,h.next),l=r(l,l.next),o(h,e,i,n,s,a),void o(l,e,i,n,s,a)}u=u.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>=l&&s!==n.x&&g(ri.x)&&w(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(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)&&w(t,e)&&w(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 w(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 b(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 T(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 A(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 C(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,i){var n=i(0),s=i(503),r=i(502),o=i(132),a=new n({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:s,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var n=t.bitmapMask,s=this.renderer,r=this.gl,o=n.visible;n&&r&&(s.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.visible=!0,n.renderWebGL(s,n,0,i),n.visible=o,s.flush(),s.setFramebuffer(t.mainFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT))},endMask:function(t){var e=t.bitmapMask,i=this.renderer,n=this.gl;e&&(i.setFramebuffer(null),i.setPipeline(this),i.setTexture2D(t.maskTexture,1),i.setTexture2D(t.mainTexture,0),i.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),n.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var n=t.getContext("experimental-webgl"),s=new Uint8Array(n.drawingBufferWidth*n.drawingBufferHeight*4);n.readPixels(0,0,n.drawingBufferWidth,n.drawingBufferHeight,n.RGBA,n.UNSIGNED_BYTE,s);var r,o=document.createElement("canvas"),a=o.getContext("2d");o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;for(var h=(r=a.getImageData(0,0,o.width,o.height)).data,u=0;u2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.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>16&&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){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl,i=this.width,n=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture&&(i=t.renderTexture.width,n=t.renderTexture.height),e.bindFramebuffer(e.FRAMEBUFFER,t),e.viewport(0,0,i,n),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,a=s.NEAREST,h=s.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,o(e,i)&&(h=s.REPEAT),n===r.ScaleModes.LINEAR&&this.config.antialias&&(a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,s.RGBA,t):this.createTexture2D(0,a,a,h,h,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},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&&a(this.nativeTextures,e),this.gl.deleteTexture(t),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,s=t._ch;this.pushScissor(e,i,n,s);var r=this.pipelines.TextureTintPipeline,o=t.backgroundColor;if(t.renderToTexture){this.setFramebuffer(t.framebuffer);var a=this.gl;a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),r.projOrtho(0,t.width,0,t.height,-1e3,1e3),o.alphaGL>0&&r.drawFillRect(e,i,n,s,u.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL)}else o.alphaGL>0&&r.drawFillRect(e,i,n,s,u.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL)},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,u.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,u.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=u.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)}},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&(t.enable(t.SCISSOR_TEST),t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height)),this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,o=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;u=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===y&&(v>=0?v=-(v+f):v<0&&(v=Math.abs(v)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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.scale(m,y),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.drawImage(e.source.image,l,c,d,f,g,v,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=l},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;var t=this;this.step=function e(i){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.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,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){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(57);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&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","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=function(t,e,i,n,s){var r=.5*(n-e),o=.5*(s-i),a=t*t;return(2*i-2*n+r+o)*(t*a)+(-3*i+3*n-2*r-o)*a+r*t+i}},function(t,e,i){var n=i(11);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,r,o=Number.MAX_VALUE,a=Number.MAX_VALUE,h=Number.MIN_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER,l=0;l16777215?{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),s=i(286);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},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){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,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){void 0===e&&(e=1);for(var i=null,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;i--){var n=Math.floor(this.frac()*(e+1)),s=t[n];t[n]=t[i],t[i]=s}return t}});t.exports=n},function(t,e,i){var n=i(138),s=i(65),r=i(16),o=i(5);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){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},,,function(t,e,i){var n=i(512),s=i(0),r=i(59),o=i(8),a=i(511),h=i(509),u=i(508),l=new s({Extends:o,initialize:function(t){o.call(this),this.game=t,this.data=new r(this),this.on("setdata",this.setDataHandler,this),this.on("changedata",this.changeDataHandler,this),this.hasLoaded=!1,this.dataLocked=!1,this.supportedAPIs=[],this.entryPoint="",this.entryPointData=null,this.contextID=null,this.contextType=null,this.locale=null,this.platform=null,this.version=null,this.playerID=null,this.playerName=null,this.playerPhotoURL=null,this.playerCanSubscribeBot=!1,this.paymentsReady=!1,this.catalog=[],this.purchases=[],this.leaderboards={},this.ads=[]},setDataHandler:function(t,e,i){if(!this.dataLocked){console.log("set data:",e,i);var n={};n[e]=i;var s=this;FBInstant.player.setDataAsync(n).then(function(){console.log("sdh saved",n),s.emit("savedata",n)})}},changeDataHandler:function(t,e,i){if(!this.dataLocked){console.log("change data:",e,i);var n={};n[e]=i;var s=this;FBInstant.player.setDataAsync(n).then(function(){console.log("cdh saved",n),s.emit("savedata",n)})}},showLoadProgress:function(t){return t.load.on("progress",function(t){this.hasLoaded||(console.log(t),FBInstant.setLoadingProgress(100*t))},this),t.load.on("complete",function(){this.hasLoaded=!0,console.log("loaded"),FBInstant.startGameAsync().then(this.gameStarted.bind(this))},this),this},gameStarted:function(){console.log("FBP gameStarted");var t={},e=function(t){return t[1].toUpperCase()};FBInstant.getSupportedAPIs().forEach(function(i){i=i.replace(/\../g,e),t[i]=!0}),this.supportedAPIs=t,console.log(this.supportedAPIs),this.getID(),this.getType(),this.getLocale(),this.getPlatform(),this.getSDKVersion(),this.getPlayerID(),this.getPlayerName(),this.getPlayerPhotoURL();var i=this;FBInstant.onPause(function(){i.emit("pause")}),FBInstant.getEntryPointAsync().then(function(t){i.entryPoint=t,i.entryPointData=FBInstant.getEntryPointData(),i.emit("startgame")}).catch(function(t){console.warn(t)}),this.supportedAPIs.paymentsPurchaseAsync&&FBInstant.payments.onReady(function(){console.log("payments ready"),i.paymentsReady=!0}).catch(function(t){console.warn(t)})},checkAPI:function(t){return!!this.supportedAPIs[t]||(console.warn(t+" not supported"),!1)},getID:function(){return!this.contextID&&this.supportedAPIs.contextGetID&&(this.contextID=FBInstant.context.getID()),this.contextID},getType:function(){return!this.contextType&&this.supportedAPIs.contextGetType&&(this.contextType=FBInstant.context.getType()),this.contextType},getLocale:function(){return!this.locale&&this.supportedAPIs.getLocale&&(this.locale=FBInstant.getLocale()),this.locale},getPlatform:function(){return!this.platform&&this.supportedAPIs.getPlatform&&(this.platform=FBInstant.getPlatform()),this.platform},getSDKVersion:function(){return!this.version&&this.supportedAPIs.getSDKVersion&&(this.version=FBInstant.getSDKVersion()),this.version},getPlayerID:function(){return!this.playerID&&this.supportedAPIs.playerGetID&&(this.playerID=FBInstant.player.getID()),this.playerID},getPlayerName:function(){return!this.playerName&&this.supportedAPIs.playerGetName&&(this.playerName=FBInstant.player.getName()),this.playerName},getPlayerPhotoURL:function(){return!this.playerPhotoURL&&this.supportedAPIs.playerGetPhoto&&(this.playerPhotoURL=FBInstant.player.getPhoto()),this.playerPhotoURL},loadPlayerPhoto:function(t,e){return this.playerPhotoURL&&(console.log("load"),t.load.setCORS("anonymous"),t.load.image(e,this.playerPhotoURL),t.load.on("complete",function(){this.emit("photocomplete",e)},this),t.load.start()),this},canSubscribeBot:function(){if(this.supportedAPIs.playerCanSubscribeBotAsync){var t=this;FBInstant.player.canSubscribeBotAsync().then(function(){t.playerCanSubscribeBot=!0,t.emit("cansubscribebot")})}return this},subscribeBot:function(){if(this.playerCanSubscribeBot){var t=this;FBInstant.player.subscribeBotAsync().then(function(){t.emit("subscribebot")}).catch(function(){t.emit("subscribebotfailed")})}return this},getData:function(t){if(!this.checkAPI("playerGetDataAsync"))return this;Array.isArray(t)||(t=[t]),console.log("getdata",t);var e=this;return FBInstant.player.getDataAsync(t).then(function(t){for(var i in console.log("getdata req",t),e.dataLocked=!0,t)e.data.set(i,t[i]);e.dataLocked=!1,e.emit("getdata",t)}),this},saveData:function(t){if(!this.checkAPI("playerSetDataAsync"))return this;var e=this;return FBInstant.player.setDataAsync(t).then(function(){console.log("data saved to fb"),e.emit("savedata",t)}),this},flushData:function(){if(!this.checkAPI("playerFlushDataAsync"))return this;var t=this;return FBInstant.player.flushDataAsync().then(function(){console.log("data flushed"),t.emit("flushdata")}),this},getStats:function(t){if(!this.checkAPI("playerGetStatsAsync"))return this;var e=this;return FBInstant.player.getStatsAsync(t).then(function(t){console.log("stats got from fb"),e.emit("getstats",t)}),this},saveStats:function(t){if(!this.checkAPI("playerSetStatsAsync"))return this;var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var n=this;return FBInstant.player.setStatsAsync(e).then(function(){console.log("stats saved to fb"),n.emit("savestats",e)}),this},incStats:function(t){if(!this.checkAPI("playerIncrementStatsAsync"))return this;var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var n=this;return FBInstant.player.incrementStatsAsync(e).then(function(t){console.log("stats modified"),n.emit("incstats",t)}),this},saveSession:function(t){return this.checkAPI("setSessionData")?(JSON.stringify(t).length<=1e3?FBInstant.setSessionData(t):console.warn("Session data too long. Max 1000 chars."),this):this},openShare:function(t,e,i,n){return this._share("SHARE",t,e,i,n)},openInvite:function(t,e,i,n){return this._share("INVITE",t,e,i,n)},openRequest:function(t,e,i,n){return this._share("REQUEST",t,e,i,n)},openChallenge:function(t,e,i,n){return this._share("CHALLENGE",t,e,i,n)},_share:function(t,e,i,n,s){if(!this.checkAPI("shareAsync"))return this;if(void 0===s&&(s={}),i)var r=this.game.textures.getBase64(i,n);var o={intent:t,image:r,text:e,data:s},a=this;return FBInstant.shareAsync(o).then(function(){a.emit("resume")}),this},isSizeBetween:function(t,e){return this.checkAPI("contextIsSizeBetween")?FBInstant.context.isSizeBetween(t,e):this},switchContext:function(t){if(!this.checkAPI("contextSwitchAsync"))return this;if(t!==this.contextID){var e=this;FBInstant.context.switchAsync(t).then(function(){e.contextID=FBInstant.context.getID(),e.emit("switch",e.contextID)})}return this},chooseContext:function(t){if(!this.checkAPI("contextChoseAsync"))return this;var e=this;return FBInstant.context.chooseAsync(t).then(function(){e.contextID=FBInstant.context.getID(),e.emit("choose",e.contextID)}),this},createContext:function(t){if(!this.checkAPI("contextCreateAsync"))return this;var e=this;return FBInstant.context.createAsync(t).then(function(){e.contextID=FBInstant.context.getID(),e.emit("create",e.contextID)}),this},getPlayers:function(){if(!this.checkAPI("playerGetConnectedPlayersAsync"))return this;var t=this;return FBInstant.player.getConnectedPlayersAsync().then(function(e){console.log("got player data"),console.log(e),t.emit("players",e)}),this},getCatalog:function(){if(!this.paymentsReady)return this;var t=this,e=this.catalog;return FBInstant.payments.getCatalogAsync().then(function(i){console.log("got catalog"),e=[],i.forEach(function(t){e.push(h(t))}),t.emit("getcatalog",e)}),this},purchase:function(t,e){if(!this.paymentsReady)return this;var i={productID:t};e&&(i.developerPayload=e);var n=this;return FBInstant.payments.purchaseAsync(i).then(function(t){var e=u(t);console.log("product purchase",e),n.emit("purchase",e)}),this},getPurchases:function(){if(!this.paymentsReady)return this;var t=this,e=this.purchases;return FBInstant.payments.getPurchasesAsync().then(function(i){console.log("got purchases"),e=[],i.forEach(function(t){e.push(u(t))}),t.emit("getpurchases",e)}),this},consumePurchases:function(t){if(!this.paymentsReady)return this;var e=this;return FBInstant.payments.consumePurchaseAsync(t).then(function(){console.log("purchase consumed"),e.emit("consumepurchase",t)}),this},update:function(t,e,i,n,s,r){return this._update("CUSTOM",t,e,i,n,s,r)},updateLeaderboard:function(t,e,i,n,s,r){return this._update("LEADERBOARD",t,e,i,n,s,r)},_update:function(t,e,i,n,s,r,o){if(!this.checkAPI("shareAsync"))return this;if(void 0===e&&(e=""),"string"==typeof i&&(i={default:i}),void 0===o&&(o={}),n)var a=this.game.textures.getBase64(n,s);var h={action:t,cta:e,image:a,text:i,template:r,data:o,strategy:"IMMEDIATE",notification:"NO_PUSH"},u=this;return FBInstant.updateAsync(h).then(function(){u.emit("update")}),this},switchGame:function(t,e){if(!this.checkAPI("switchGameAsync"))return this;if(e&&JSON.stringify(e).length>1e3)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)}),this},createShortcut:function(){var t=this;FBInstant.canCreateShortcutAsync().then(function(e){e&&FBInstant.createShortcutAsync().then(function(){t.emit("shortcutcreated")}).catch(function(){t.emit("shortcutfailed")})})},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=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.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("animationupdate",i,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(169),r=i(10),o=i(168),a=i(62),h=i(72),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.timeScale=1},createTimeline:function(t){return o(this,t)},timeline:function(t){var e=o(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return h(this,t)},add:function(t){var e=h(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=s(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active;for(t=0;t-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;ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","object layer"),this.opacity=s(t,"opacity",1),this.properties=s(t,"properties",{}),this.propertyTypes=s(t,"propertytypes",{}),this.type=s(t,"type","objectgroup"),this.visible=s(t,"visible",!0),this.objects=s(t,"objects",[])}});t.exports=r},function(t,e,i){var n=i(645),s=i(320),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=s(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?(a.ellipse=t.ellipse,a.width=t.width,a.height=t.height):t.text?(a.width=t.width,a.height=t.height,a.text=t.text):(a.rectangle=!0,a.width=t.width,a.height=t.height);return a}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t-1}return!1}},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),u=0;u=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off("update",this.step,this),t.events.emit("transitioncomplete",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){return this.manager.add(t,e,i),this},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){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),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)},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("shutdown",this.shutdown,this),t.off("postupdate",this.step,this),t.off("transitionout")},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),t.exports=a},function(t,e,i){var n=i(80),s=i(17),r={SceneManager:i(202),ScenePlugin:i(331),Settings:i(200),Systems:i(122)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(173),s=new(i(0))({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this)},boot:function(){}});t.exports=s},function(t,e,i){t.exports={BasePlugin:i(173),DefaultPlugins:i(124),PluginCache:i(10),PluginManager:i(204),ScenePlugin:i(333)}},,,,function(t,e,i){var n=i(33),s=i(0),r=i(43),o=i(32),a=i(4),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,n){void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y);var s=this.gameObject;return!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.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),this.offset.set(i,n),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.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)},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;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),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=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(43);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(43);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=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(33),s=i(0),r=i(43),o=i(155),a=i(11),h=i(32),u=i(27),l=i(4),c=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.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x,e.y),this.prev=new l(e.x,e.y),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new l(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=r.FACING_NONE,this.immovable=!1,this.moves=!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.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.physicsType=r.DYNAMIC_BODY,this._reset=!0,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._bounds=new a,this._tempMatrix=new u},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this._tempMatrix);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY;var n=!1;if(this.syncBounds){var s=t.getBounds(this._bounds);this.width=s.width,this.height=s.height,n=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},update:function(t){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,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.none=!0,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1,this.updateBounds();var e=this.transform;if(this.position.x=e.x+e.scaleX*(this.offset.x-e.displayOriginX),this.position.y=e.y+e.scaleY*(this.offset.y-e.displayOriginY),this.updateCenter(),this.rotation=e.rotation,this.preRotation=this.rotation,this._reset&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves){this.world.updateMotion(this,t);var i=this.velocity.x,n=this.velocity.y;this.newVelocity.set(i*t,n*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(n,i),this.speed=Math.sqrt(i*i+n*n),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit("worldbounds",this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.deltaX(),this._dy=this.deltaY()},postUpdate:function(){this._dx=this.deltaX(),this._dy=this.deltaY(),this.moves&&(0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this._dx<0?this.facing=r.FACING_LEFT:this._dx>0&&(this.facing=r.FACING_RIGHT),this._dy<0?this.facing=r.FACING_UP:this._dy>0&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),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(this.position),this.prev.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?n(this,t,e):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.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},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(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,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){return void 0===t&&(t=!0),this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),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},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},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=c},function(t,e,i){var n=i(343),s=i(20),r=i(0),o=i(342),a=i(43),h=i(58),u=i(8),l=i(356),c=i(355),d=i(354),f=i(341),p=i(340),g=i(3),v=i(231),m=i(701),y=i(11),x=i(230),w=i(700),b=i(695),T=i(694),A=i(70),S=i(338),C=i(339),_=i(4),M=i(40),E=new r({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.bodies=new A,this.staticBodies=new A,this.pendingDestroy=new A,this.colliders=new v,this.gravity=new _(g(e,"gravity.x",0),g(e,"gravity.y",0)),this.bounds=new y(g(e,"x",0),g(e,"y",0),g(e,"width",t.sys.game.config.width),g(e,"height",t.sys.game.config.height)),this.checkCollision={up:g(e,"checkCollision.up",!0),down:g(e,"checkCollision.down",!0),left:g(e,"checkCollision.left",!0),right:g(e,"checkCollision.right",!0)},this.fps=g(e,"fps",60),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(e,"timeScale",1),this.OVERLAP_BIAS=g(e,"overlapBias",4),this.TILE_BIAS=g(e,"tileBias",16),this.forceX=g(e,"forceX",!1),this.isPaused=g(e,"isPaused",!1),this._total=0,this.drawDebug=g(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(e,"debugShowBody",!0),debugShowStaticBody:g(e,"debugShowStaticBody",!0),debugShowVelocity:g(e,"debugShowVelocity",!0),bodyDebugColor:g(e,"debugBodyColor",16711935),staticBodyDebugColor:g(e,"debugStaticBodyColor",255),velocityDebugColor:g(e,"debugVelocityColor",65280)},this.maxEntries=g(e,"maxEntries",16),this.useTree=g(e,"useTree",!0),this.tree=new x(this.maxEntries),this.staticTree=new x(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=a.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=s;)this._elapsed-=s,i++,this.step(n);this.stepsLastFrame=i}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;ta.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(l.x,l.y,u.right,u.y)-l.radius):l.y>u.bottom&&(l.xu.right&&(a=h(l.x,l.y,u.right,u.bottom)-l.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,g=t.mass,v=e.velocity.x,m=e.velocity.y,y=e.mass,x=c*Math.cos(o)+d*Math.sin(o),w=c*Math.sin(o)-d*Math.cos(o),b=v*Math.cos(o)+m*Math.sin(o),T=v*Math.sin(o)-m*Math.cos(o),A=((g-y)*x+2*y*b)/(g+y),S=(2*g*x+(y-g)*b)/(g+y);t.immovable||(t.velocity.x=(A*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+A*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(S*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+S*Math.sin(o))*e.bounce.y,v=e.velocity.x,m=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>c?t.velocity.x*=-1:v<0&&!e.immovable&&c0&&!t.immovable&&m>d?t.velocity.y*=-1:m<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&v0&&!e.immovable&&c>v?e.velocity.x*=-1:d<0&&!t.immovable&&m0&&!e.immovable&&c>m&&(e.velocity.y*=-1));var C=this._frameTime;return t.immovable||(t.x+=t.velocity.x*C-a*Math.cos(o),t.y+=t.velocity.y*C-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*C+a*Math.cos(o),e.y+=e.velocity.y*C+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("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;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)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,u,l=t.body;if(0!==e.length&&l&&l.enable)if(this.useTree){var c=this.treeMinMax;c.minX=l.left,c.minY=l.top,c.maxX=l.right,c.maxY=l.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,u+=d}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,p=e.getTilesWithinWorldXY(a,h,u,l);if(0===p.length)return!1;for(var g={left:0,right:0,top:0,bottom:0},v=0;ve-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=0?t:t+2*Math.PI}},function(t,e,i){var n=i(0),s=i(18),r=i(70),o=i(8),a=i(6),h=i(1),u=i(10),l=i(75),c=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=l(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=s.LOADER_IDLE,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this.systems.events.once("shutdown",this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},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("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("update",this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit("progress",this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.size0&&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,i){var n=i(0),s=i(8),r=i(3),o=i(76),a=i(179),h=i(111),u=i(178),l=i(374),c=i(373),d=i(372),f=i(146),p=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.keys=[],this.combos=[],this.queue=[],this.onKeyHandler,this.time=0,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.settings.input,e=this.scene.sys.game.config;this.enabled=r(t,"keyboard",e.inputKeyboard),this.target=r(t,"keyboard.target",e.inputKeyboardEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=function(e){if(!e.defaultPrevented&&t.isActive()){t.queue.push(e);var i=t.keys[e.keyCode];i&&i.preventDefault&&e.preventDefault()}};this.onKeyHandler=e,this.target.addEventListener("keydown",e,!1),this.target.addEventListener("keyup",e,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("keydown",this.onKeyHandler),this.target.removeEventListener("keyup",this.onKeyHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},createCursorKeys:function(){return this.addKeys({up:h.UP,down:h.DOWN,left:h.LEFT,right:h.RIGHT,space:h.SPACE,shift:h.SHIFT})},addKeys:function(t){var e={};if("string"==typeof t){t=t.split(",");for(var i=0;i-1?e[i]=t:e[t.keyCode]=t,t}return"string"==typeof t&&(t=h[t.toUpperCase()]),e[t]||(e[t]=new a(t)),e[t]},removeKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=h[t.toUpperCase()]);e[t]&&(e[t]=void 0)},createCombo:function(t,e){return new u(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=f(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.queue.length;if(this.enabled&&0!==e)for(var i=this.queue.splice(0,e),n=this.keys,s=0;s=e}}},function(t,e,i){var n=i(89),s=i(33),r=i(0),o=i(183),a=i(380),h=i(58),u=i(116),l=i(55),c=i(8),d=i(1),f=i(76),p=i(7),g=i(10),v=i(11),m=i(32),y=i(68),x=i(61),w=new r({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,f.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once("destroy",this.destroy,this),this.pluginEvents.emit("boot")},start:function(){var t=this.systems.events;t.on("transitionstart",this.transitionIn,this),t.on("transitionout",this.transitionOut,this),t.on("transitioncomplete",this.transitionComplete,this),t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.enabled=!0,this.pluginEvents.emit("start")},preUpdate:function(){this.pluginEvents.emit("preUpdate");var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){this.pluginEvents.emit("update",t,e);var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(n=!0,this._pollTimer=this.pollRate)),n)for(var s=this.manager.pointers,r=0;r0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,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=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var a=[];for(i=0;i1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3===t.dragState){for(s=this._drag[t.id],i=0;i0?(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),u[0]?(r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):r.target=null)}else!r.target&&u[0]&&(r.target=u[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target));var c=t.x-n.input.dragX,d=t.y-n.input.dragY;n.emit("drag",t,c,d),this.emit("drag",t,n,c,d)}return s.length}if(5===t.dragState){for(s=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,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 a(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,a=!1;if(p(e)){var h=e;e=d(h,"hitArea",null),i=d(h,"hitAreaCallback",null),n=d(h,"draggable",!1),s=d(h,"dropZone",!1),r=d(h,"cursor",!1),a=d(h,"useHandCursor",!1);var u=d(h,"pixelPerfect",!1),l=d(h,"alphaTolerance",1);u&&(e={},i=this.makePixelPerfect(l)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;ct.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){t.exports={CircleToCircle:i(855),CircleToRectangle:i(854),GetRectangleIntersection:i(853),LineToCircle:i(401),LineToLine:i(147),LineToRectangle:i(852),PointToLine:i(400),PointToLineSegment:i(851),RectangleToRectangle:i(240),RectangleToTriangle:i(850),RectangleToValues:i(849),TriangleToCircle:i(848),TriangleToLine:i(847),TriangleToTriangle:i(846)}},function(t,e,i){t.exports={Circle:i(865),Ellipse:i(246),Intersects:i(402),Line:i(845),Point:i(827),Polygon:i(813),Rectangle:i(393),Triangle:i(784)}},function(t,e,i){var n=i(0),s=i(405),r=i(152),o=i(21),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},u=t.matrix,l=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),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=a},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(112);s.register("text",function(t,e){void 0===t&&(t={});var i=r(t,"text",""),s=r(t,"style",null),a=r(t,"padding",null);null!==a&&(s.padding=a);var h=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h})},function(t,e,i){var n=i(25),s=i(130),r=i(14),o=i(12),a=i(35);r.register("sprite",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),s(h,t),h})},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(69);s.register("image",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},function(t,e,i){var n=i(14),s=i(118);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new s(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(112);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(35);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(69);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(118);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<r;h--){for(u=0;u0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e){t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}},function(t,e,i){var n=i(0),s=i(39),r=i(63),o=i(3),a=i(35),h=i(62),u=i(4),l=new n({Extends:a,initialize:function(t,e,i,n,s,r){a.call(this,t,i,n,s,r),this.path=e,this.rotateToPath=!1,this.pathRotationVerticalAdjust=!1,this.pathRotationOffset=0,this.pathOffset=new u(i,n),this.pathVector=new u,this.pathTween,this.pathConfig=null,this._prevDirection=h.PLAYING_FORWARD},setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=!1),this.rotateToPath=t,this.pathRotationOffset=e,this.pathRotationVerticalAdjust=i,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=0,t.to=1;var n=r(t,"positionOnPath",!1);if(this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0),this.pathRotationVerticalAdjust=r(t,"verticalAdjust",!1),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),n&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=h.PLAYING_FORWARD,this.rotateToPath){var a=this.path.getPoint(.1);this.rotation=Math.atan2(a.y-this.y,a.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},preUpdate:function(t,e){this.anims.update(t,e);var i=this.pathTween;if(i){var n=i.data[0];if(n.state!==h.PLAYING_FORWARD&&n.state!==h.PLAYING_BACKWARD)return;var r=this.pathVector;this.path.getPoint(i.getValue(),r),r.add(this.pathOffset);var o=this.x,a=this.y;this.setPosition(r.x,r.y);var u=this.x-o,l=this.y-a;if(0===u&&0===l)return;if(n.state!==this._prevDirection)return void(this._prevDirection=n.state);this.rotateToPath&&(this.rotation=Math.atan2(l,u)+s(this.pathRotationOffset),this.pathRotationVerticalAdjust&&(this.flipY=0!==this.rotation&&n.state===h.PLAYING_BACKWARD))}}});t.exports=l},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e){t.exports=function(t,e){for(var i=0;ithis._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,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=i(52),s=i(0),r=i(13),o=i(426),a=i(425),h=i(909),u=i(1),l=i(150),c=i(424),d=i(113),f=i(428),p=i(423),g=i(11),v=i(83),m=i(4),y=i(40),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),this.y=new h(e,"y",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),this.angle=new h(e,"angle",{min:0,max:360}),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?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(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},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=i(0),s=i(39),r=i(58),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>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"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*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"),this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=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>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.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(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&&e.cameraFilter&r.id)o&&(o.style.display="none");else{var a=t._tempMatrix1,h=t._tempMatrix2,u=t._tempMatrix3,l=e.originX*e.width,c=e.originY*e.height;h.applyITRS(e.x-l-r.scrollX*e.scrollFactorX,e.y-c-r.scrollY*e.scrollFactorY,e.rotation,e.scaleX,e.scaleY),a.copyFrom(r.matrix),a.multiply(h,u),o.style.display="block",o.style.opacity=e.alpha,o.style.zIndex=e._depth,o.style.pointerEvents="auto",o.style.mixBlendMode=n[e._blendMode],o.style.transform=u.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",o.style.transformOrigin=100*e.originX+"% "+100*e.originY+"%"}}},function(t,e,i){var n=i(0),s=i(13),r=i(915),o=i(15),a=i(153),h=i(156),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.skewX=0,this.skewY=0,this.rotate3d=new h,this.rotate3dAngle="deg",this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),n&&this.setElement(n)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e,i){var n=i(56);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return n(t,s)}},function(t,e,i){var n=i(30);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;ht.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(251);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),o=0;o=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(i>0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e,i){var n=i(30);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){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 u=e[h];t.splice(i,0,u),s&&s.call(r,u)}return e}},function(t,e){t.exports=function(t,e,i,n,s){if(void 0===s&&(s=t),i>0){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.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t},tick:function(){this.step(window.performance.now())},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(window.performance.now())},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){var i=0,n=function(t,e,n,s){var r=i-s.y-s.height;t.add(n,e,s.x,r,s.width,s.height)};t.exports=function(t,e,s){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=s.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;cx||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var _=u,M=u,E=0,P=e.sourceIndex,L=0;Lg||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,w=0;wr&&(y=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+m,h-y,u-x),(v+=h+p)+h>r&&(v=f,m+=u+p)}return t}},function(t,e,i){var n=i(34);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=n(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var n=i(34);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a=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,i){var n=i(57),s=i(81),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(57),browser:i(81),features:i(123),input:i(495),audio:i(494),video:i(493),fullscreen:i(492),canvasFeatures:i(210)}},function(t,e,i){var n=i(23);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="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),a=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),u.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),u.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),u[0]=h,console.log.apply(console,u)}}}},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){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 tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid texture-based tint"," color.rgb = mix(texture.rgb, outTint.rgb, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},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],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*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],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*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],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*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],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*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],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*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],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*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),u=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*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,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){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];","","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(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_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_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,i){var n=i(265),s=i(22),r=i(23),o=i(123);t.exports=function(t){var e,a,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.antialias||s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width*h.resolution,h.height*h.resolution,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||n.setCrisp(t.canvas),t.canvas.style.width=(h.width*h.zoom).toString()+"px",t.canvas.style.height=(h.height*h.zoom).toString()+"px",h.renderType!==r.HEADLESS&&(e=i(261),a=i(258),h.renderType===r.WEBGL?(t.renderer=new a(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(85);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style=["display: block;","width: "+t.canvas.width+"px;","height: "+t.canvas.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e,i){var n=i(0),s=i(23),r=i(1),o=i(3),a=i(7),h=i(16),u=i(2),l=i(124),c=i(134),d=new n({initialize:function(t){void 0===t&&(t={});this.width=o(t,"width",1024),this.height=o(t,"height",768),this.zoom=o(t,"zoom",1),this.resolution=o(t,"resolution",1),this.parent=o(t,"parent",null),this.scaleMode=o(t,"scaleMode",0);var e=o(t,"scale",null);e&&(this.width=o(e,"width",this.width),this.height=o(e,"height",this.height),this.zoom=o(e,"zoom",this.zoom),this.resolution=o(e,"resolution",this.resolution),this.parent=o(e,"parent",this.parent),this.scaleMode=o(e,"mode",this.scaleMode)),this.renderType=o(t,"type",s.AUTO),this.canvas=o(t,"canvas",null),this.context=o(t,"context",null),this.canvasStyle=o(t,"canvasStyle",null),this.sceneConfig=o(t,"scene",null),this.seed=o(t,"seed",[(Date.now()*Math.random()).toString()]),h.RND.init(this.seed),this.gameTitle=o(t,"title",""),this.gameURL=o(t,"url","https://phaser.io"),this.gameVersion=o(t,"version",""),this.autoFocus=o(t,"autoFocus",!0),this.domCreateContainer=o(t,"dom.createContainer",!1),this.domBehindCanvas=o(t,"dom.behindCanvas",!1),this.inputKeyboard=o(t,"input.keyboard",!0),this.inputKeyboardEventTarget=o(t,"input.keyboard.target",window),this.inputMouse=o(t,"input.mouse",!0),this.inputMouseEventTarget=o(t,"input.mouse.target",null),this.inputMouseCapture=o(t,"input.mouse.capture",!0),this.inputTouch=o(t,"input.touch",!0),this.inputTouchEventTarget=o(t,"input.touch.target",null),this.inputTouchCapture=o(t,"input.touch.capture",!0),this.inputActivePointers=o(t,"input.activePointers",1),this.inputGamepad=o(t,"input.gamepad",!1),this.inputGamepadEventTarget=o(t,"input.gamepad.target",window),this.disableContextMenu=o(t,"disableContextMenu",!1),this.audio=o(t,"audio"),this.hideBanner=!1===o(t,"banner",null),this.hidePhaser=o(t,"banner.hidePhaser",!1),this.bannerTextColor=o(t,"banner.text","#ffffff"),this.bannerBackgroundColor=o(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(t,"fps",null);var i=o(t,"render",t);this.autoResize=o(i,"autoResize",!1),this.antialias=o(i,"antialias",!0),this.roundPixels=o(i,"roundPixels",!1),this.pixelArt=o(i,"pixelArt",!1),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(i,"transparent",!1),this.clearBeforeRender=o(i,"clearBeforeRender",!0),this.premultipliedAlpha=o(i,"premultipliedAlpha",!0),this.preserveDrawingBuffer=o(i,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=o(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(i,"powerPreference","default"),this.batchSize=o(i,"batchSize",2e3);var n=o(t,"backgroundColor",0);this.backgroundColor=c(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(t,"callbacks.preBoot",u),this.postBoot=o(t,"callbacks.postBoot",u),this.physics=o(t,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(t,"loader.baseURL",""),this.loaderPath=o(t,"loader.path",""),this.loaderMaxParallelDownloads=o(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(t,"loader.crossOrigin",void 0),this.loaderResponseType=o(t,"loader.responseType",""),this.loaderAsync=o(t,"loader.async",!0),this.loaderUser=o(t,"loader.user",""),this.loaderPassword=o(t,"loader.password",""),this.loaderTimeout=o(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var d=o(t,"plugins",null),f=l.DefaultScene;d&&(Array.isArray(d)?this.defaultPlugins=d:a(d)&&(this.installGlobalPlugins=r(d,"global",[]),this.installScenePlugins=r(d,"scene",[]),Array.isArray(d.default)?f=d.default:Array.isArray(d.defaultMerge)&&(f=f.concat(d.defaultMerge)))),this.defaultPlugins=f;var p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(t,"images.default",p+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(t,"images.missing",p+"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=d},function(t,e,i){var n=i(85),s=i(215),r=i(213),o=i(22),a=i(0),h=i(506),u=i(505),l=i(504),c=i(59),d=i(497),f=i(496),p=i(264),g=i(8),v=i(305),m=i(209),y=i(10),x=i(204),w=i(491),b=i(202),T=i(199),A=i(192),S=i(478),C=i(477),_=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 A(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new b(this,this.config.sceneConfig),this.device=f,this.scaleManager=new w(this,this.config),this.sound=T.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new v(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isOver=!0,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("texturesready",this.texturesReady,this)):console.warn("Core Phaser Plugins missing. Cannot start.")},texturesReady:function(){this.events.emit("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)),C(this);var t=this.events;t.on("hidden",this.onHidden,this),t.on("visible",this.onVisible,this),t.on("blur",this.onBlur,this),t.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e);var n=this.renderer;n.preRender(),i.emit("prerender",n,t,e),this.scene.render(n),n.postRender(),i.emit("postrender",n,t,e)},headlessStep:function(t,e){var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e),i.emit("prerender"),i.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.domContainer&&(this.domContainer.style.width=t+"px",this.domContainer.style.height=e+"px"),this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=_},function(t,e,i){var n=i(1);t.exports=function(t){return{developerPayload:n(t,"developerPayload",""),paymentID:n(t,"paymentID",""),productID:n(t,"productID",""),purchaseTime:n(t,"purchaseTime",""),purchaseToken:n(t,"purchaseToken",""),signedRequest:n(t,"signedRequest","")}}},function(t,e,i){var n=i(1);t.exports=function(t){return{title:n(t,"title",""),productID:n(t,"productID",""),description:n(t,"description",""),imageURI:n(t,"imageURI",""),price:n(t,"price",""),priceCurrencyCode:n(t,"priceCurrencyCode","")}}},function(t,e){t.exports=function(t){return{score:t.getScore(),scoreFormatted:t.getFormattedScore(),timestamp:t.getTimestamp(),rank:t.getRank(),data:t.getExtraData(),playerName:t.getPlayer().getName(),playerPhotoURL:t.getPlayer().getPhoto(),playerID:t.getPlayer().getID()}}},function(t,e,i){var n=i(0),s=i(8),r=i(510),o=new n({Extends:s,initialize:function(t,e){s.call(this),this.plugin=t,this.ref=e,this.name=e.getName(),this.contextID=e.getContextID(),this.entryCount=0,this.playerScore=null,this.scores=[],this.getEntryCount()},getEntryCount:function(){var t=this;this.ref.getEntryCountAsync().then(function(e){console.log("entry count",e),t.entryCount=e,t.emit("getentrycount",e,t.name)}).catch(function(t){console.warn(t)})},setScore:function(t,e){void 0===e&&(e="");var i=this;this.ref.setScoreAsync(t,e).then(function(t){console.log("set score",t),i.emit("setscore",t.getScore(),t.getExtraData(),i.name)}).catch(function(t){console.warn(t)})},getPlayerScore:function(){var t=this;this.ref.getPlayerEntryAsync().then(function(e){console.log("get player score");var i=r(e);console.log(i),t.playerScore=i,t.emit("getplayerscore",i,t.name)}).catch(function(t){console.warn(t)})},getScores:function(t,e){void 0===t&&(t=10),void 0===e&&(e=0);var i=this;this.ref.getEntriesAsync().then(function(t){console.log("get scores",t),i.scores=[],t.forEach(function(t){i.scores.push(r(t))}),i.emit("getscores",i.scores,i.name)}).catch(function(t){console.warn(t)})}});t.exports=o},function(t,e){t.exports=function(t,e){return{instance:t,placementID:t.getPlacementID(),shown:!1,video:e}}},function(t,e,i){var n=i(0),s=i(8),r=i(10),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){t.exports={EventEmitter:i(513)}},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,u=[],l=!1,c=-1;function d(){l&&h&&(l=!1,h.length?u=h.concat(u):c=-1,u.length&&f())}function f(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c1)for(var i=1;i1&&(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){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e,i){var n=i(31);n.ColorToRGBA=i(936),n.ComponentToHex=i(519),n.GetColor=i(159),n.GetColor32=i(288),n.HexStringToColor=i(289),n.HSLToColor=i(935),n.HSVColorWheel=i(934),n.HSVToRGB=i(517),n.HueToComponent=i(518),n.IntegerToColor=i(287),n.IntegerToRGB=i(286),n.Interpolate=i(933),n.ObjectToColor=i(285),n.RandomRGB=i(932),n.RGBStringToColor=i(284),n.RGBToHSV=i(931),n.RGBToString=i(930),n.ValueToColor=i(134),t.exports=n},function(t,e,i){var n=i(0),s=i(59),r=i(10),o=new n({Extends:s,initialize:function(t){s.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.events=this.systems.events,this.events.once("destroy",this.destroy,this)},start:function(){this.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",o,"data"),t.exports=o},function(t,e,i){t.exports={DataManager:i(59),DataManagerPlugin:i(521)}},function(t,e,i){var n=i(266),s=i(0),r=i(86),o=i(4),a=new s({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.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,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;ei;)n-=i;n0&&(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?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.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,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),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*u,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(87),s=i(270),r=i(536),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=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){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,i){var n=i(212),s=i(0),r=i(1),o=i(10),a=i(32),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.baseScale=1,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.systems.events.once("destroy",this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on("update",this.update,this),e.once("shutdown",this.shutdown,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new n(t,e,i,s);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,s=0;s0&&(h.preRender(r,o),t.render(n,e,i,h))}},resetAll:function(){for(var t=0;t=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var n=i(20),s=i(0),r=i(4),o=i(126),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,a){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===s&&(s=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning?h:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(h.scrollX,h.scrollY),this.destination.set(t,e),h.getScroll(t,e,this.current),"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("camerapanstart",this.camera,this,i,t,e),h)},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-h&&(c-=h,n+=u),f=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){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){var n=i(16),s=i(27),r=i(220),o=i(219),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t){void 0===t&&(t=new s);var e=this.parentContainer;if(!e)return this.getLocalTransformMatrix(t);for(var i=[];e;)i.unshift(e),e=e.parentContainer;t.loadIdentity();for(var n=i.length,r=0;r>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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(60),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(222),s=i(221),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new s(this.scene,t)}};t.exports=r},function(t,e,i){var n=i(11),s=i(295),r=i(4),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,s,r,o,a,h,u;if(void 0===t&&(t=new n),this.parentContainer){var l=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t),h=t.x,u=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},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)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e,i){var n=i(20),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},function(t,e,i){var n=i(47),s=i(45),r=i(46),o=i(44);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(45),r=i(48),o=i(44);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(93),s=i(45),r=i(92),o=i(44);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(90),s=i(47),r=i(91),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(90),s=i(49),r=i(91),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(92),s=i(91);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(606),s=i(93),r=i(90);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(51),s=i(47),r=i(50),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(49),r=i(50),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(51),s=i(93),r=i(50),o=i(92);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(302),s=[];s[n.BOTTOM_CENTER]=i(610),s[n.BOTTOM_LEFT]=i(609),s[n.BOTTOM_RIGHT]=i(608),s[n.CENTER]=i(607),s[n.LEFT_CENTER]=i(605),s[n.RIGHT_CENTER]=i(604),s[n.TOP_CENTER]=i(603),s[n.TOP_LEFT]=i(602),s[n.TOP_RIGHT]=i(601);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(1020),Call:i(1019),GetFirst:i(1018),GetLast:i(1017),GridAlign:i(1016),IncAlpha:i(1015),IncX:i(1014),IncXY:i(1013),IncY:i(1012),PlaceOnCircle:i(1011),PlaceOnEllipse:i(1010),PlaceOnLine:i(1009),PlaceOnRectangle:i(1008),PlaceOnTriangle:i(1007),PlayAnimation:i(1006),PropertyValueInc:i(36),PropertyValueSet:i(26),RandomCircle:i(1005),RandomEllipse:i(1004),RandomLine:i(1003),RandomRectangle:i(1002),RandomTriangle:i(1001),Rotate:i(1e3),RotateAround:i(999),RotateAroundDistance:i(998),ScaleX:i(997),ScaleXY:i(996),ScaleY:i(995),SetAlpha:i(994),SetBlendMode:i(993),SetDepth:i(992),SetHitArea:i(991),SetOrigin:i(990),SetRotation:i(989),SetScale:i(988),SetScaleX:i(987),SetScaleY:i(986),SetTint:i(985),SetVisible:i(984),SetX:i(983),SetXY:i(982),SetY:i(981),ShiftPosition:i(980),Shuffle:i(979),SmootherStep:i(978),SmoothStep:i(977),Spread:i(976),ToggleVisible:i(975),WrapInRectangle:i(974)}},function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s0){var s=t.gl,r=this.pipeline,o=r.vertexBuffer,a=e.tileset.glTexture;t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer,t.setPipeline(r),t.setTexture2D(a,0),s.drawArrays(r.topology,0,e.vertexCount),r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}}},function(t,e,i){var n=i(2),s=i(2);n=i(635),s=i(634),t.exports={renderWebGL:n,renderCanvas:s}},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,u=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,a.multiply(h,u));var l=e.tileset,c=t.currentContext,d=l.image.getSourceImage();c.save(),u.copyToContext(c);for(var f=n.alpha*e.alpha,p=0;p-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(17);t.exports=function(t){for(var e,i,s,r,o,a=0;a>>0;return n}},function(t,e,i){var n=i(648),s=i(1),r=i(106),o=i(320),a=i(66);t.exports=function(t,e){for(var i=[],h=0;h0){var m=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);m.rotation=v.rotation,m.flipX=v.flipped,d.push(m)}else{var y=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(y)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e,i){t.exports={Parse:i(323),Parse2DArray:i(225),ParseCSV:i(322),Impact:i(316),Tiled:i(321)}},function(t,e,i){var n=i(54),s=i(53),r=i(4);t.exports=function(t,e,i,o,a,h){return void 0===o&&(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e,i){var n=i(24);t.exports=function(t,e,i,s,r,o){if(void 0!==r){var a,h=n(t,e,i,s,null,o),u=0;for(a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e,i){var n=i(67),s=i(41),r=i(113);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;ae)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(67),s=i(41),r=i(226);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;a=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;r=0&&p=0&&g0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},function(t,e,i){var n=i(341);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),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},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(696);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},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(698);t.exports=function(t,e,i,s,r){var o=0;return t.deltaX()<0&&!t.blocked.left&&e.collideRight&&t.checkCollision.left?e.faceRight&&t.x0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e,i){var n=i(699),s=i(697),r=i(339);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,m=0,y=1;if(e.deltaAbsX()>e.deltaAbsY()?m=-1:e.deltaAbsX()=0;a--){var h=e[a],u=r(s,o,h.x,h.y);u=0;a--){var h=e[a],u=r(s,o,h.x,h.y);u>i&&(n=h,i=u)}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 l),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new l),i.setToPolar(t,e)},shutdown:function(){var t=this.systems.events;t.off("update",this.world.update,this.world),t.off("postupdate",this.world.postUpdate,this.world),t.off("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("start",this.start,this),this.scene=null,this.systems=null}});u.register("ArcadePhysics",d,"arcadePhysics"),t.exports=d},function(t,e,i){var n=i(43),s=i(17),r={ArcadePhysics:i(714),Body:i(343),Collider:i(342),Factory:i(349),Group:i(346),Image:i(348),Sprite:i(144),StaticBody:i(338),StaticGroup:i(345),World:i(344)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},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;o1?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,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e){return t/e/1e3}},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.floor(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},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.ceil(t*n)/n}},function(t,e){t.exports=function(t){for(var e=0,i=0;i0&&0==(t&t-1)}},function(t,e,i){t.exports={GetNext:i(414),IsSize:i(84),IsValue:i(732)}},function(t,e,i){var n=i(290);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(125);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?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(266);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?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[i=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e'),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?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)e.x&&t.ye.y}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},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,i){var n=Math.min(t.x,e),s=Math.max(t.right,e);t.x=n,t.width=s-n;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var s=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=s,t.height=r-s,t}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;on(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,i){var n=i(236);t.exports=function(t,e){var i=n(t);return ii&&(i=h.x),h.xr&&(r=h.y),h.ye.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(61),s=i(147);t.exports=function(t,e){return!!(n(t,e.getPointA())||n(t,e.getPointB())||s(t.getLineA(),e)||s(t.getLineB(),e)||s(t.getLineC(),e))}},function(t,e,i){var n=i(401),s=i(61);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottomt.right+r||it.bottom+r||st.right||e.rightt.bottom||e.bottom0}},function(t,e,i){var n=i(400);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){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(11),s=i(240);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){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(58);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},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){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e,i){var n=i(33);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,i){var n=i(33);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(89);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(89);n.Area=i(864),n.Circumference=i(298),n.CircumferencePoint=i(138),n.Clone=i(863),n.Contains=i(33),n.ContainsPoint=i(862),n.ContainsRect=i(861),n.CopyFrom=i(860),n.Equals=i(859),n.GetBounds=i(858),n.GetPoint=i(301),n.GetPoints=i(299),n.Offset=i(857),n.OffsetPoint=i(856),n.Random=i(165),t.exports=n},function(t,e,i){var n=i(0),s=i(404),r=i(10),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(241);s.register("quad",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"key",null),h=r(t,"frame",null),u=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,u,t),u})},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(3),a=i(148);s.register("mesh",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=o(t,"vertices",[]),u=o(t,"colors",[]),l=o(t,"alphas",[]),c=o(t,"uv",[]),d=new a(this.scene,0,0,h,c,u,l,i,s);return void 0!==e&&(t.add=e),n(this.scene,d,t),d})},function(t,e,i){var n=i(241);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(148);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=this.pipeline;t.setPipeline(o,e);var a=o._tempMatrix1,h=o._tempMatrix2,u=o._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,u)):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY,a.multiply(h,u));var l=e.frame.glTexture,c=e.vertices,d=e.uv,f=e.colors,p=e.alphas,g=c.length,v=Math.floor(.5*g);o.vertexCount+v>=o.vertexCapacity&&o.flush(),o.setTexture2D(l,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,w=0,b=e.tintFill,T=0;Ta.length&&(p=a.length);for(var g=u,v=l,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x?@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(900),s=i(17),r={Parse:i(899)};r=s(!1,r,n),t.exports=r},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(21);t.exports=function(t,e,i,s,r){var o=e.frame,a=o.width,h=o.height,u=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a,h,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,u(e._tintTL,s.alpha*e._alphaTL),u(e._tintTR,s.alpha*e._alphaTR),u(e._tintBL,s.alpha*e._alphaBL),u(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r),t.setBlankTexture(!0)}},function(t,e,i){var n=i(2),s=i(2);n=i(903),s=i(902),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(426),EdgeZone:i(425),RandomZone:i(423)}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.emitters.list,o=r.length;if(0!==o){var a=t._tempMatrix1.copyFrom(n.matrix),h=t._tempMatrix2,u=t._tempMatrix3,l=t._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);a.multiply(l);var c=n.roundPixels,d=t.currentContext;d.save();for(var f=0;f0&&e.cropHeight>0&&(h.save(),h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var R=0;R0&&e.cropHeight>0&&h.restore(),h.restore()}}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var u=e.cropWidth>0||e.cropHeight>0;u&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var l=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),l.copyFrom(s.matrix),r?(l.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,l.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,l.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,w=e._isTinted&&e.tintFill,b=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),A=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),S=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var C,_,M=0,E=0,P=0,L=0,k=e.letterSpacing,F=0,R=0,O=0,D=0,I=e.scrollX,B=e.scrollY,Y=e.fontData,X=Y.chars,z=Y.lineHeight,N=e.fontSize/Y.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;Jv&&(r=v),o>m&&(o=m);var L=v+g.xAdvance,k=m+l;aC&&(C=M),MC&&(C=M),M>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e){t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(i){t.style[i+"user-select"]=e}),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e,i){t.exports={Interpolation:i(265),Pool:i(22),Smoothing:i(133),TouchAction:i(938),UserSelect:i(937)}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e,i){t.exports={CenterOn:i(606),GetBottom:i(51),GetCenterX:i(93),GetCenterY:i(90),GetLeft:i(49),GetOffsetX:i(941),GetOffsetY:i(940),GetRight:i(47),GetTop:i(45),SetBottom:i(50),SetCenterX:i(92),SetCenterY:i(91),SetLeft:i(48),SetRight:i(46),SetTop:i(44)}},function(t,e,i){var n=i(47),s=i(45),r=i(50),o=i(46);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(45),r=i(50),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(93),s=i(45),r=i(50),o=i(92);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(45),r=i(48),o=i(44);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(90),s=i(47),r=i(91),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(51),s=i(47),r=i(50),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(45),r=i(46),o=i(44);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(90),s=i(49),r=i(91),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),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),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(47),r=i(46),o=i(44);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(51),s=i(49),r=i(48),o=i(44);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(51),s=i(93),r=i(92),o=i(44);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){t.exports={BottomCenter:i(954),BottomLeft:i(953),BottomRight:i(952),LeftBottom:i(951),LeftCenter:i(950),LeftTop:i(949),RightBottom:i(948),RightCenter:i(947),RightTop:i(946),TopCenter:i(945),TopLeft:i(944),TopRight:i(943)}},function(t,e,i){t.exports={BottomCenter:i(610),BottomLeft:i(609),BottomRight:i(608),Center:i(607),LeftCenter:i(605),QuickSet:i(611),RightCenter:i(604),TopCenter:i(603),TopLeft:i(602),TopRight:i(601)}},function(t,e,i){var n=i(302),s=i(17),r={In:i(956),To:i(955)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(957),Bounds:i(942),Canvas:i(939),Color:i(520),Masks:i(516)}},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t,e){this.active=!1,this.p0=new s(t,e)},getPoint:function(t,e){return void 0===e&&(e=new s),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},function(t,e,i){var n=i(0),s=i(529),r=i(527),o=i(9),a=i(526),h=i(959),u=i(525),l=i(11),c=i(523),d=i(4),f=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,u,l=this.getEndPoint();return t instanceof d?(a=t,h=e,u=i):(a=new d(i,n),h=new d(r,o),u=new d(t,e)),this.add(new s(l,a,h,u))},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 u(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 this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?(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<.1&&(e.zoom=.1))}},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){var n=i(0),s=i(3),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.speedX=0,this.speedY=0;var e=s(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=s(t,"speed.x",0),this.speedY=s(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<.1&&(e.zoom=.1)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed)}},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={FixedKeyControl:i(971),SmoothedKeyControl:i(970)}},function(t,e,i){t.exports={Controls:i(972),Scene2D:i(578),Sprite3D:i(969)}},function(t,e,i){var n=i(40);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(600), + Animation: __webpack_require__(306), + BlendMode: __webpack_require__(599), + ComputedSize: __webpack_require__(598), + Crop: __webpack_require__(597), + Depth: __webpack_require__(596), + Flip: __webpack_require__(595), + GetBounds: __webpack_require__(594), + Mask: __webpack_require__(593), + Origin: __webpack_require__(592), + Pipeline: __webpack_require__(294), + ScaleMode: __webpack_require__(591), + ScrollFactor: __webpack_require__(590), + Size: __webpack_require__(589), + Texture: __webpack_require__(588), + TextureCrop: __webpack_require__(587), + Tint: __webpack_require__(586), + ToJSON: __webpack_require__(585), + Transform: __webpack_require__(584), + TransformMatrix: __webpack_require__(27), + Visible: __webpack_require__(583) + +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -2729,47 +2785,6 @@ PluginCache.register('GameObjectCreator', GameObjectCreator, 'make'); module.exports = GameObjectCreator; -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Components - */ - -module.exports = { - - Alpha: __webpack_require__(595), - Animation: __webpack_require__(306), - BlendMode: __webpack_require__(594), - ComputedSize: __webpack_require__(593), - Crop: __webpack_require__(592), - Depth: __webpack_require__(591), - Flip: __webpack_require__(590), - GetBounds: __webpack_require__(589), - Mask: __webpack_require__(588), - Origin: __webpack_require__(587), - Pipeline: __webpack_require__(294), - ScaleMode: __webpack_require__(586), - ScrollFactor: __webpack_require__(585), - Size: __webpack_require__(584), - Texture: __webpack_require__(583), - TextureCrop: __webpack_require__(582), - Tint: __webpack_require__(581), - ToJSON: __webpack_require__(580), - Transform: __webpack_require__(579), - TransformMatrix: __webpack_require__(32), - Visible: __webpack_require__(578) - -}; - - /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { @@ -2781,7 +2796,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var DataManager = __webpack_require__(59); var EventEmitter = __webpack_require__(8); @@ -3691,9 +3706,9 @@ module.exports = FILE_CONST; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(109); -var MergeXHRSettings = __webpack_require__(108); -var XHRLoader = __webpack_require__(176); +var GetURL = __webpack_require__(110); +var MergeXHRSettings = __webpack_require__(109); +var XHRLoader = __webpack_require__(177); var XHRSettings = __webpack_require__(75); /** @@ -4450,146 +4465,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -/** - * Global consts. - * - * @ignore - */ - -var CONST = { - - /** - * Phaser Release Version - * - * @name Phaser.VERSION - * @readOnly - * @type {string} - * @since 3.0.0 - */ - VERSION: '3.12.0-beta1', - - BlendModes: __webpack_require__(52), - - ScaleModes: __webpack_require__(60), - - /** - * AUTO Detect Renderer. - * - * @name Phaser.AUTO - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - AUTO: 0, - - /** - * Canvas Renderer. - * - * @name Phaser.CANVAS - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - CANVAS: 1, - - /** - * WebGL Renderer. - * - * @name Phaser.WEBGL - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - WEBGL: 2, - - /** - * Headless Renderer. - * - * @name Phaser.HEADLESS - * @readOnly - * @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 - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - FOREVER: -1, - - /** - * Direction constant. - * - * @name Phaser.NONE - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - NONE: 4, - - /** - * Direction constant. - * - * @name Phaser.UP - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - UP: 5, - - /** - * Direction constant. - * - * @name Phaser.DOWN - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - DOWN: 6, - - /** - * Direction constant. - * - * @name Phaser.LEFT - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - LEFT: 7, - - /** - * Direction constant. - * - * @name Phaser.RIGHT - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - RIGHT: 8 - -}; - -module.exports = CONST; - - -/***/ }), -/* 23 */, -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var Smoothing = __webpack_require__(133); // The pool into which the canvas elements are placed. @@ -4841,6 +4717,145 @@ module.exports = CanvasPool(); /***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Global consts. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @readOnly + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.12.0-beta2', + + BlendModes: __webpack_require__(52), + + ScaleModes: __webpack_require__(60), + + /** + * AUTO Detect Renderer. + * + * @name Phaser.AUTO + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Canvas Renderer. + * + * @name Phaser.CANVAS + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * WebGL Renderer. + * + * @name Phaser.WEBGL + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * Headless Renderer. + * + * @name Phaser.HEADLESS + * @readOnly + * @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 + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + +/***/ }), +/* 24 */, /* 25 */ /***/ (function(module, exports, __webpack_require__) { @@ -4995,846 +5010,7 @@ module.exports = BuildGameObject; /***/ }), /* 26 */, -/* 27 */, -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var CONST = __webpack_require__(18); -var File = __webpack_require__(19); -var FileTypesManager = __webpack_require__(6); -var GetFastValue = __webpack_require__(1); -var GetValue = __webpack_require__(3); -var IsPlainObject = __webpack_require__(7); - -/** - * @typedef {object} Phaser.Loader.FileTypes.JSONFileConfig - * - * @property {string} key - The key of the file. Must be unique within both the Loader and the JSON Cache. - * @property {string|any} [url] - The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. - * @property {string} [extension='json'] - The default file extension to use if no url is provided. - * @property {string} [dataKey] - If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. - * @property {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - */ - -/** - * @classdesc - * A single JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. - * - * @class JSONFile - * @extends Phaser.Loader.File - * @memberOf Phaser.Loader.FileTypes - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @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 {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - */ -var JSONFile = new Class({ - - Extends: File, - - initialize: - - // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object - // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing - - function JSONFile (loader, key, url, xhrSettings, dataKey) - { - var extension = 'json'; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - dataKey = GetFastValue(config, 'dataKey', dataKey); - } - - var fileConfig = { - type: 'json', - cache: loader.cacheManager.json, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings, - config: dataKey - }; - - File.call(this, loader, fileConfig); - - if (IsPlainObject(url)) - { - // Object provided instead of a URL, so no need to actually load it (populate data with value) - if (dataKey) - { - this.data = GetValue(url, dataKey); - } - else - { - this.data = url; - } - - this.state = CONST.FILE_POPULATED; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.JSONFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - if (this.state !== CONST.FILE_POPULATED) - { - this.state = CONST.FILE_PROCESSING; - - var json = JSON.parse(this.xhrLoader.responseText); - - var key = this.config; - - if (typeof key === 'string') - { - this.data = GetValue(json, key, json); - } - else - { - this.data = json; - } - } - - this.onProcessComplete(); - } - -}); - -/** - * 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 () - * { - * this.load.json('wavedata', 'files/AlienWaveData.json'); - * } - * ``` - * - * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, - * or if it's already running, when the next free load slot becomes available. This happens automatically if you - * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued - * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. - * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the - * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been - * loaded. - * - * The key must be a unique String. It is used to add the file to the global 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', - * url: 'files/AlienWaveData.json' - * }); - * ``` - * - * See the documentation for `Phaser.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 ... - * var data = this.cache.json.get('wavedata'); - * ``` - * - * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files - * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and - * this is what you would use to retrieve the text from the JSON Cache. - * - * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. - * - * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" - * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` 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 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": { - * "baddies": { - * "aliens": {}, - * "boss": {} - * } - * }, - * "level2": {}, - * "level3": {} - * } - * ``` - * - * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. - * - * Note: The ability to load this type of file will only be available if the JSON 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#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent - * @since 3.0.0 - * - * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig|Phaser.Loader.FileTypes.JSONFileConfig[])} 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 {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - * @param {XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. - * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. - */ -FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) -{ - if (Array.isArray(key)) - { - for (var i = 0; i < key.length; i++) - { - // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object - this.addFile(new JSONFile(this, key[i])); - } - } - else - { - this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); - } - - return this; -}); - -module.exports = JSONFile; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Tests if the start and end indexes are a safe range for the given array. - * - * @function Phaser.Utils.Array.SafeRange - * @since 3.4.0 - * - * @param {array} array - The array to check. - * @param {integer} startIndex - The start index. - * @param {integer} endIndex - The end index. - * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. - * - * @return {boolean} True if the range is safe, otherwise false. - */ -var SafeRange = function (array, startIndex, endIndex, throwError) -{ - var len = array.length; - - if (startIndex < 0 || - startIndex > len || - startIndex >= endIndex || - endIndex > len || - startIndex + endIndex > len) - { - if (throwError) - { - throw new Error('Range Error: Values outside acceptable range'); - } - - return false; - } - else - { - return true; - } -}; - -module.exports = SafeRange; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var GetColor = __webpack_require__(158); -var GetColor32 = __webpack_require__(287); - -/** - * @classdesc - * The Color class holds a single color value and allows for easy modification and reading of it. - * - * @class Color - * @memberOf Phaser.Display - * @constructor - * @since 3.0.0 - * - * @param {integer} [red=0] - The red color value. A number between 0 and 255. - * @param {integer} [green=0] - The green color value. A number between 0 and 255. - * @param {integer} [blue=0] - The blue color value. A number between 0 and 255. - * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. - */ -var Color = new Class({ - - initialize: - - function Color (red, green, blue, alpha) - { - if (red === undefined) { red = 0; } - if (green === undefined) { green = 0; } - if (blue === undefined) { blue = 0; } - if (alpha === undefined) { alpha = 255; } - - /** - * The internal red color value. - * - * @name Phaser.Display.Color#r - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.r = 0; - - /** - * The internal green color value. - * - * @name Phaser.Display.Color#g - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.g = 0; - - /** - * The internal blue color value. - * - * @name Phaser.Display.Color#b - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.b = 0; - - /** - * The internal alpha color value. - * - * @name Phaser.Display.Color#a - * @type {number} - * @private - * @default 255 - * @since 3.0.0 - */ - this.a = 255; - - /** - * An array containing the calculated color values for WebGL use. - * - * @name Phaser.Display.Color#gl - * @type {number[]} - * @since 3.0.0 - */ - this.gl = [ 0, 0, 0, 1 ]; - - /** - * Pre-calculated internal color value. - * - * @name Phaser.Display.Color#_color - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._color = 0; - - /** - * Pre-calculated internal color32 value. - * - * @name Phaser.Display.Color#_color32 - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._color32 = 0; - - /** - * Pre-calculated internal color rgb string value. - * - * @name Phaser.Display.Color#_rgba - * @type {string} - * @private - * @default '' - * @since 3.0.0 - */ - this._rgba = ''; - - this.setTo(red, green, blue, alpha); - }, - - /** - * Sets this color to be transparent. Sets all values to zero. - * - * @method Phaser.Display.Color#transparent - * @since 3.0.0 - * - * @return {Phaser.Display.Color} This Color object. - */ - transparent: function () - { - this.red = 0; - this.green = 0; - this.blue = 0; - this.alpha = 0; - - return this.update(); - }, - - /** - * Sets the color of this Color component. - * - * @method Phaser.Display.Color#setTo - * @since 3.0.0 - * - * @param {integer} red - The red color value. A number between 0 and 255. - * @param {integer} green - The green color value. A number between 0 and 255. - * @param {integer} blue - The blue color value. A number between 0 and 255. - * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. - * - * @return {Phaser.Display.Color} This Color object. - */ - setTo: function (red, green, blue, alpha) - { - if (alpha === undefined) { alpha = 255; } - - this.red = red; - this.green = green; - this.blue = blue; - this.alpha = alpha; - - return this.update(); - }, - - /** - * Sets the red, green, blue and alpha GL values of this Color component. - * - * @method Phaser.Display.Color#setGLTo - * @since 3.0.0 - * - * @param {number} red - The red color value. A number between 0 and 1. - * @param {number} green - The green color value. A number between 0 and 1. - * @param {number} blue - The blue color value. A number between 0 and 1. - * @param {number} [alpha=1] - The alpha value. A number between 0 and 1. - * - * @return {Phaser.Display.Color} This Color object. - */ - setGLTo: function (red, green, blue, alpha) - { - if (alpha === undefined) { alpha = 1; } - - this.redGL = red; - this.greenGL = green; - this.blueGL = blue; - this.alphaGL = alpha; - - return this.update(); - }, - - /** - * Sets the color based on the color object given. - * - * @method Phaser.Display.Color#setFromRGB - * @since 3.0.0 - * - * @param {InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255. - * - * @return {Phaser.Display.Color} This Color object. - */ - setFromRGB: function (color) - { - this.red = color.r; - this.green = color.g; - this.blue = color.b; - - if (color.hasOwnProperty('a')) - { - this.alpha = color.a; - } - - return this.update(); - }, - - /** - * Updates the internal cache values. - * - * @method Phaser.Display.Color#update - * @since 3.0.0 - * - * @return {Phaser.Display.Color} This Color object. - */ - update: function () - { - this._color = GetColor(this.r, this.g, this.b); - this._color32 = GetColor32(this.r, this.g, this.b, this.a); - this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (this.a / 255) + ')'; - - return this; - }, - - /** - * Returns a new Color component using the values from this one. - * - * @method Phaser.Display.Color#clone - * @since 3.0.0 - * - * @return {Phaser.Display.Color} A new Color object. - */ - clone: function () - { - return new Color(this.r, this.g, this.b, this.a); - }, - - /** - * The color of this Color component, not including the alpha channel. - * - * @name Phaser.Display.Color#color - * @type {number} - * @readOnly - * @since 3.0.0 - */ - color: { - - get: function () - { - return this._color; - } - - }, - - /** - * The color of this Color component, including the alpha channel. - * - * @name Phaser.Display.Color#color32 - * @type {number} - * @readOnly - * @since 3.0.0 - */ - color32: { - - get: function () - { - return this._color32; - } - - }, - - /** - * The color of this Color component as a string which can be used in CSS color values. - * - * @name Phaser.Display.Color#rgba - * @type {string} - * @readOnly - * @since 3.0.0 - */ - rgba: { - - get: function () - { - return this._rgba; - } - - }, - - /** - * The red color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#redGL - * @type {number} - * @since 3.0.0 - */ - redGL: { - - get: function () - { - return this.gl[0]; - }, - - set: function (value) - { - this.gl[0] = Math.min(Math.abs(value), 1); - - this.r = Math.floor(this.gl[0] * 255); - - this.update(); - } - - }, - - /** - * The green color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#greenGL - * @type {number} - * @since 3.0.0 - */ - greenGL: { - - get: function () - { - return this.gl[1]; - }, - - set: function (value) - { - this.gl[1] = Math.min(Math.abs(value), 1); - - this.g = Math.floor(this.gl[1] * 255); - - this.update(); - } - - }, - - /** - * The blue color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#blueGL - * @type {number} - * @since 3.0.0 - */ - blueGL: { - - get: function () - { - return this.gl[2]; - }, - - set: function (value) - { - this.gl[2] = Math.min(Math.abs(value), 1); - - this.b = Math.floor(this.gl[2] * 255); - - this.update(); - } - - }, - - /** - * The alpha color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#alphaGL - * @type {number} - * @since 3.0.0 - */ - alphaGL: { - - get: function () - { - return this.gl[3]; - }, - - set: function (value) - { - this.gl[3] = Math.min(Math.abs(value), 1); - - this.a = Math.floor(this.gl[3] * 255); - - this.update(); - } - - }, - - /** - * The red color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#red - * @type {number} - * @since 3.0.0 - */ - red: { - - get: function () - { - return this.r; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.r = Math.min(value, 255); - - this.gl[0] = value / 255; - - this.update(); - } - - }, - - /** - * The green color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#green - * @type {number} - * @since 3.0.0 - */ - green: { - - get: function () - { - return this.g; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.g = Math.min(value, 255); - - this.gl[1] = value / 255; - - this.update(); - } - - }, - - /** - * The blue color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#blue - * @type {number} - * @since 3.0.0 - */ - blue: { - - get: function () - { - return this.b; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.b = Math.min(value, 255); - - this.gl[2] = value / 255; - - this.update(); - } - - }, - - /** - * The alpha color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#alpha - * @type {number} - * @since 3.0.0 - */ - alpha: { - - get: function () - { - return this.a; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.a = Math.min(value, 255); - - this.gl[3] = value / 255; - - this.update(); - } - - } - -}); - -module.exports = Color; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Geom.Rectangle.Contains - * @since 3.0.0 - * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {boolean} [description] - */ -var Contains = function (rect, x, y) -{ - if (rect.width <= 0 || rect.height <= 0) - { - return false; - } - - return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); -}; - -module.exports = Contains; - - -/***/ }), -/* 32 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6705,6 +5881,845 @@ var TransformMatrix = new Class({ module.exports = TransformMatrix; +/***/ }), +/* 28 */, +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(18); +var File = __webpack_require__(19); +var FileTypesManager = __webpack_require__(6); +var GetFastValue = __webpack_require__(1); +var GetValue = __webpack_require__(3); +var IsPlainObject = __webpack_require__(7); + +/** + * @typedef {object} Phaser.Loader.FileTypes.JSONFileConfig + * + * @property {string} key - The key of the file. Must be unique within both the Loader and the JSON Cache. + * @property {string|any} [url] - The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. + * @property {string} [extension='json'] - The default file extension to use if no url is provided. + * @property {string} [dataKey] - If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. + * @property {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ + +/** + * @classdesc + * A single JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. + * + * @class JSONFile + * @extends Phaser.Loader.File + * @memberOf Phaser.Loader.FileTypes + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. + * @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 {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + */ +var JSONFile = new Class({ + + Extends: File, + + initialize: + + // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object + // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing + + function JSONFile (loader, key, url, xhrSettings, dataKey) + { + var extension = 'json'; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + dataKey = GetFastValue(config, 'dataKey', dataKey); + } + + var fileConfig = { + type: 'json', + cache: loader.cacheManager.json, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings, + config: dataKey + }; + + File.call(this, loader, fileConfig); + + if (IsPlainObject(url)) + { + // Object provided instead of a URL, so no need to actually load it (populate data with value) + if (dataKey) + { + this.data = GetValue(url, dataKey); + } + else + { + this.data = url; + } + + this.state = CONST.FILE_POPULATED; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.JSONFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + if (this.state !== CONST.FILE_POPULATED) + { + this.state = CONST.FILE_PROCESSING; + + var json = JSON.parse(this.xhrLoader.responseText); + + var key = this.config; + + if (typeof key === 'string') + { + this.data = GetValue(json, key, json); + } + else + { + this.data = json; + } + } + + this.onProcessComplete(); + } + +}); + +/** + * 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 () + * { + * this.load.json('wavedata', 'files/AlienWaveData.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global 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', + * url: 'files/AlienWaveData.json' + * }); + * ``` + * + * See the documentation for `Phaser.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 ... + * var data = this.cache.json.get('wavedata'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the JSON Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` 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 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": { + * "baddies": { + * "aliens": {}, + * "boss": {} + * } + * }, + * "level2": {}, + * "level3": {} + * } + * ``` + * + * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. + * + * Note: The ability to load this type of file will only be available if the JSON 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#json + * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig|Phaser.Loader.FileTypes.JSONFileConfig[])} 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 {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + * @param {XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + * + * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + */ +FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) +{ + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object + this.addFile(new JSONFile(this, key[i])); + } + } + else + { + this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); + } + + return this; +}); + +module.exports = JSONFile; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Tests if the start and end indexes are a safe range for the given array. + * + * @function Phaser.Utils.Array.SafeRange + * @since 3.4.0 + * + * @param {array} array - The array to check. + * @param {integer} startIndex - The start index. + * @param {integer} endIndex - The end index. + * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. + * + * @return {boolean} True if the range is safe, otherwise false. + */ +var SafeRange = function (array, startIndex, endIndex, throwError) +{ + var len = array.length; + + if (startIndex < 0 || + startIndex > len || + startIndex >= endIndex || + endIndex > len || + startIndex + endIndex > len) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var GetColor = __webpack_require__(159); +var GetColor32 = __webpack_require__(288); + +/** + * @classdesc + * The Color class holds a single color value and allows for easy modification and reading of it. + * + * @class Color + * @memberOf Phaser.Display + * @constructor + * @since 3.0.0 + * + * @param {integer} [red=0] - The red color value. A number between 0 and 255. + * @param {integer} [green=0] - The green color value. A number between 0 and 255. + * @param {integer} [blue=0] - The blue color value. A number between 0 and 255. + * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. + */ +var Color = new Class({ + + initialize: + + function Color (red, green, blue, alpha) + { + if (red === undefined) { red = 0; } + if (green === undefined) { green = 0; } + if (blue === undefined) { blue = 0; } + if (alpha === undefined) { alpha = 255; } + + /** + * The internal red color value. + * + * @name Phaser.Display.Color#r + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.r = 0; + + /** + * The internal green color value. + * + * @name Phaser.Display.Color#g + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.g = 0; + + /** + * The internal blue color value. + * + * @name Phaser.Display.Color#b + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.b = 0; + + /** + * The internal alpha color value. + * + * @name Phaser.Display.Color#a + * @type {number} + * @private + * @default 255 + * @since 3.0.0 + */ + this.a = 255; + + /** + * An array containing the calculated color values for WebGL use. + * + * @name Phaser.Display.Color#gl + * @type {number[]} + * @since 3.0.0 + */ + this.gl = [ 0, 0, 0, 1 ]; + + /** + * Pre-calculated internal color value. + * + * @name Phaser.Display.Color#_color + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._color = 0; + + /** + * Pre-calculated internal color32 value. + * + * @name Phaser.Display.Color#_color32 + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._color32 = 0; + + /** + * Pre-calculated internal color rgb string value. + * + * @name Phaser.Display.Color#_rgba + * @type {string} + * @private + * @default '' + * @since 3.0.0 + */ + this._rgba = ''; + + this.setTo(red, green, blue, alpha); + }, + + /** + * Sets this color to be transparent. Sets all values to zero. + * + * @method Phaser.Display.Color#transparent + * @since 3.0.0 + * + * @return {Phaser.Display.Color} This Color object. + */ + transparent: function () + { + this.red = 0; + this.green = 0; + this.blue = 0; + this.alpha = 0; + + return this.update(); + }, + + /** + * Sets the color of this Color component. + * + * @method Phaser.Display.Color#setTo + * @since 3.0.0 + * + * @param {integer} red - The red color value. A number between 0 and 255. + * @param {integer} green - The green color value. A number between 0 and 255. + * @param {integer} blue - The blue color value. A number between 0 and 255. + * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. + * + * @return {Phaser.Display.Color} This Color object. + */ + setTo: function (red, green, blue, alpha) + { + if (alpha === undefined) { alpha = 255; } + + this.red = red; + this.green = green; + this.blue = blue; + this.alpha = alpha; + + return this.update(); + }, + + /** + * Sets the red, green, blue and alpha GL values of this Color component. + * + * @method Phaser.Display.Color#setGLTo + * @since 3.0.0 + * + * @param {number} red - The red color value. A number between 0 and 1. + * @param {number} green - The green color value. A number between 0 and 1. + * @param {number} blue - The blue color value. A number between 0 and 1. + * @param {number} [alpha=1] - The alpha value. A number between 0 and 1. + * + * @return {Phaser.Display.Color} This Color object. + */ + setGLTo: function (red, green, blue, alpha) + { + if (alpha === undefined) { alpha = 1; } + + this.redGL = red; + this.greenGL = green; + this.blueGL = blue; + this.alphaGL = alpha; + + return this.update(); + }, + + /** + * Sets the color based on the color object given. + * + * @method Phaser.Display.Color#setFromRGB + * @since 3.0.0 + * + * @param {InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255. + * + * @return {Phaser.Display.Color} This Color object. + */ + setFromRGB: function (color) + { + this.red = color.r; + this.green = color.g; + this.blue = color.b; + + if (color.hasOwnProperty('a')) + { + this.alpha = color.a; + } + + return this.update(); + }, + + /** + * Updates the internal cache values. + * + * @method Phaser.Display.Color#update + * @since 3.0.0 + * + * @return {Phaser.Display.Color} This Color object. + */ + update: function () + { + this._color = GetColor(this.r, this.g, this.b); + this._color32 = GetColor32(this.r, this.g, this.b, this.a); + this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (this.a / 255) + ')'; + + return this; + }, + + /** + * Returns a new Color component using the values from this one. + * + * @method Phaser.Display.Color#clone + * @since 3.0.0 + * + * @return {Phaser.Display.Color} A new Color object. + */ + clone: function () + { + return new Color(this.r, this.g, this.b, this.a); + }, + + /** + * The color of this Color component, not including the alpha channel. + * + * @name Phaser.Display.Color#color + * @type {number} + * @readOnly + * @since 3.0.0 + */ + color: { + + get: function () + { + return this._color; + } + + }, + + /** + * The color of this Color component, including the alpha channel. + * + * @name Phaser.Display.Color#color32 + * @type {number} + * @readOnly + * @since 3.0.0 + */ + color32: { + + get: function () + { + return this._color32; + } + + }, + + /** + * The color of this Color component as a string which can be used in CSS color values. + * + * @name Phaser.Display.Color#rgba + * @type {string} + * @readOnly + * @since 3.0.0 + */ + rgba: { + + get: function () + { + return this._rgba; + } + + }, + + /** + * The red color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#redGL + * @type {number} + * @since 3.0.0 + */ + redGL: { + + get: function () + { + return this.gl[0]; + }, + + set: function (value) + { + this.gl[0] = Math.min(Math.abs(value), 1); + + this.r = Math.floor(this.gl[0] * 255); + + this.update(); + } + + }, + + /** + * The green color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#greenGL + * @type {number} + * @since 3.0.0 + */ + greenGL: { + + get: function () + { + return this.gl[1]; + }, + + set: function (value) + { + this.gl[1] = Math.min(Math.abs(value), 1); + + this.g = Math.floor(this.gl[1] * 255); + + this.update(); + } + + }, + + /** + * The blue color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#blueGL + * @type {number} + * @since 3.0.0 + */ + blueGL: { + + get: function () + { + return this.gl[2]; + }, + + set: function (value) + { + this.gl[2] = Math.min(Math.abs(value), 1); + + this.b = Math.floor(this.gl[2] * 255); + + this.update(); + } + + }, + + /** + * The alpha color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#alphaGL + * @type {number} + * @since 3.0.0 + */ + alphaGL: { + + get: function () + { + return this.gl[3]; + }, + + set: function (value) + { + this.gl[3] = Math.min(Math.abs(value), 1); + + this.a = Math.floor(this.gl[3] * 255); + + this.update(); + } + + }, + + /** + * The red color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#red + * @type {number} + * @since 3.0.0 + */ + red: { + + get: function () + { + return this.r; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.r = Math.min(value, 255); + + this.gl[0] = value / 255; + + this.update(); + } + + }, + + /** + * The green color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#green + * @type {number} + * @since 3.0.0 + */ + green: { + + get: function () + { + return this.g; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.g = Math.min(value, 255); + + this.gl[1] = value / 255; + + this.update(); + } + + }, + + /** + * The blue color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#blue + * @type {number} + * @since 3.0.0 + */ + blue: { + + get: function () + { + return this.b; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.b = Math.min(value, 255); + + this.gl[2] = value / 255; + + this.update(); + } + + }, + + /** + * The alpha color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this.a; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.a = Math.min(value, 255); + + this.gl[3] = value / 255; + + this.update(); + } + + } + +}); + +module.exports = Color; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {boolean} [description] + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + /***/ }), /* 33 */ /***/ (function(module, exports) { @@ -6799,9 +6814,9 @@ module.exports = Clone; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); -var SpriteRender = __webpack_require__(529); +var SpriteRender = __webpack_require__(534); /** * @classdesc @@ -7945,7 +7960,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(510))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(515))) /***/ }), /* 58 */ @@ -8927,7 +8942,7 @@ module.exports = GetBoolean; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * [description] @@ -9027,10 +9042,10 @@ module.exports = FromPercent; var Class = __webpack_require__(0); var Contains = __webpack_require__(61); -var GetPoint = __webpack_require__(233); -var GetPoints = __webpack_require__(232); -var Line = __webpack_require__(97); -var Random = __webpack_require__(160); +var GetPoint = __webpack_require__(235); +var GetPoints = __webpack_require__(234); +var Line = __webpack_require__(98); +var Random = __webpack_require__(161); /** * @classdesc @@ -9461,7 +9476,7 @@ module.exports = Triangle; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var ImageRender = __webpack_require__(432); @@ -10029,17 +10044,17 @@ module.exports = Length; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); -var GetProps = __webpack_require__(170); -var GetTargets = __webpack_require__(103); +var GetProps = __webpack_require__(171); +var GetTargets = __webpack_require__(104); var GetValue = __webpack_require__(3); -var GetValueOp = __webpack_require__(102); -var Tween = __webpack_require__(100); -var TweenData = __webpack_require__(99); +var GetValueOp = __webpack_require__(103); +var Tween = __webpack_require__(101); +var TweenData = __webpack_require__(100); /** * [description] @@ -10412,8 +10427,8 @@ module.exports = InputPluginCache; // Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. -var CheckMatrix = __webpack_require__(119); -var TransposeMatrix = __webpack_require__(188); +var CheckMatrix = __webpack_require__(120); +var TransposeMatrix = __webpack_require__(189); /** * [description] @@ -12087,6 +12102,1817 @@ module.exports = AddToDOM; /* 88 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Components = __webpack_require__(13); +var DegToRad = __webpack_require__(39); +var EventEmitter = __webpack_require__(8); +var Rectangle = __webpack_require__(11); +var TransformMatrix = __webpack_require__(27); +var ValueToColor = __webpack_require__(134); +var Vector2 = __webpack_require__(4); + +/** + * @typedef {object} JSONCameraBounds + * @property {number} x - The horizontal position of camera + * @property {number} y - The vertical position of camera + * @property {number} width - The width size of camera + * @property {number} height - The height size of camera + */ + +/** + * @typedef {object} JSONCamera + * + * @property {string} name - The name of the camera + * @property {number} x - The horizontal position of camera + * @property {number} y - The vertical position of camera + * @property {number} width - The width size of camera + * @property {number} height - The height size of camera + * @property {number} zoom - The zoom of camera + * @property {number} rotation - The rotation of camera + * @property {boolean} roundPixels - The round pixels st status of camera + * @property {number} scrollX - The horizontal scroll of camera + * @property {number} scrollY - The vertical scroll of camera + * @property {string} backgroundColor - The background color of camera + * @property {(JSONCameraBounds|undefined)} [bounds] - The bounds of camera + */ + +/** + * @classdesc + * A Base Camera class. + * + * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, + * and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. + * + * The Base Camera is extended by the Camera class, which adds in special effects including Fade, + * Flash and Camera Shake, as well as the ability to follow Game Objects. + * + * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow + * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate + * to when they were added to the Camera class. + * + * @class BaseCamera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.12.0 + * + * @extends Phaser.Events.EventEmitter + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.Visible + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var BaseCamera = new Class({ + + Extends: EventEmitter, + + Mixins: [ + Components.Alpha, + Components.Visible + ], + + initialize: + + function BaseCamera (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + EventEmitter.call(this); + + /** + * A reference to the Scene this camera belongs to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene; + + /** + * A reference to the Game Scene Manager. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager + * @type {Phaser.Scenes.SceneManager} + * @since 3.12.0 + */ + this.sceneManager; + + /** + * A reference to the Game Config. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#config + * @type {object} + * @readOnly + * @since 3.12.0 + */ + this.config; + + /** + * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion. + * This value is a bitmask. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#id + * @type {integer} + * @readOnly + * @since 3.11.0 + */ + this.id = 0; + + /** + * The name of the Camera. This is left empty for your own use. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The resolution of the Game, used in most Camera calculations. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#resolution + * @type {number} + * @readOnly + * @since 3.12.0 + */ + this.resolution = 1; + + /** + * Should this camera round its pixel values to integers? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.roundPixels = false; + + /** + * Is this Camera visible or not? + * + * A visible camera will render and perform input tests. + * An invisible camera will not render anything and will skip input tests. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#visible + * @type {boolean} + * @default true + * @since 3.10.0 + this.visible = true; + */ + + /** + * Is this Camera using a bounds to restrict scrolling movement? + * + * Set this property along with the bounds via `Camera.setBounds`. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.useBounds = false; + + /** + * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at. + * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. + * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. + * You can use it for culling or intersection checks. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#worldView + * @type {Phaser.Geom.Rectangle} + * @readOnly + * @since 3.11.0 + */ + this.worldView = new Rectangle(); + + /** + * Is this Camera dirty? + * + * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. + * + * This flag is cleared during the `postRenderCamera` method of the renderer. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#dirty + * @type {boolean} + * @default true + * @since 3.11.0 + */ + this.dirty = true; + + /** + * The x position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollX` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#x + * @type {number} + * @private + * @since 3.0.0 + */ + this._x = x; + + /** + * The y position of the Camera, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollY` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#y + * @type {number} + * @private + * @since 3.0.0 + */ + this._y = y; + + /** + * Internal Camera X value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cx + * @type {number} + * @private + * @since 3.12.0 + */ + this._cx = 0; + + /** + * Internal Camera Y value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cy + * @type {number} + * @private + * @since 3.12.0 + */ + this._cy = 0; + + /** + * Internal Camera Width value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cw + * @type {number} + * @private + * @since 3.12.0 + */ + this._cw = 0; + + /** + * Internal Camera Height value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_ch + * @type {number} + * @private + * @since 3.12.0 + */ + this._ch = 0; + + /** + * The width of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_width + * @type {number} + * @private + * @since 3.11.0 + */ + this._width = width; + + /** + * The height of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_height + * @type {number} + * @private + * @since 3.11.0 + */ + this._height = height; + + /** + * The bounds the camera is restrained to during scrolling. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds + * @type {Phaser.Geom.Rectangle} + * @private + * @since 3.0.0 + */ + this._bounds = new Rectangle(); + + /** + * The horizontal scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._scrollX = 0; + + /** + * The vertical scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._scrollY = 0; + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * + * A value of 0.5 would zoom the Camera out, so you can now see twice as much + * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel + * now takes up 2 pixels when rendered. + * + * Set to 1 to return to the default zoom level. + * + * Be careful to never set this value to zero. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom + * @type {number} + * @private + * @default 1 + * @since 3.11.0 + */ + this._zoom = 1; + + /** + * The rotation of the Camera in radians. + * + * 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. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._rotation = 0; + + /** + * A local transform matrix used for internal calculations. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#matrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @private + * @since 3.0.0 + */ + this.matrix = new TransformMatrix(); + + /** + * Does this Camera have a transparent background? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#transparent + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.transparent = true; + + /** + * The background color of this Camera. Only used if `transparent` is `false`. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor + * @type {Phaser.Display.Color} + * @since 3.0.0 + */ + this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); + + /** + * The Camera alpha value. Setting this property impacts every single object that this Camera + * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out, + * or via the chainable `setAlpha` method instead. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#alpha + * @type {number} + * @default 1 + * @since 3.11.0 + this.alpha = 1; + */ + + /** + * Should the camera cull Game Objects before checking them for input hit tests? + * In some special cases it may be beneficial to disable this. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.disableCull = false; + + /** + * A temporary array of culled objects. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects + * @type {Phaser.GameObjects.GameObject[]} + * @default [] + * @private + * @since 3.0.0 + */ + this.culledObjects = []; + + /** + * The mid-point of the Camera in 'world' coordinates. + * + * Use it to obtain exactly where in the world the center of the camera is currently looking. + * + * This value is updated in the preRender method, after the scroll values and follower + * have been processed. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint + * @type {Phaser.Math.Vector2} + * @readOnly + * @since 3.11.0 + */ + this.midPoint = new Vector2(width / 2, height / 2); + + /** + * The horizontal origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#originX + * @type {number} + * @default 0.5 + * @since 3.11.0 + */ + this.originX = 0.5; + + /** + * The vertical origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#originY + * @type {number} + * @default 0.5 + * @since 3.11.0 + */ + this.originY = 0.5; + + /** + * Does this Camera have a custom viewport? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport + * @type {boolean} + * @private + * @default false + * @since 3.12.0 + */ + this._customViewport = false; + }, + + /** + * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha + * @since 3.11.0 + * + * @param {number} [value=1] - The Camera alpha value. + * + * @return {this} This Camera instance. + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + */ + + /** + * Sets the rotation origin of this Camera. + * + * The values are given in the range 0 to 1 and are only used when calculating Camera rotation. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin + * @since 3.11.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Camera instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this; + }, + + /** + * Calculates what the Camera.scrollX and scrollY values would need to be in order to move + * the Camera so it is centered on the given x and y coordinates, without actually moving + * the Camera there. The results are clamped based on the Camera bounds, if set. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll + * @since 3.11.0 + * + * @param {number} x - The horizontal coordinate to center on. + * @param {number} y - The vertical coordinate to center on. + * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. + * + * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` abd `y` properties. + */ + getScroll: function (x, y, out) + { + if (out === undefined) { out = new Vector2(); } + + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + out.x = x - originX; + out.y = y - originY; + + if (this.useBounds) + { + out.x = this.clampX(out.x); + out.y = this.clampY(out.y); + } + + return out; + }, + + /** + * Moves the Camera so that it is centered on the given coordinates, bounds allowing. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn + * @since 3.11.0 + * + * @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. + */ + centerOn: function (x, y) + { + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + this.midPoint.set(x, y); + + this.scrollX = x - originX; + this.scrollY = y - originY; + + if (this.useBounds) + { + this.scrollX = this.clampX(this.scrollX); + this.scrollY = this.clampY(this.scrollY); + } + + return this; + }, + + /** + * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + centerToBounds: function () + { + if (this.useBounds) + { + var bounds = this._bounds; + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + this.midPoint.set(bounds.centerX, bounds.centerY); + + this.scrollX = bounds.centerX - originX; + this.scrollY = bounds.centerY - originY; + } + + return this; + }, + + /** + * Moves the Camera so that it is re-centered based on its viewport size. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + centerToSize: function () + { + this.scrollX = this.width * 0.5; + this.scrollY = this.height * 0.5; + + return this; + }, + + /** + * Takes an array of Game Objects and returns a new array featuring only those objects + * visible by this camera. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#cull + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return] + * + * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull. + * + * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera. + */ + cull: function (renderableObjects) + { + if (this.disableCull) + { + return renderableObjects; + } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return renderableObjects; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var culledObjects = this.culledObjects; + var length = renderableObjects.length; + + determinant = 1 / determinant; + + culledObjects.length = 0; + + for (var index = 0; index < length; ++index) + { + var object = renderableObjects[index]; + + if (!object.hasOwnProperty('width') || object.parentContainer) + { + culledObjects.push(object); + continue; + } + + var objectW = object.width; + var objectH = object.height; + var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); + var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); + var tx = (objectX * mva + objectY * mvc + mve); + var ty = (objectX * mvb + objectY * mvd + mvf); + var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); + var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); + var cullW = cameraW + objectW; + var cullH = cameraH + objectH; + + if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && + tw > -objectW && th > -objectH && tw < cullW && th < cullH) + { + culledObjects.push(object); + } + } + + return culledObjects; + }, + + /** + * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform. + * You can optionally provide a Vector2, or similar object, to store the results in. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {number} x - The x position to convert to world space. + * @param {number} y - The y position to convert to world space. + * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties. + */ + getWorldPoint: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + output.x = x; + output.y = y; + + return output; + } + + determinant = 1 / determinant; + + var ima = mvd * determinant; + var imb = -mvb * determinant; + var imc = -mvc * determinant; + var imd = mva * determinant; + var ime = (mvc * mvf - mvd * mve) * determinant; + var imf = (mvb * mve - mva * mvf) * determinant; + + var c = Math.cos(this.rotation); + var s = Math.sin(this.rotation); + + var zoom = this.zoom; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + + var res = this.resolution; + + var sx = x * res + ((scrollX * c - scrollY * s) * zoom); + var sy = y * res + ((scrollX * s + scrollY * c) * zoom); + + /* Apply transform to point */ + output.x = (sx * ima + sy * imc + ime); + output.y = (sx * imb + sy * imd + imf); + + return output; + }, + + /** + * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings + * so that they are ignored by this Camera. This means they will not be rendered by this Camera. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#ignore + * @since 3.0.0 + * + * @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. + */ + ignore: function (entries) + { + var id = this.id; + + if (!Array.isArray(entries)) + { + entries = [ entries ]; + } + + for (var i = 0; i < entries.length; i++) + { + var entry = entries[i]; + + if (Array.isArray(entry)) + { + this.ignore(entry); + } + else if (entry.isParent) + { + this.ignore(entry.getChildren()); + } + else + { + entry.cameraFilter |= id; + } + } + + return this; + }, + + /** + * Internal preRender step. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#preRender + * @protected + * @since 3.0.0 + * + * @param {number} baseScale - The base scale, as set in the Camera Manager. + * @param {number} resolution - The game resolution. + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + + var halfWidth = width * 0.5; + var halfHeight = height * 0.5; + + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + + var originX = width * this.originX; + var originY = height * this.originY; + + var sx = this.scrollX; + var sy = this.scrollY; + + if (this.useBounds) + { + sx = this.clampX(sx); + sy = this.clampY(sy); + } + + if (this.roundPixels) + { + originX = Math.round(originX); + originY = Math.round(originY); + } + + // Values are in pixels and not impacted by zooming the Camera + this.scrollX = sx; + this.scrollY = sy; + + var midX = sx + halfWidth; + var midY = sy + halfHeight; + + // The center of the camera, in world space, so taking zoom into account + // Basically the pixel value of what it's looking at in the middle of the cam + this.midPoint.set(midX, midY); + + var displayWidth = width / zoom; + var displayHeight = height / zoom; + + this.worldView.setTo( + midX - (displayWidth / 2), + midY - (displayHeight / 2), + displayWidth, + displayHeight + ); + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + }, + + /** + * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#clampX + * @since 3.11.0 + * + * @param {number} x - The value to horizontally scroll clamp. + * + * @return {number} The adjusted value to use as scrollX. + */ + clampX: function (x) + { + var bounds = this._bounds; + + var dw = this.displayWidth; + + var bx = bounds.x + ((dw - this.width) / 2); + var bw = Math.max(bx, bx + bounds.width - dw); + + if (x < bx) + { + x = bx; + } + else if (x > bw) + { + x = bw; + } + + return x; + }, + + /** + * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#clampY + * @since 3.11.0 + * + * @param {number} y - The value to vertically scroll clamp. + * + * @return {number} The adjusted value to use as scrollY. + */ + clampY: function (y) + { + var bounds = this._bounds; + + var dh = this.displayHeight; + + var by = bounds.y + ((dh - this.height) / 2); + var bh = Math.max(by, by + bounds.height - dh); + + if (y < by) + { + y = by; + } + else if (y > bh) + { + y = bh; + } + + return y; + }, + + /* + var gap = this._zoomInversed; + return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap); + */ + + /** + * If this Camera has previously had movement bounds set on it, this will remove them. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + removeBounds: function () + { + this.useBounds = false; + + this.dirty = true; + + this._bounds.setEmpty(); + + return this; + }, + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle + * @since 3.0.0 + * + * @param {number} [value=0] - The cameras angle of rotation, given in degrees. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setAngle: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = DegToRad(value); + + return this; + }, + + /** + * Sets the background color for this Camera. + * + * By default a Camera has a transparent background but it can be given a solid color, with any level + * of transparency, via this method. + * + * The color value can be specified using CSS color notation, hex or numbers. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor + * @since 3.0.0 + * + * @param {(string|number|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. + */ + setBackgroundColor: function (color) + { + if (color === undefined) { color = 'rgba(0,0,0,0)'; } + + this.backgroundColor = ValueToColor(color); + + this.transparent = (this.backgroundColor.alpha === 0); + + return this; + }, + + /** + * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. + * + * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the + * edges and into blank space. It does not limit the placement of Game Objects, or where + * the Camera viewport can be positioned. + * + * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. + * + * Clear the bounds entirely by calling `Camera.removeBounds`. + * + * If you set bounds that are smaller than the viewport it will stop the Camera from being + * able to scroll. The bounds can be positioned where-ever you wish. By default they are from + * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of + * the Camera bounds. However, you can position them anywhere. So if you wanted a game world + * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y + * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find + * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds + * @since 3.0.0 + * + * @param {integer} x - The top-left x coordinate of the bounds. + * @param {integer} y - The top-left y coordinate of the bounds. + * @param {integer} width - The width of the bounds, in pixels. + * @param {integer} height - The height of the bounds, in pixels. + * @param {boolean} [centerOn] - If `true` the Camera will automatically be centered on the new bounds. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setBounds: function (x, y, width, height, centerOn) + { + this._bounds.setTo(x, y, width, height); + + this.dirty = true; + this.useBounds = true; + + if (centerOn) + { + this.centerToBounds(); + } + else + { + this.scrollX = this.clampX(this.scrollX); + this.scrollY = this.clampY(this.scrollY); + } + + return this; + }, + + /** + * Sets the name of this Camera. + * This value is for your own use and isn't used internally. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setName + * @since 3.0.0 + * + * @param {string} [value=''] - The name of the Camera. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setName: function (value) + { + if (value === undefined) { value = ''; } + + this.name = value; + + return this; + }, + + /** + * Set the position of the Camera viewport within the game. + * + * This does not change where the camera is 'looking'. See `setScroll` to control that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition + * @since 3.0.0 + * + * @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. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation + * @since 3.0.0 + * + * @param {number} [value=0] - The rotation of the Camera, in radians. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setRotation: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = value; + + return this; + }, + + /** + * Should the Camera round pixel values to whole integers when rendering Game Objects? + * + * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels + * @since 3.0.0 + * + * @param {boolean} value - `true` to round Camera pixels, `false` to not. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setRoundPixels: function (value) + { + this.roundPixels = value; + + return this; + }, + + /** + * Sets the Scene the Camera is bound to. + * + * Also populates the `resolution` property and updates the internal size values. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setScene + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene the camera is bound to. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setScene: function (scene) + { + this.scene = scene; + + this.config = scene.sys.game.config; + this.sceneManager = scene.sys.game.scene; + + var res = this.config.resolution; + + this.resolution = res; + + this._cx = this._x * res; + this._cy = this._y * res; + this._cw = this._width * res; + this._ch = this._height * res; + + return this; + }, + + /** + * Set the position of where the Camera is looking within the game. + * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. + * Use this method, or the scroll properties, to move your camera around the game world. + * + * This does not change where the camera viewport is placed. See `setPosition` to control that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll + * @since 3.0.0 + * + * @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. + */ + setScroll: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollX = x; + this.scrollY = y; + + return this; + }, + + /** + * Set the size of the Camera viewport. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setSize + * @since 3.0.0 + * + * @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. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * This method sets the position and size of the Camera viewport in a single call. + * + * If you're trying to change where the Camera is looking at in your game, then see + * the method `Camera.setScroll` instead. This method is for changing the viewport + * itself, not what the camera can see. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport + * @since 3.0.0 + * + * @param {number} x - The top-left x coordinate of the Camera viewport. + * @param {number} y - The top-left y coordinate of the Camera viewport. + * @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. + */ + setViewport: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Set the zoom value of the Camera. + * + * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. + * Changing to a larger value, such as 2, will cause the camera to 'zoom in'. + * + * A value of 1 means 'no zoom' and is the default. + * + * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom + * @since 3.0.0 + * + * @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. + */ + setZoom: function (value) + { + if (value === undefined) { value = 1; } + + if (value === 0) + { + value = 0.001; + } + + this.zoom = value; + + return this; + }, + + /** + * Sets the visibility of this Camera. + * + * An invisible Camera will skip rendering and input tests of everything it can see. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible + * @since 3.10.0 + * + * @param {boolean} value - The visible state of the Camera. + * + * @return {this} This Camera instance. + setVisible: function (value) + { + this.visible = value; + + return this; + }, + */ + + /** + * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON + * @since 3.0.0 + * + * @return {JSONCamera} A well-formed object suitable for conversion to JSON. + */ + toJSON: function () + { + var output = { + 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 + }; + + if (this.useBounds) + { + output['bounds'] = { + x: this._bounds.x, + y: this._bounds.y, + width: this._bounds.width, + height: this._bounds.height + }; + } + + return output; + }, + + /** + * Internal method called automatically by the Camera Manager. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#update + * @protected + * @since 3.0.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 () + { + // NOOP + }, + + /** + * Internal method called automatically when the viewport changes. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem + * @private + * @since 3.12.0 + */ + updateSystem: function () + { + if (!this.config) + { + return; + } + + var custom = false; + + if (this._x !== 0 || this._y !== 0) + { + custom = true; + } + else + { + var gameWidth = this.config.width; + var gameHeight = this.config.height; + + if (gameWidth !== this._width || gameHeight !== this._height) + { + custom = true; + } + } + + var sceneManager = this.sceneManager; + + if (custom && !this._customViewport) + { + // We need a custom viewport for this Camera + sceneManager.customViewports++; + } + else if (!custom && this._customViewport) + { + // We're turning off a custom viewport for this Camera + sceneManager.customViewports--; + } + + this.dirty = true; + this._customViewport = custom; + }, + + /** + * This event is fired when a camera is destroyed by the Camera Manager. + * + * @event CameraDestroyEvent + * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed. + */ + + /** + * Destroys this Camera instance. You rarely need to call this directly. + * + * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as + * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#destroy + * @fires CameraDestroyEvent + * @since 3.0.0 + */ + destroy: function () + { + this.emit('cameradestroy', this); + + this.removeAllListeners(); + + this.matrix.destroy(); + + this.culledObjects = []; + + if (this._customViewport) + { + // We're turning off a custom viewport for this Camera + this.sceneManager.customViewports--; + } + + this._bounds = null; + + this.scene = null; + this.config = null; + this.sceneManager = null; + }, + + /** + * The x position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollX` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#x + * @type {number} + * @since 3.0.0 + */ + x: { + + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + this._cx = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The y position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollY` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#y + * @type {number} + * @since 3.0.0 + */ + y: { + + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + this._cy = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The width of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#width + * @type {number} + * @since 3.0.0 + */ + width: { + + get: function () + { + return this._width; + }, + + set: function (value) + { + this._width = value; + this._cw = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The height of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#height + * @type {number} + * @since 3.0.0 + */ + height: { + + get: function () + { + return this._height; + }, + + set: function (value) + { + this._height = value; + this._ch = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The horizontal scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + scrollX: { + + get: function () + { + return this._scrollX; + }, + + set: function (value) + { + this._scrollX = value; + this.dirty = true; + } + + }, + + /** + * The vertical scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + scrollY: { + + get: function () + { + return this._scrollY; + }, + + set: function (value) + { + this._scrollY = value; + this.dirty = true; + } + + }, + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * + * A value of 0.5 would zoom the Camera out, so you can now see twice as much + * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel + * now takes up 2 pixels when rendered. + * + * Set to 1 to return to the default zoom level. + * + * Be careful to never set this value to zero. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#zoom + * @type {number} + * @default 1 + * @since 3.0.0 + */ + zoom: { + + get: function () + { + return this._zoom; + }, + + set: function (value) + { + this._zoom = value; + this.dirty = true; + } + + }, + + /** + * The rotation of the Camera in radians. + * + * 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. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#rotation + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + rotation: { + + get: function () + { + return this._rotation; + }, + + set: function (value) + { + this._rotation = value; + this.dirty = true; + } + + }, + + /** + * The x position of the center of the Camera's viewport, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#centerX + * @type {number} + * @readOnly + * @since 3.10.0 + */ + centerX: { + + get: function () + { + return this.x + (0.5 * this.width); + } + + }, + + /** + * The y position of the center of the Camera's viewport, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#centerY + * @type {number} + * @readOnly + * @since 3.10.0 + */ + centerY: { + + get: function () + { + return this.y + (0.5 * this.height); + } + + }, + + /** + * The displayed width of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width + * would be 1600, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a width of 800 and zoom of 2 would have a display width + * of 400 pixels. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth + * @type {number} + * @readOnly + * @since 3.11.0 + */ + displayWidth: { + + get: function () + { + return this.width / this.zoom; + } + + }, + + /** + * The displayed height of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height + * would be 1200, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a height of 600 and zoom of 2 would have a display height + * of 300 pixels. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight + * @type {number} + * @readOnly + * @since 3.11.0 + */ + displayHeight: { + + get: function () + { + return this.height / this.zoom; + } + + } + +}); + +module.exports = BaseCamera; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -12097,7 +13923,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(33); var GetPoint = __webpack_require__(301); var GetPoints = __webpack_require__(299); -var Random = __webpack_require__(164); +var Random = __webpack_require__(165); /** * @classdesc @@ -12447,11 +14273,11 @@ module.exports = Circle; /***/ }), -/* 89 */, /* 90 */, /* 91 */, /* 92 */, -/* 93 */ +/* 93 */, +/* 94 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13270,7 +15096,7 @@ module.exports = List; /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14084,7 +15910,7 @@ module.exports = Frame; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14126,7 +15952,7 @@ module.exports = Merge; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports) { /** @@ -14164,7 +15990,7 @@ module.exports = Shuffle; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14175,8 +16001,8 @@ module.exports = Shuffle; var Class = __webpack_require__(0); var GetPoint = __webpack_require__(296); -var GetPoints = __webpack_require__(163); -var Random = __webpack_require__(162); +var GetPoints = __webpack_require__(164); +var Random = __webpack_require__(163); var Vector2 = __webpack_require__(4); /** @@ -14489,7 +16315,7 @@ module.exports = Line; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -14517,7 +16343,7 @@ module.exports = Perimeter; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports) { /** @@ -14670,7 +16496,7 @@ module.exports = TweenData; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14680,7 +16506,7 @@ module.exports = TweenData; */ var Class = __webpack_require__(0); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); var TWEEN_CONST = __webpack_require__(62); @@ -16065,7 +17891,7 @@ module.exports = Tween; /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -16108,7 +17934,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -16281,7 +18107,7 @@ module.exports = GetValueOp; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16328,11 +18154,11 @@ module.exports = GetTargets; /***/ }), -/* 104 */, /* 105 */, /* 106 */, /* 107 */, -/* 108 */ +/* 108 */, +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16380,7 +18206,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports) { /** @@ -16421,7 +18247,7 @@ module.exports = GetURL; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -16898,7 +18724,7 @@ module.exports = KeyCodes; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16908,14 +18734,14 @@ module.exports = KeyCodes; */ var AddToDOM = __webpack_require__(85); -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); var GameObject = __webpack_require__(15); var GetTextSize = __webpack_require__(420); var GetValue = __webpack_require__(3); -var RemoveFromDOM = __webpack_require__(261); +var RemoveFromDOM = __webpack_require__(153); var TextRender = __webpack_require__(419); var TextStyle = __webpack_require__(416); @@ -18102,9 +19928,9 @@ module.exports = Text; /***/ }), -/* 112 */, /* 113 */, -/* 114 */ +/* 114 */, +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18146,7 +19972,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18157,8 +19983,8 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Contains = __webpack_require__(55); -var GetPoint = __webpack_require__(186); -var GetPoints = __webpack_require__(185); +var GetPoint = __webpack_require__(187); +var GetPoints = __webpack_require__(186); var Random = __webpack_require__(136); /** @@ -18514,7 +20340,7 @@ module.exports = Ellipse; /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -18557,7 +20383,7 @@ module.exports = { /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18566,11 +20392,11 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(126); +var BaseCamera = __webpack_require__(88); var Class = __webpack_require__(0); -var Commands = __webpack_require__(116); -var Components = __webpack_require__(14); -var Ellipse = __webpack_require__(244); +var Commands = __webpack_require__(117); +var Components = __webpack_require__(13); +var Ellipse = __webpack_require__(246); var GameObject = __webpack_require__(15); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); @@ -20052,6 +21878,7 @@ var Graphics = new Class({ generateTexture: function (key, width, height) { var sys = this.scene.sys; + var renderer = sys.game.renderer; if (width === undefined) { width = sys.game.config.width; } if (height === undefined) { height = sys.game.config.height; } @@ -20097,11 +21924,12 @@ var Graphics = new Class({ if (ctx) { - this.renderCanvas(sys.game.renderer, this, 0.0, Graphics.TargetCamera, null, ctx); + // var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip) + this.renderCanvas(renderer, this, 0, Graphics.TargetCamera, null, ctx, false); - if (sys.game.renderer.gl && texture) + if (renderer.gl && texture) { - texture.source[0].glTexture = sys.game.renderer.canvasToTexture(ctx.canvas, texture.source[0].glTexture); + texture.source[0].glTexture = renderer.canvasToTexture(ctx.canvas, texture.source[0].glTexture); } } @@ -20129,13 +21957,13 @@ var Graphics = new Class({ * @type {Phaser.Cameras.Scene2D.Camera} * @since 3.1.0 */ -Graphics.TargetCamera = new Camera(0, 0, 0, 0); +Graphics.TargetCamera = new BaseCamera(); module.exports = Graphics; /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -20219,7 +22047,7 @@ module.exports = SetTransform; /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -20277,7 +22105,7 @@ module.exports = CheckMatrix; /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20287,8 +22115,8 @@ module.exports = CheckMatrix; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(94); -var TextureSource = __webpack_require__(190); +var Frame = __webpack_require__(95); +var TextureSource = __webpack_require__(191); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -20749,7 +22577,7 @@ module.exports = Texture; /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20760,11 +22588,11 @@ module.exports = Texture; var Class = __webpack_require__(0); var CONST = __webpack_require__(80); -var DefaultPlugins = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(124); var GetPhysicsPlugins = __webpack_require__(490); var GetScenePlugins = __webpack_require__(489); var NOOP = __webpack_require__(2); -var Settings = __webpack_require__(199); +var Settings = __webpack_require__(200); /** * @classdesc @@ -21432,7 +23260,7 @@ module.exports = Systems; /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21443,7 +23271,7 @@ module.exports = Systems; var OS = __webpack_require__(57); var Browser = __webpack_require__(81); -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Determines the features of the browser running this Phaser Game instance. @@ -21629,7 +23457,7 @@ module.exports = init(); /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -21658,6 +23486,7 @@ var DefaultPlugins = { */ Global: [ + 'game', 'anims', 'cache', 'facebook', @@ -21724,7 +23553,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -21754,7 +23583,7 @@ module.exports = Linear; /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21763,18 +23592,18 @@ module.exports = Linear; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Back = __webpack_require__(282); -var Bounce = __webpack_require__(281); -var Circular = __webpack_require__(280); -var Cubic = __webpack_require__(279); -var Elastic = __webpack_require__(278); -var Expo = __webpack_require__(277); -var Linear = __webpack_require__(276); -var Quadratic = __webpack_require__(275); -var Quartic = __webpack_require__(274); -var Quintic = __webpack_require__(273); -var Sine = __webpack_require__(272); -var Stepped = __webpack_require__(271); +var Back = __webpack_require__(283); +var Bounce = __webpack_require__(282); +var Circular = __webpack_require__(281); +var Cubic = __webpack_require__(280); +var Elastic = __webpack_require__(279); +var Expo = __webpack_require__(278); +var Linear = __webpack_require__(277); +var Quadratic = __webpack_require__(276); +var Quartic = __webpack_require__(275); +var Quintic = __webpack_require__(274); +var Sine = __webpack_require__(273); +var Stepped = __webpack_require__(272); // EaseMap module.exports = { @@ -21834,732 +23663,6 @@ module.exports = { }; -/***/ }), -/* 126 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BaseCamera = __webpack_require__(289); -var CenterOn = __webpack_require__(157); -var Clamp = __webpack_require__(20); -var Class = __webpack_require__(0); -var Effects = __webpack_require__(210); -var Linear = __webpack_require__(124); -var Rectangle = __webpack_require__(11); -var Vector2 = __webpack_require__(4); - -/** - * @classdesc - * A Camera. - * - * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, - * and can be positioned, rotated, zoomed and scrolled accordingly. - * - * A Camera consists of two elements: The viewport and the scroll values. - * - * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are - * created the same size as your game, but their position and size can be set to anything. This means if you - * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, - * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). - * - * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this - * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the - * viewport, and changing the viewport has no impact on the scrolling. - * - * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, - * allowing you to filter Game Objects out on a per-Camera basis. - * - * A Camera also has built-in special effects including Fade, Flash and Camera Shake. - * - * @class Camera - * @extends Phaser.Cameras.Scene2D.BaseCamera - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.0.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var Camera = new Class({ - - Extends: BaseCamera, - - initialize: - - function Camera (x, y, width, height) - { - BaseCamera.call(this, x, y, width, height); - - /** - * Does this Camera allow the Game Objects it renders to receive input events? - * - * @name Phaser.Cameras.Scene2D.Camera#inputEnabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.inputEnabled = true; - - /** - * The Camera Fade effect handler. - * To fade this camera see the `Camera.fade` methods. - * - * @name Phaser.Cameras.Scene2D.Camera#fadeEffect - * @type {Phaser.Cameras.Scene2D.Effects.Fade} - * @since 3.5.0 - */ - this.fadeEffect = new Effects.Fade(this); - - /** - * The Camera Flash effect handler. - * To flash this camera see the `Camera.flash` method. - * - * @name Phaser.Cameras.Scene2D.Camera#flashEffect - * @type {Phaser.Cameras.Scene2D.Effects.Flash} - * @since 3.5.0 - */ - this.flashEffect = new Effects.Flash(this); - - /** - * The Camera Shake effect handler. - * To shake this camera see the `Camera.shake` method. - * - * @name Phaser.Cameras.Scene2D.Camera#shakeEffect - * @type {Phaser.Cameras.Scene2D.Effects.Shake} - * @since 3.5.0 - */ - this.shakeEffect = new Effects.Shake(this); - - /** - * The Camera Pan effect handler. - * To pan this camera see the `Camera.pan` method. - * - * @name Phaser.Cameras.Scene2D.Camera#panEffect - * @type {Phaser.Cameras.Scene2D.Effects.Pan} - * @since 3.11.0 - */ - this.panEffect = new Effects.Pan(this); - - /** - * The Camera Zoom effect handler. - * To zoom this camera see the `Camera.zoom` method. - * - * @name Phaser.Cameras.Scene2D.Camera#zoomEffect - * @type {Phaser.Cameras.Scene2D.Effects.Zoom} - * @since 3.11.0 - */ - this.zoomEffect = new Effects.Zoom(this); - - /** - * The linear interpolation value to use when following a target. - * - * Can also be set via `setLerp` or as part of the `startFollow` call. - * - * The default values of 1 means the camera will instantly snap to the target coordinates. - * A lower value, such as 0.1 means the camera will more slowly track the target, giving - * a smooth transition. You can set the horizontal and vertical values independently, and also - * adjust this value in real-time during your game. - * - * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. - * - * @name Phaser.Cameras.Scene2D.Camera#lerp - * @type {Phaser.Math.Vector2} - * @since 3.9.0 - */ - this.lerp = new Vector2(1, 1); - - /** - * The values stored in this property are subtracted from the Camera targets position, allowing you to - * offset the camera from the actual target x/y coordinates by this amount. - * Can also be set via `setFollowOffset` or as part of the `startFollow` call. - * - * @name Phaser.Cameras.Scene2D.Camera#followOffset - * @type {Phaser.Math.Vector2} - * @since 3.9.0 - */ - this.followOffset = new Vector2(); - - /** - * The Camera dead zone. - * - * The deadzone is only used when the camera is following a target. - * - * It defines a rectangular region within which if the target is present, the camera will not scroll. - * If the target moves outside of this area, the camera will begin scrolling in order to follow it. - * - * The `lerp` values that you can set for a follower target also apply when using a deadzone. - * - * You can directly set this property to be an instance of a Rectangle. Or, you can use the - * `setDeadzone` method for a chainable approach. - * - * The rectangle you provide can have its dimensions adjusted dynamically, however, please - * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point. - * - * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property - * to `null`. - * - * @name Phaser.Cameras.Scene2D.Camera#deadzone - * @type {?Phaser.Geom.Rectangle} - * @since 3.11.0 - */ - this.deadzone = null; - - /** - * Internal follow target reference. - * - * @name Phaser.Cameras.Scene2D.Camera#_follow - * @type {?any} - * @private - * @default null - * @since 3.0.0 - */ - this._follow = null; - }, - - /** - * Sets the Camera dead zone. - * - * The deadzone is only used when the camera is following a target. - * - * It defines a rectangular region within which if the target is present, the camera will not scroll. - * If the target moves outside of this area, the camera will begin scrolling in order to follow it. - * - * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point - * of the camera. This allows you to use the object for additional game related checks, such as - * testing if an object is within it or not via a Rectangle.contains call. - * - * The `lerp` values that you can set for a follower target also apply when using a deadzone. - * - * Calling this method with no arguments will reset an active deadzone. - * - * @method Phaser.Cameras.Scene2D.Camera#setDeadzone - * @since 3.11.0 - * - * @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. - */ - setDeadzone: function (width, height) - { - if (width === undefined) - { - this.deadzone = null; - } - else - { - if (this.deadzone) - { - this.deadzone.width = width; - this.deadzone.height = height; - } - else - { - this.deadzone = new Rectangle(0, 0, width, height); - } - - if (this._follow) - { - var originX = this.width / 2; - var originY = this.height / 2; - - var fx = this._follow.x - this.followOffset.x; - var fy = this._follow.y - this.followOffset.y; - - this.midPoint.set(fx, fy); - - this.scrollX = fx - originX; - this.scrollY = fy - originY; - } - - CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y); - } - - return this; - }, - - /** - * Fades the Camera in from the given color over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeIn - * @since 3.3.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeIn: function (duration, red, green, blue, callback, context) - { - return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context); - }, - - /** - * Fades the Camera out to the given color over the duration specified. - * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeOut - * @since 3.3.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeOut: function (duration, red, green, blue, callback, context) - { - return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context); - }, - - /** - * Fades the Camera from the given color to transparent over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeFrom - * @since 3.5.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeFrom: function (duration, red, green, blue, force, callback, context) - { - return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context); - }, - - /** - * Fades the Camera from transparent to the given color over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fade - * @since 3.0.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fade: function (duration, red, green, blue, force, callback, context) - { - return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context); - }, - - /** - * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#flash - * @since 3.0.0 - * - * @param {integer} [duration=250] - The duration of the effect in milliseconds. - * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - flash: function (duration, red, green, blue, force, callback, context) - { - return this.flashEffect.start(duration, red, green, blue, force, callback, context); - }, - - /** - * Shakes the Camera by the given intensity over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#shake - * @since 3.0.0 - * - * @param {integer} [duration=100] - The duration of the effect in milliseconds. - * @param {number} [intensity=0.05] - The intensity of the shake. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - shake: function (duration, intensity, force, callback, context) - { - return this.shakeEffect.start(duration, intensity, force, callback, context); - }, - - /** - * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, - * over the duration and with the ease specified. - * - * @method Phaser.Cameras.Scene2D.Camera#pan - * @since 3.11.0 - * - * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to. - * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to. - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {CameraPanCallback} [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} 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 zoom the Camera to the given scale, over the duration and with the ease specified. - * - * @method Phaser.Cameras.Scene2D.Camera#zoomTo - * @since 3.11.0 - * - * @param {number} zoom - The target Camera zoom value. - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {CameraPanCallback} [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} This Camera instance. - */ - zoomTo: function (zoom, duration, ease, force, callback, context) - { - return this.zoomEffect.start(zoom, duration, ease, force, callback, context); - }, - - /** - * Internal preRender step. - * - * @method Phaser.Cameras.Scene2D.Camera#preRender - * @protected - * @since 3.0.0 - * - * @param {number} baseScale - The base scale, as set in the Camera Manager. - * @param {number} resolution - The game resolution. - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - - var halfWidth = width * 0.5; - var halfHeight = height * 0.5; - - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - - var originX = width * this.originX; - var originY = height * this.originY; - - var follow = this._follow; - var deadzone = this.deadzone; - - var sx = this.scrollX; - var sy = this.scrollY; - - if (deadzone) - { - CenterOn(deadzone, this.midPoint.x, this.midPoint.y); - } - - if (follow) - { - var fx = (follow.x - this.followOffset.x); - var fy = (follow.y - this.followOffset.y); - - if (deadzone) - { - if (fx < deadzone.x) - { - sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x); - } - else if (fx > deadzone.right) - { - sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x); - } - - if (fy < deadzone.y) - { - sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y); - } - else if (fy > deadzone.bottom) - { - sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y); - } - } - else - { - sx = Linear(sx, fx - originX, this.lerp.x); - sy = Linear(sy, fy - originY, this.lerp.y); - } - } - - if (this.useBounds) - { - sx = this.clampX(sx); - sy = this.clampY(sy); - } - - if (this.roundPixels) - { - originX = Math.round(originX); - originY = Math.round(originY); - } - - // Values are in pixels and not impacted by zooming the Camera - this.scrollX = sx; - this.scrollY = sy; - - var midX = sx + halfWidth; - var midY = sy + halfHeight; - - // The center of the camera, in world space, so taking zoom into account - // Basically the pixel value of what it's looking at in the middle of the cam - this.midPoint.set(midX, midY); - - var displayWidth = width / zoom; - var displayHeight = height / zoom; - - this.worldView.setTo( - midX - (displayWidth / 2), - midY - (displayHeight / 2), - displayWidth, - displayHeight - ); - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - - this.shakeEffect.preRender(); - }, - - /** - * Sets the linear interpolation value to use when following a target. - * - * The default values of 1 means the camera will instantly snap to the target coordinates. - * A lower value, such as 0.1 means the camera will more slowly track the target, giving - * a smooth transition. You can set the horizontal and vertical values independently, and also - * adjust this value in real-time during your game. - * - * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. - * - * @method Phaser.Cameras.Scene2D.Camera#setLerp - * @since 3.9.0 - * - * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target. - * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target. - * - * @return {this} This Camera instance. - */ - setLerp: function (x, y) - { - if (x === undefined) { x = 1; } - if (y === undefined) { y = x; } - - this.lerp.set(x, y); - - return this; - }, - - /** - * Sets the horizontal and vertical offset of the camera from its follow target. - * The values are subtracted from the targets position during the Cameras update step. - * - * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset - * @since 3.9.0 - * - * @param {number} [x=0] - The horizontal offset from the camera follow target.x position. - * @param {number} [y=0] - The vertical offset from the camera follow target.y position. - * - * @return {this} This Camera instance. - */ - setFollowOffset: function (x, y) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - - this.followOffset.set(x, y); - - return this; - }, - - /** - * Sets the Camera to follow a Game Object. - * - * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object - * in its center. - * - * You can set the linear interpolation value used in the follow code. - * Use low lerp values (such as 0.1) to automatically smooth the camera motion. - * - * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel - * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to - * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom - * value on the camera. So be sure to keep the camera zoom to integers. - * - * @method Phaser.Cameras.Scene2D.Camera#startFollow - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow. - * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering? - * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. - * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. - * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position. - * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position. - * - * @return {this} This Camera instance. - */ - startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY) - { - if (roundPixels === undefined) { roundPixels = false; } - if (lerpX === undefined) { lerpX = 1; } - if (lerpY === undefined) { lerpY = lerpX; } - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = offsetX; } - - this._follow = target; - - this.roundPixels = roundPixels; - - lerpX = Clamp(lerpX, 0, 1); - lerpY = Clamp(lerpY, 0, 1); - - this.lerp.set(lerpX, lerpY); - - this.followOffset.set(offsetX, offsetY); - - var originX = this.width / 2; - var originY = this.height / 2; - - var fx = target.x - offsetX; - var fy = target.y - offsetY; - - this.midPoint.set(fx, fy); - - this.scrollX = fx - originX; - this.scrollY = fy - originY; - - return this; - }, - - /** - * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`. - * - * @method Phaser.Cameras.Scene2D.Camera#stopFollow - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - stopFollow: function () - { - this._follow = null; - - return this; - }, - - /** - * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to - * remove the fade. - * - * @method Phaser.Cameras.Scene2D.Camera#resetFX - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - resetFX: function () - { - this.panEffect.reset(); - this.shakeEffect.reset(); - this.flashEffect.reset(); - this.fadeEffect.reset(); - - return this; - }, - - /** - * Internal method called automatically by the Camera Manager. - * - * @method Phaser.Cameras.Scene2D.Camera#update - * @protected - * @since 3.0.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.visible) - { - this.panEffect.update(time, delta); - this.zoomEffect.update(time, delta); - this.shakeEffect.update(time, delta); - this.flashEffect.update(time, delta); - this.fadeEffect.update(time, delta); - } - }, - - /** - * Destroys this Camera instance. You rarely need to call this directly. - * - * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as - * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. - * - * @method Phaser.Cameras.Scene2D.Camera#destroy - * @fires CameraDestroyEvent - * @since 3.0.0 - */ - destroy: function () - { - BaseCamera.prototype.destroy.call(this); - - this.resetFX(); - - this._follow = null; - this.deadzone = null; - } - -}); - -module.exports = Camera; - - /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { @@ -23033,12 +24136,12 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(253); +var Earcut = __webpack_require__(255); var GetFastValue = __webpack_require__(1); -var ModelViewProjection = __webpack_require__(499); -var ShaderSourceFS = __webpack_require__(498); -var ShaderSourceVS = __webpack_require__(497); -var TransformMatrix = __webpack_require__(32); +var ModelViewProjection = __webpack_require__(500); +var ShaderSourceFS = __webpack_require__(499); +var ShaderSourceVS = __webpack_require__(498); +var TransformMatrix = __webpack_require__(27); var Utils = __webpack_require__(21); var WebGLPipeline = __webpack_require__(132); @@ -24828,6 +25931,7 @@ var WebGLPipeline = new Class({ setFloat1: function (name, x) { this.renderer.setFloat1(this.program, name, x); + return this; }, @@ -24845,8 +25949,8 @@ var WebGLPipeline = new Class({ */ setFloat2: function (name, x, y) { - this.renderer.setFloat2(this.program, name, x, y); + return this; }, @@ -24865,8 +25969,8 @@ var WebGLPipeline = new Class({ */ setFloat3: function (name, x, y, z) { - this.renderer.setFloat3(this.program, name, x, y, z); + return this; }, @@ -24886,8 +25990,8 @@ var WebGLPipeline = new Class({ */ setFloat4: function (name, x, y, z, w) { - this.renderer.setFloat4(this.program, name, x, y, z, w); + return this; }, @@ -24905,6 +26009,7 @@ var WebGLPipeline = new Class({ setInt1: function (name, x) { this.renderer.setInt1(this.program, name, x); + return this; }, @@ -24923,6 +26028,7 @@ var WebGLPipeline = new Class({ setInt2: function (name, x, y) { this.renderer.setInt2(this.program, name, x, y); + return this; }, @@ -24942,6 +26048,7 @@ var WebGLPipeline = new Class({ setInt3: function (name, x, y, z) { this.renderer.setInt3(this.program, name, x, y, z); + return this; }, @@ -24962,6 +26069,7 @@ var WebGLPipeline = new Class({ setInt4: function (name, x, y, z, w) { this.renderer.setInt4(this.program, name, x, y, z, w); + return this; }, @@ -24981,6 +26089,7 @@ var WebGLPipeline = new Class({ setMatrix2: function (name, transpose, matrix) { this.renderer.setMatrix2(this.program, name, transpose, matrix); + return this; }, @@ -25001,6 +26110,7 @@ var WebGLPipeline = new Class({ setMatrix3: function (name, transpose, matrix) { this.renderer.setMatrix3(this.program, name, transpose, matrix); + return this; }, @@ -25019,6 +26129,7 @@ var WebGLPipeline = new Class({ setMatrix4: function (name, transpose, matrix) { this.renderer.setMatrix4(this.program, name, transpose, matrix); + return this; } @@ -25169,10 +26280,10 @@ module.exports = Smoothing(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HexStringToColor = __webpack_require__(288); -var IntegerToColor = __webpack_require__(286); -var ObjectToColor = __webpack_require__(284); -var RGBStringToColor = __webpack_require__(283); +var HexStringToColor = __webpack_require__(289); +var IntegerToColor = __webpack_require__(287); +var ObjectToColor = __webpack_require__(285); +var RGBStringToColor = __webpack_require__(284); /** * Converts the given source color value into an instance of a Color class. @@ -25342,7 +26453,7 @@ module.exports = Random; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); var Point = __webpack_require__(5); /** @@ -25470,7 +26581,7 @@ var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(262); +var ParseXML = __webpack_require__(263); /** * @typedef {object} Phaser.Loader.FileTypes.XMLFileConfig @@ -25754,7 +26865,7 @@ module.exports = { CountAllMatching: __webpack_require__(465), Each: __webpack_require__(464), EachInRange: __webpack_require__(463), - FindClosestInSorted: __webpack_require__(215), + FindClosestInSorted: __webpack_require__(217), GetAll: __webpack_require__(462), GetFirst: __webpack_require__(461), GetRandom: __webpack_require__(150), @@ -25763,19 +26874,19 @@ module.exports = { MoveUp: __webpack_require__(458), NumberArray: __webpack_require__(457), NumberArrayStep: __webpack_require__(456), - QuickSelect: __webpack_require__(187), - Range: __webpack_require__(248), - Remove: __webpack_require__(202), + QuickSelect: __webpack_require__(188), + Range: __webpack_require__(250), + Remove: __webpack_require__(203), RemoveAt: __webpack_require__(455), RemoveBetween: __webpack_require__(454), RemoveRandomElement: __webpack_require__(453), Replace: __webpack_require__(452), RotateLeft: __webpack_require__(293), RotateRight: __webpack_require__(292), - SafeRange: __webpack_require__(29), + SafeRange: __webpack_require__(30), SendToBack: __webpack_require__(451), SetAll: __webpack_require__(450), - Shuffle: __webpack_require__(96), + Shuffle: __webpack_require__(97), SpliceOne: __webpack_require__(56), StableSort: __webpack_require__(83), Swap: __webpack_require__(449) @@ -25795,7 +26906,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(500); +var ShaderSourceFS = __webpack_require__(501); var TextureTintPipeline = __webpack_require__(131); var LIGHT_COUNT = 10; @@ -26382,6 +27493,35 @@ module.exports = ForwardDiffuseLightPipeline; /* 153 */ /***/ (function(module, exports) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Attempts to remove the element from its parentNode in the DOM. + * + * @function Phaser.DOM.RemoveFromDOM + * @since 3.0.0 + * + * @param {HTMLElement} element - The DOM element to remove from its parent node. + */ +var RemoveFromDOM = function (element) +{ + if (element.parentNode) + { + element.parentNode.removeChild(element); + } +}; + +module.exports = RemoveFromDOM; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -26408,7 +27548,7 @@ module.exports = Between; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26438,9 +27578,9 @@ module.exports = RadToDeg; /***/ }), -/* 155 */, /* 156 */, -/* 157 */ +/* 157 */, +/* 158 */ /***/ (function(module, exports) { /** @@ -26477,7 +27617,7 @@ module.exports = CenterOn; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -26507,7 +27647,7 @@ module.exports = GetColor; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -26554,7 +27694,7 @@ module.exports = SmoothStep; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26610,7 +27750,7 @@ module.exports = Random; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26648,7 +27788,7 @@ module.exports = Random; /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26688,7 +27828,7 @@ module.exports = Random; /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26753,7 +27893,7 @@ module.exports = GetPoints; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26797,8 +27937,8 @@ module.exports = Random; /***/ }), -/* 165 */, -/* 166 */ +/* 166 */, +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27667,7 +28807,7 @@ module.exports = Timeline; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27677,15 +28817,15 @@ module.exports = Timeline; */ var Clone = __webpack_require__(34); -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); -var GetTargets = __webpack_require__(103); -var GetTweens = __webpack_require__(169); +var GetTargets = __webpack_require__(104); +var GetTweens = __webpack_require__(170); var GetValue = __webpack_require__(3); -var Timeline = __webpack_require__(166); +var Timeline = __webpack_require__(167); var TweenBuilder = __webpack_require__(72); /** @@ -27819,7 +28959,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27828,15 +28968,15 @@ module.exports = TimelineBuilder; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); var GetValue = __webpack_require__(3); -var GetValueOp = __webpack_require__(102); -var Tween = __webpack_require__(100); -var TweenData = __webpack_require__(99); +var GetValueOp = __webpack_require__(103); +var Tween = __webpack_require__(101); +var TweenData = __webpack_require__(100); /** * [description] @@ -27947,7 +29087,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27993,7 +29133,7 @@ module.exports = GetTweens; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28051,7 +29191,7 @@ module.exports = GetProps; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28368,7 +29508,7 @@ module.exports = TimerEvent; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28549,8 +29689,8 @@ module.exports = BasePlugin; /***/ }), -/* 173 */, -/* 174 */ +/* 174 */, +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28562,7 +29702,7 @@ module.exports = BasePlugin; var Class = __webpack_require__(0); var File = __webpack_require__(19); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(109); +var GetURL = __webpack_require__(110); var IsPlainObject = __webpack_require__(7); /** @@ -28746,7 +29886,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28756,11 +29896,11 @@ module.exports = HTML5AudioFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(174); +var HTML5AudioFile = __webpack_require__(175); var IsPlainObject = __webpack_require__(7); /** @@ -29026,7 +30166,7 @@ module.exports = AudioFile; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29035,7 +30175,7 @@ module.exports = AudioFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MergeXHRSettings = __webpack_require__(108); +var MergeXHRSettings = __webpack_require__(109); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -29094,7 +30234,7 @@ module.exports = XHRLoader; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29399,7 +30539,7 @@ module.exports = KeyCombo; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29633,7 +30773,7 @@ module.exports = Key; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29642,8 +30782,8 @@ module.exports = Key; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Axis = __webpack_require__(181); -var Button = __webpack_require__(180); +var Axis = __webpack_require__(182); +var Button = __webpack_require__(181); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var Vector2 = __webpack_require__(4); @@ -30391,7 +31531,7 @@ module.exports = Gamepad; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30532,7 +31672,7 @@ module.exports = Button; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30657,7 +31797,7 @@ module.exports = Axis; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -30753,7 +31893,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30762,8 +31902,8 @@ module.exports = CreateInteractiveObject; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(116); -var SetTransform = __webpack_require__(118); +var Commands = __webpack_require__(117); +var SetTransform = __webpack_require__(119); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -30999,7 +32139,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -31031,7 +32171,7 @@ module.exports = Circumference; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31040,8 +32180,8 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(184); -var CircumferencePoint = __webpack_require__(114); +var Circumference = __webpack_require__(185); +var CircumferencePoint = __webpack_require__(115); var FromPercent = __webpack_require__(65); var MATH_CONST = __webpack_require__(16); @@ -31085,7 +32225,7 @@ module.exports = GetPoints; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31094,7 +32234,7 @@ module.exports = GetPoints; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CircumferencePoint = __webpack_require__(114); +var CircumferencePoint = __webpack_require__(115); var FromPercent = __webpack_require__(65); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -31128,7 +32268,7 @@ module.exports = GetPoint; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -31246,7 +32386,7 @@ module.exports = QuickSelect; /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -31292,7 +32432,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31320,7 +32460,7 @@ module.exports = { /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31329,7 +32469,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); var IsSizePowerOfTwo = __webpack_require__(84); var ScaleModes = __webpack_require__(60); @@ -31594,7 +32734,7 @@ module.exports = TextureSource; /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31603,16 +32743,16 @@ module.exports = TextureSource; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var CanvasTexture = __webpack_require__(487); var Class = __webpack_require__(0); -var Color = __webpack_require__(30); -var CONST = __webpack_require__(22); +var Color = __webpack_require__(31); +var CONST = __webpack_require__(23); var EventEmitter = __webpack_require__(8); -var GenerateTexture = __webpack_require__(268); +var GenerateTexture = __webpack_require__(269); var GetValue = __webpack_require__(3); -var Parser = __webpack_require__(189); -var Texture = __webpack_require__(120); +var Parser = __webpack_require__(190); +var Texture = __webpack_require__(121); /** * @callback EachTextureCallback @@ -31827,6 +32967,8 @@ var TextureManager = new Class({ * * @param {string} key - The unique string-based key of the Texture. * @param {*} data - The Base64 encoded data. + * + * @return {this} This Texture Manager instance. */ addBase64: function (key, data) { @@ -31854,6 +32996,8 @@ var TextureManager = new Class({ image.src = data; } + + return this; }, /** @@ -32701,7 +33845,7 @@ module.exports = TextureManager; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33668,7 +34812,7 @@ module.exports = WebAudioSound; /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33680,7 +34824,7 @@ module.exports = WebAudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); -var WebAudioSound = __webpack_require__(192); +var WebAudioSound = __webpack_require__(193); /** * @classdesc @@ -33995,7 +35139,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34122,7 +35266,7 @@ module.exports = NoAudioSound; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34135,7 +35279,7 @@ module.exports = NoAudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); -var NoAudioSound = __webpack_require__(194); +var NoAudioSound = __webpack_require__(195); var NOOP = __webpack_require__(2); /** @@ -34240,7 +35384,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35222,7 +36366,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 197 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35234,7 +36378,7 @@ module.exports = HTML5AudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); -var HTML5AudioSound = __webpack_require__(196); +var HTML5AudioSound = __webpack_require__(197); /** * HTML5 Audio implementation of the Sound Manager. @@ -35689,7 +36833,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 198 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35699,9 +36843,9 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(197); -var NoAudioSoundManager = __webpack_require__(195); -var WebAudioSoundManager = __webpack_require__(193); +var HTML5AudioSoundManager = __webpack_require__(198); +var NoAudioSoundManager = __webpack_require__(196); +var WebAudioSoundManager = __webpack_require__(194); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -35739,7 +36883,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 199 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35750,7 +36894,7 @@ module.exports = SoundManagerCreator; var CONST = __webpack_require__(80); var GetValue = __webpack_require__(3); -var Merge = __webpack_require__(95); +var Merge = __webpack_require__(96); var InjectionMap = __webpack_require__(488); /** @@ -35871,7 +37015,7 @@ module.exports = Settings; /***/ }), -/* 200 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35881,7 +37025,7 @@ module.exports = Settings; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(121); +var Systems = __webpack_require__(122); /** * @classdesc @@ -36150,7 +37294,7 @@ module.exports = Scene; /***/ }), -/* 201 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36163,8 +37307,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(80); var GetValue = __webpack_require__(3); var NOOP = __webpack_require__(2); -var Scene = __webpack_require__(200); -var Systems = __webpack_require__(121); +var Scene = __webpack_require__(201); +var Systems = __webpack_require__(122); /** * @classdesc @@ -37722,7 +38866,7 @@ module.exports = SceneManager; /***/ }), -/* 202 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37813,7 +38957,7 @@ module.exports = Remove; /***/ }), -/* 203 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37825,11 +38969,11 @@ module.exports = Remove; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var FileTypesManager = __webpack_require__(6); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); var GetFastValue = __webpack_require__(1); var PluginCache = __webpack_require__(10); -var Remove = __webpack_require__(202); +var Remove = __webpack_require__(203); /** * @typedef {object} GlobalPlugin @@ -38059,6 +39203,10 @@ var PluginManager = new Class({ scene[map[pluginKey]] = sys[pluginKey]; } } + else if (pluginKey === 'game' && map.hasOwnProperty(pluginKey)) + { + scene[map[pluginKey]] = game; + } } for (var s = 0; s < scenePlugins.length; s++) @@ -38664,7 +39812,7 @@ module.exports = PluginManager; /***/ }), -/* 204 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38905,7 +40053,7 @@ module.exports = TouchManager; /***/ }), -/* 205 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38915,7 +40063,7 @@ module.exports = TouchManager; */ var Class = __webpack_require__(0); -var SmoothStepInterpolation = __webpack_require__(252); +var SmoothStepInterpolation = __webpack_require__(254); var Vector2 = __webpack_require__(4); @@ -39688,7 +40836,7 @@ module.exports = Pointer; /***/ }), -/* 206 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39698,7 +40846,7 @@ module.exports = Pointer; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(122); +var Features = __webpack_require__(123); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md @@ -40043,7 +41191,7 @@ module.exports = MouseManager; /***/ }), -/* 207 */ +/* 208 */ /***/ (function(module, exports) { /** @@ -40123,7 +41271,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 208 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40133,14 +41281,14 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(207); +var CONST = __webpack_require__(208); var EventEmitter = __webpack_require__(8); -var Mouse = __webpack_require__(206); -var Pointer = __webpack_require__(205); +var Mouse = __webpack_require__(207); +var Pointer = __webpack_require__(206); var Rectangle = __webpack_require__(11); -var Touch = __webpack_require__(204); -var TransformMatrix = __webpack_require__(32); -var TransformXY = __webpack_require__(251); +var Touch = __webpack_require__(205); +var TransformMatrix = __webpack_require__(27); +var TransformXY = __webpack_require__(253); /** * @classdesc @@ -41510,7 +42658,7 @@ module.exports = InputManager; /***/ }), -/* 209 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41519,7 +42667,7 @@ module.exports = InputManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Determines the canvas features of the browser running this Phaser Game instance. @@ -41624,7 +42772,7 @@ module.exports = init(); /***/ }), -/* 210 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41639,17 +42787,17 @@ module.exports = init(); module.exports = { - Fade: __webpack_require__(572), - Flash: __webpack_require__(571), - Pan: __webpack_require__(570), - Shake: __webpack_require__(537), - Zoom: __webpack_require__(536) + Fade: __webpack_require__(577), + Flash: __webpack_require__(576), + Pan: __webpack_require__(575), + Shake: __webpack_require__(542), + Zoom: __webpack_require__(541) }; /***/ }), -/* 211 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41658,7 +42806,824 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BaseCache = __webpack_require__(212); +var BaseCamera = __webpack_require__(88); +var CanvasPool = __webpack_require__(22); +var CenterOn = __webpack_require__(158); +var Clamp = __webpack_require__(20); +var Class = __webpack_require__(0); +var Components = __webpack_require__(13); +var Effects = __webpack_require__(211); +var Linear = __webpack_require__(125); +var Rectangle = __webpack_require__(11); +var Vector2 = __webpack_require__(4); + +/** + * @classdesc + * A Camera. + * + * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, + * and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. + * + * A Camera also has built-in special effects including Fade, Flash and Camera Shake. + * + * @class Camera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.0.0 + * + * @extends Phaser.Cameras.Scene2D.BaseCamera + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.Tint + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var Camera = new Class({ + + Extends: BaseCamera, + + Mixins: [ + Components.Flip, + Components.Tint + ], + + initialize: + + function Camera (x, y, width, height) + { + BaseCamera.call(this, x, y, width, height); + + /** + * Does this Camera allow the Game Objects it renders to receive input events? + * + * @name Phaser.Cameras.Scene2D.Camera#inputEnabled + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.inputEnabled = true; + + /** + * The Camera Fade effect handler. + * To fade this camera see the `Camera.fade` methods. + * + * @name Phaser.Cameras.Scene2D.Camera#fadeEffect + * @type {Phaser.Cameras.Scene2D.Effects.Fade} + * @since 3.5.0 + */ + this.fadeEffect = new Effects.Fade(this); + + /** + * The Camera Flash effect handler. + * To flash this camera see the `Camera.flash` method. + * + * @name Phaser.Cameras.Scene2D.Camera#flashEffect + * @type {Phaser.Cameras.Scene2D.Effects.Flash} + * @since 3.5.0 + */ + this.flashEffect = new Effects.Flash(this); + + /** + * The Camera Shake effect handler. + * To shake this camera see the `Camera.shake` method. + * + * @name Phaser.Cameras.Scene2D.Camera#shakeEffect + * @type {Phaser.Cameras.Scene2D.Effects.Shake} + * @since 3.5.0 + */ + this.shakeEffect = new Effects.Shake(this); + + /** + * The Camera Pan effect handler. + * To pan this camera see the `Camera.pan` method. + * + * @name Phaser.Cameras.Scene2D.Camera#panEffect + * @type {Phaser.Cameras.Scene2D.Effects.Pan} + * @since 3.11.0 + */ + this.panEffect = new Effects.Pan(this); + + /** + * The Camera Zoom effect handler. + * To zoom this camera see the `Camera.zoom` method. + * + * @name Phaser.Cameras.Scene2D.Camera#zoomEffect + * @type {Phaser.Cameras.Scene2D.Effects.Zoom} + * @since 3.11.0 + */ + this.zoomEffect = new Effects.Zoom(this); + + /** + * The linear interpolation value to use when following a target. + * + * Can also be set via `setLerp` or as part of the `startFollow` call. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + * + * @name Phaser.Cameras.Scene2D.Camera#lerp + * @type {Phaser.Math.Vector2} + * @since 3.9.0 + */ + this.lerp = new Vector2(1, 1); + + /** + * The values stored in this property are subtracted from the Camera targets position, allowing you to + * offset the camera from the actual target x/y coordinates by this amount. + * Can also be set via `setFollowOffset` or as part of the `startFollow` call. + * + * @name Phaser.Cameras.Scene2D.Camera#followOffset + * @type {Phaser.Math.Vector2} + * @since 3.9.0 + */ + this.followOffset = new Vector2(); + + /** + * The Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * You can directly set this property to be an instance of a Rectangle. Or, you can use the + * `setDeadzone` method for a chainable approach. + * + * The rectangle you provide can have its dimensions adjusted dynamically, however, please + * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point. + * + * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property + * to `null`. + * + * @name Phaser.Cameras.Scene2D.Camera#deadzone + * @type {?Phaser.Geom.Rectangle} + * @since 3.11.0 + */ + this.deadzone = null; + + /** + * Internal follow target reference. + * + * @name Phaser.Cameras.Scene2D.Camera#_follow + * @type {?any} + * @private + * @default null + * @since 3.0.0 + */ + this._follow = null; + + this.renderToTexture = false; + + /** + * The HTML Canvas Element that the Render Texture is drawing to. + * This is only populated if Phaser is running with the Canvas Renderer. + * + * @name Phaser.GameObjects.RenderTexture#canvas + * @type {HTMLCanvasElement} + * @since 3.12.0 + */ + this.canvas = null; + + /** + * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to. + * + * @name Phaser.GameObjects.RenderTexture#context + * @type {CanvasRenderingContext2D} + * @since 3.12.0 + */ + this.context = null; + + /** + * A reference to the GL Frame Buffer this Render Texture is drawing to. + * This is only set if Phaser is running with the WebGL Renderer. + * + * @name Phaser.GameObjects.RenderTexture#framebuffer + * @type {?WebGLFramebuffer} + * @since 3.12.0 + */ + this.glTexture = null; + + /** + * A reference to the GL Frame Buffer this Render Texture is drawing to. + * This is only set if Phaser is running with the WebGL Renderer. + * + * @name Phaser.GameObjects.RenderTexture#framebuffer + * @type {?WebGLFramebuffer} + * @since 3.12.0 + */ + this.framebuffer = null; + + this.pipeline = null; + + // this.flipX = false; + // this.flipY = false; + // this.tintFill = 0; + // this._isTinted = false; + // this._tintTL = 0xffffff; + // this._tintTR = 0xffffff; + // this._tintBL = 0xffffff; + // this._tintBR = 0xffffff; + // this._alphaTL = 1; + // this._alphaTR = 1; + // this._alphaBL = 1; + // this._alphaBR = 1; + }, + + setRenderToTexture: function (pipeline) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer.gl) + { + this.glTexture = renderer.createTextureFromSource(null, this.width, this.height, 0); + this.framebuffer = renderer.createFramebuffer(this.width, this.height, this.glTexture, false); + } + else + { + this.canvas = CanvasPool.create2D(this, this.width, this.height); + this.context = this.canvas.getContext('2d'); + } + + this.renderToTexture = true; + + if (pipeline) + { + this.pipeline = pipeline; + } + + return this; + }, + + /** + * Sets the Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point + * of the camera. This allows you to use the object for additional game related checks, such as + * testing if an object is within it or not via a Rectangle.contains call. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * Calling this method with no arguments will reset an active deadzone. + * + * @method Phaser.Cameras.Scene2D.Camera#setDeadzone + * @since 3.11.0 + * + * @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. + */ + setDeadzone: function (width, height) + { + if (width === undefined) + { + this.deadzone = null; + } + else + { + if (this.deadzone) + { + this.deadzone.width = width; + this.deadzone.height = height; + } + else + { + this.deadzone = new Rectangle(0, 0, width, height); + } + + if (this._follow) + { + var originX = this.width / 2; + var originY = this.height / 2; + + var fx = this._follow.x - this.followOffset.x; + var fy = this._follow.y - this.followOffset.y; + + this.midPoint.set(fx, fy); + + this.scrollX = fx - originX; + this.scrollY = fy - originY; + } + + CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y); + } + + return this; + }, + + /** + * Fades the Camera in from the given color over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeIn + * @since 3.3.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeIn: function (duration, red, green, blue, callback, context) + { + return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context); + }, + + /** + * Fades the Camera out to the given color over the duration specified. + * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeOut + * @since 3.3.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeOut: function (duration, red, green, blue, callback, context) + { + return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context); + }, + + /** + * Fades the Camera from the given color to transparent over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeFrom + * @since 3.5.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeFrom: function (duration, red, green, blue, force, callback, context) + { + return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context); + }, + + /** + * Fades the Camera from transparent to the given color over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fade + * @since 3.0.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fade: function (duration, red, green, blue, force, callback, context) + { + return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context); + }, + + /** + * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#flash + * @since 3.0.0 + * + * @param {integer} [duration=250] - The duration of the effect in milliseconds. + * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + flash: function (duration, red, green, blue, force, callback, context) + { + return this.flashEffect.start(duration, red, green, blue, force, callback, context); + }, + + /** + * Shakes the Camera by the given intensity over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#shake + * @since 3.0.0 + * + * @param {integer} [duration=100] - The duration of the effect in milliseconds. + * @param {number} [intensity=0.05] - The intensity of the shake. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + shake: function (duration, intensity, force, callback, context) + { + return this.shakeEffect.start(duration, intensity, force, callback, context); + }, + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#pan + * @since 3.11.0 + * + * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to. + * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {CameraPanCallback} [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} 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 zoom the Camera to the given scale, over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#zoomTo + * @since 3.11.0 + * + * @param {number} zoom - The target Camera zoom value. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {CameraPanCallback} [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} This Camera instance. + */ + zoomTo: function (zoom, duration, ease, force, callback, context) + { + return this.zoomEffect.start(zoom, duration, ease, force, callback, context); + }, + + /** + * Internal preRender step. + * + * @method Phaser.Cameras.Scene2D.Camera#preRender + * @protected + * @since 3.0.0 + * + * @param {number} baseScale - The base scale, as set in the Camera Manager. + * @param {number} resolution - The game resolution. + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + + var halfWidth = width * 0.5; + var halfHeight = height * 0.5; + + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + + var originX = width * this.originX; + var originY = height * this.originY; + + var follow = this._follow; + var deadzone = this.deadzone; + + var sx = this.scrollX; + var sy = this.scrollY; + + if (deadzone) + { + CenterOn(deadzone, this.midPoint.x, this.midPoint.y); + } + + if (follow) + { + var fx = (follow.x - this.followOffset.x); + var fy = (follow.y - this.followOffset.y); + + if (deadzone) + { + if (fx < deadzone.x) + { + sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x); + } + else if (fx > deadzone.right) + { + sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x); + } + + if (fy < deadzone.y) + { + sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y); + } + else if (fy > deadzone.bottom) + { + sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y); + } + } + else + { + sx = Linear(sx, fx - originX, this.lerp.x); + sy = Linear(sy, fy - originY, this.lerp.y); + } + } + + if (this.useBounds) + { + sx = this.clampX(sx); + sy = this.clampY(sy); + } + + if (this.roundPixels) + { + originX = Math.round(originX); + originY = Math.round(originY); + } + + // Values are in pixels and not impacted by zooming the Camera + this.scrollX = sx; + this.scrollY = sy; + + var midX = sx + halfWidth; + var midY = sy + halfHeight; + + // The center of the camera, in world space, so taking zoom into account + // Basically the pixel value of what it's looking at in the middle of the cam + this.midPoint.set(midX, midY); + + var displayWidth = width / zoom; + var displayHeight = height / zoom; + + this.worldView.setTo( + midX - (displayWidth / 2), + midY - (displayHeight / 2), + displayWidth, + displayHeight + ); + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + + this.shakeEffect.preRender(); + }, + + /** + * Sets the linear interpolation value to use when following a target. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + * + * @method Phaser.Cameras.Scene2D.Camera#setLerp + * @since 3.9.0 + * + * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target. + * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target. + * + * @return {this} This Camera instance. + */ + setLerp: function (x, y) + { + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } + + this.lerp.set(x, y); + + return this; + }, + + /** + * Sets the horizontal and vertical offset of the camera from its follow target. + * The values are subtracted from the targets position during the Cameras update step. + * + * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset + * @since 3.9.0 + * + * @param {number} [x=0] - The horizontal offset from the camera follow target.x position. + * @param {number} [y=0] - The vertical offset from the camera follow target.y position. + * + * @return {this} This Camera instance. + */ + setFollowOffset: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.followOffset.set(x, y); + + return this; + }, + + /** + * Sets the Camera to follow a Game Object. + * + * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object + * in its center. + * + * You can set the linear interpolation value used in the follow code. + * Use low lerp values (such as 0.1) to automatically smooth the camera motion. + * + * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel + * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to + * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom + * value on the camera. So be sure to keep the camera zoom to integers. + * + * @method Phaser.Cameras.Scene2D.Camera#startFollow + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow. + * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering? + * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. + * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. + * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position. + * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position. + * + * @return {this} This Camera instance. + */ + startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY) + { + if (roundPixels === undefined) { roundPixels = false; } + if (lerpX === undefined) { lerpX = 1; } + if (lerpY === undefined) { lerpY = lerpX; } + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = offsetX; } + + this._follow = target; + + this.roundPixels = roundPixels; + + lerpX = Clamp(lerpX, 0, 1); + lerpY = Clamp(lerpY, 0, 1); + + this.lerp.set(lerpX, lerpY); + + this.followOffset.set(offsetX, offsetY); + + var originX = this.width / 2; + var originY = this.height / 2; + + var fx = target.x - offsetX; + var fy = target.y - offsetY; + + this.midPoint.set(fx, fy); + + this.scrollX = fx - originX; + this.scrollY = fy - originY; + + return this; + }, + + /** + * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`. + * + * @method Phaser.Cameras.Scene2D.Camera#stopFollow + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + stopFollow: function () + { + this._follow = null; + + return this; + }, + + /** + * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to + * remove the fade. + * + * @method Phaser.Cameras.Scene2D.Camera#resetFX + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + resetFX: function () + { + this.panEffect.reset(); + this.shakeEffect.reset(); + this.flashEffect.reset(); + this.fadeEffect.reset(); + + return this; + }, + + /** + * Internal method called automatically by the Camera Manager. + * + * @method Phaser.Cameras.Scene2D.Camera#update + * @protected + * @since 3.0.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.visible) + { + this.panEffect.update(time, delta); + this.zoomEffect.update(time, delta); + this.shakeEffect.update(time, delta); + this.flashEffect.update(time, delta); + this.fadeEffect.update(time, delta); + } + }, + + /** + * Destroys this Camera instance. You rarely need to call this directly. + * + * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as + * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. + * + * @method Phaser.Cameras.Scene2D.Camera#destroy + * @fires CameraDestroyEvent + * @since 3.0.0 + */ + destroy: function () + { + BaseCamera.prototype.destroy.call(this); + + this.resetFX(); + + this._follow = null; + this.deadzone = null; + } + +}); + +module.exports = Camera; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BaseCache = __webpack_require__(214); var Class = __webpack_require__(0); /** @@ -41872,7 +43837,7 @@ module.exports = CacheManager; /***/ }), -/* 212 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42066,7 +44031,7 @@ module.exports = BaseCache; /***/ }), -/* 213 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42075,7 +44040,7 @@ module.exports = BaseCache; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Animation = __webpack_require__(216); +var Animation = __webpack_require__(218); var Class = __webpack_require__(0); var CustomMap = __webpack_require__(127); var EventEmitter = __webpack_require__(8); @@ -42693,7 +44658,7 @@ module.exports = AnimationManager; /***/ }), -/* 214 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42876,7 +44841,7 @@ module.exports = AnimationFrame; /***/ }), -/* 215 */ +/* 217 */ /***/ (function(module, exports) { /** @@ -42957,7 +44922,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 216 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42968,8 +44933,8 @@ module.exports = FindClosestInSorted; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var FindClosestInSorted = __webpack_require__(215); -var Frame = __webpack_require__(214); +var FindClosestInSorted = __webpack_require__(217); +var Frame = __webpack_require__(216); var GetValue = __webpack_require__(3); /** @@ -43887,7 +45852,7 @@ module.exports = Animation; /***/ }), -/* 217 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43919,7 +45884,7 @@ module.exports = WrapDegrees; /***/ }), -/* 218 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43951,7 +45916,7 @@ module.exports = Wrap; /***/ }), -/* 219 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44109,7 +46074,7 @@ module.exports = GeometryMask; /***/ }), -/* 220 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44352,7 +46317,7 @@ module.exports = BitmapMask; /***/ }), -/* 221 */ +/* 223 */ /***/ (function(module, exports) { var g; @@ -44378,13 +46343,13 @@ module.exports = g; /***/ }), -/* 222 */, -/* 223 */, /* 224 */, /* 225 */, /* 226 */, /* 227 */, -/* 228 */ +/* 228 */, +/* 229 */, +/* 230 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44393,7 +46358,7 @@ module.exports = g; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(187); +var quickselect = __webpack_require__(188); /** * @classdesc @@ -44992,7 +46957,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 229 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45208,7 +47173,7 @@ module.exports = ProcessQueue; /***/ }), -/* 230 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45392,8 +47357,8 @@ module.exports = TextFile; /***/ }), -/* 231 */, -/* 232 */ +/* 233 */, +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45486,7 +47451,7 @@ module.exports = GetPoints; /***/ }), -/* 233 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45574,8 +47539,6 @@ module.exports = GetPoint; /***/ }), -/* 234 */, -/* 235 */, /* 236 */, /* 237 */, /* 238 */, @@ -45583,7 +47546,9 @@ module.exports = GetPoint; /* 240 */, /* 241 */, /* 242 */, -/* 243 */ +/* 243 */, +/* 244 */, +/* 245 */ /***/ (function(module, exports) { /** @@ -45612,7 +47577,7 @@ module.exports = FloatBetween; /***/ }), -/* 244 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45621,11 +47586,11 @@ module.exports = FloatBetween; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); Ellipse.Area = __webpack_require__(443); -Ellipse.Circumference = __webpack_require__(184); -Ellipse.CircumferencePoint = __webpack_require__(114); +Ellipse.Circumference = __webpack_require__(185); +Ellipse.CircumferencePoint = __webpack_require__(115); Ellipse.Clone = __webpack_require__(442); Ellipse.Contains = __webpack_require__(55); Ellipse.ContainsPoint = __webpack_require__(441); @@ -45633,8 +47598,8 @@ Ellipse.ContainsRect = __webpack_require__(440); Ellipse.CopyFrom = __webpack_require__(439); Ellipse.Equals = __webpack_require__(438); Ellipse.GetBounds = __webpack_require__(437); -Ellipse.GetPoint = __webpack_require__(186); -Ellipse.GetPoints = __webpack_require__(185); +Ellipse.GetPoint = __webpack_require__(187); +Ellipse.GetPoints = __webpack_require__(186); Ellipse.Offset = __webpack_require__(436); Ellipse.OffsetPoint = __webpack_require__(435); Ellipse.Random = __webpack_require__(136); @@ -45643,10 +47608,10 @@ module.exports = Ellipse; /***/ }), -/* 245 */, -/* 246 */, /* 247 */, -/* 248 */ +/* 248 */, +/* 249 */, +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45656,7 +47621,7 @@ module.exports = Ellipse; */ var GetValue = __webpack_require__(3); -var Shuffle = __webpack_require__(96); +var Shuffle = __webpack_require__(97); var BuildChunk = function (a, b, qty) { @@ -45786,7 +47751,7 @@ module.exports = Range; /***/ }), -/* 249 */ +/* 251 */ /***/ (function(module, exports) { /** @@ -45815,7 +47780,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 250 */ +/* 252 */ /***/ (function(module, exports) { /** @@ -45852,7 +47817,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 251 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45918,7 +47883,7 @@ module.exports = TransformXY; /***/ }), -/* 252 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45927,7 +47892,7 @@ module.exports = TransformXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SmoothStep = __webpack_require__(159); +var SmoothStep = __webpack_require__(160); /** * A Smooth Step interpolation method. @@ -45951,7 +47916,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 253 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -46626,7 +48591,7 @@ earcut.flatten = function (data) { }; /***/ }), -/* 254 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46637,8 +48602,8 @@ earcut.flatten = function (data) { */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(502); -var ShaderSourceVS = __webpack_require__(501); +var ShaderSourceFS = __webpack_require__(503); +var ShaderSourceVS = __webpack_require__(502); var WebGLPipeline = __webpack_require__(132); /** @@ -46853,7 +48818,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 255 */ +/* 257 */ /***/ (function(module, exports) { /** @@ -46922,7 +48887,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 256 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46932,15 +48897,17 @@ module.exports = WebGLSnapshot; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var BaseCamera = __webpack_require__(88); var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var IsSizePowerOfTwo = __webpack_require__(84); var SpliceOne = __webpack_require__(56); +var TransformMatrix = __webpack_require__(27); var Utils = __webpack_require__(21); -var WebGLSnapshot = __webpack_require__(255); +var WebGLSnapshot = __webpack_require__(257); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(254); +var BitmapMaskPipeline = __webpack_require__(256); var ForwardDiffuseLightPipeline = __webpack_require__(152); var TextureTintPipeline = __webpack_require__(131); @@ -47342,6 +49309,48 @@ var WebGLRenderer = new Class({ */ this.blankTexture = null; + this.defaultCamera = new BaseCamera(0, 0, 0, 0); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix1 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix1 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix2 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix2 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix3 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix3 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix4 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix4 = new TransformMatrix(); + this.init(this.config); }, @@ -47512,6 +49521,8 @@ var WebGLRenderer = new Class({ this.drawingBufferHeight = gl.drawingBufferHeight; + this.defaultCamera.setSize(width, height); + return this; }, @@ -48409,14 +50420,36 @@ var WebGLRenderer = new Class({ this.pushScissor(cx, cy, cw, ch); - if (camera.backgroundColor.alphaGL > 0) - { - var color = camera.backgroundColor; - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var color = camera.backgroundColor; + + if (camera.renderToTexture) + { + this.setFramebuffer(camera.framebuffer); + + var gl = this.gl; + + gl.clearColor(0, 0, 0, 0); + + gl.clear(gl.COLOR_BUFFER_BIT); + + TextureTintPipeline.projOrtho(0, camera.width, 0, camera.height, -1000, 1000); + + if (color.alphaGL > 0) + { + TextureTintPipeline.drawFillRect( + cx, cy, cw, ch, + Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), + color.alphaGL + ); + } + } + else if (color.alphaGL > 0) + { TextureTintPipeline.drawFillRect( cx, cy, cw, ch, - Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1.0), + Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL ); } @@ -48441,6 +50474,44 @@ var WebGLRenderer = new Class({ camera.dirty = false; this.popScissor(); + + if (camera.renderToTexture) + { + TextureTintPipeline.flush(); + + this.setFramebuffer(null); + + TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + + var getTint = Utils.getTintAppendFloatAlpha; + + var p = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + + p.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); + } }, /** @@ -48973,7 +51044,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 257 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48983,7 +51054,7 @@ module.exports = WebGLRenderer; */ var modes = __webpack_require__(52); -var CanvasFeatures = __webpack_require__(209); +var CanvasFeatures = __webpack_require__(210); /** * [description] @@ -49024,7 +51095,7 @@ module.exports = GetBlendModes; /***/ }), -/* 258 */ +/* 260 */ /***/ (function(module, exports) { /** @@ -49063,7 +51134,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 259 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49073,13 +51144,13 @@ module.exports = CanvasSnapshot; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasSnapshot = __webpack_require__(258); +var CanvasSnapshot = __webpack_require__(260); var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var GetBlendModes = __webpack_require__(257); +var CONST = __webpack_require__(23); +var GetBlendModes = __webpack_require__(259); var ScaleModes = __webpack_require__(60); var Smoothing = __webpack_require__(133); -var TransformMatrix = __webpack_require__(32); +var TransformMatrix = __webpack_require__(27); /** * @classdesc @@ -49205,6 +51276,9 @@ var CanvasRenderer = new Class({ */ this.blendModes = GetBlendModes(); + // image-rendering: optimizeSpeed; + // image-rendering: pixelated; + /** * [description] * @@ -49714,7 +51788,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 260 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49911,36 +51985,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 261 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Attempts to remove the element from its parentNode in the DOM. - * - * @function Phaser.DOM.RemoveFromDOM - * @since 3.0.0 - * - * @param {HTMLElement} element - The DOM element to remove from its parent node. - */ -var RemoveFromDOM = function (element) -{ - if (element.parentNode) - { - element.parentNode.removeChild(element); - } -}; - -module.exports = RemoveFromDOM; - - -/***/ }), -/* 262 */ +/* 263 */ /***/ (function(module, exports) { /** @@ -49997,7 +52042,7 @@ module.exports = ParseXML; /***/ }), -/* 263 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50060,7 +52105,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 264 */ +/* 265 */ /***/ (function(module, exports) { /** @@ -50123,9 +52168,9 @@ module.exports = CanvasInterpolation; /***/ }), -/* 265 */, /* 266 */, -/* 267 */ +/* 267 */, +/* 268 */ /***/ (function(module, exports) { /** @@ -50163,7 +52208,7 @@ module.exports = { /***/ }), -/* 268 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50172,8 +52217,8 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Arne16 = __webpack_require__(267); -var CanvasPool = __webpack_require__(24); +var Arne16 = __webpack_require__(268); +var CanvasPool = __webpack_require__(22); var GetValue = __webpack_require__(3); /** @@ -50278,9 +52323,9 @@ module.exports = GenerateTexture; /***/ }), -/* 269 */, /* 270 */, -/* 271 */ +/* 271 */, +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50293,11 +52338,11 @@ module.exports = GenerateTexture; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(538); +module.exports = __webpack_require__(543); /***/ }), -/* 272 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50312,32 +52357,9 @@ module.exports = __webpack_require__(538); module.exports = { - In: __webpack_require__(541), - Out: __webpack_require__(540), - InOut: __webpack_require__(539) - -}; - - -/***/ }), -/* 273 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quintic - */ - -module.exports = { - - In: __webpack_require__(544), - Out: __webpack_require__(543), - InOut: __webpack_require__(542) + In: __webpack_require__(546), + Out: __webpack_require__(545), + InOut: __webpack_require__(544) }; @@ -50353,14 +52375,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Quintic */ module.exports = { - In: __webpack_require__(547), - Out: __webpack_require__(546), - InOut: __webpack_require__(545) + In: __webpack_require__(549), + Out: __webpack_require__(548), + InOut: __webpack_require__(547) }; @@ -50376,14 +52398,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quadratic + * @namespace Phaser.Math.Easing.Quartic */ module.exports = { - In: __webpack_require__(550), - Out: __webpack_require__(549), - InOut: __webpack_require__(548) + In: __webpack_require__(552), + Out: __webpack_require__(551), + InOut: __webpack_require__(550) }; @@ -50399,16 +52421,39 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Linear + * @namespace Phaser.Math.Easing.Quadratic */ -module.exports = __webpack_require__(551); +module.exports = { + + In: __webpack_require__(555), + Out: __webpack_require__(554), + InOut: __webpack_require__(553) + +}; /***/ }), /* 277 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Linear + */ + +module.exports = __webpack_require__(556); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -50421,32 +52466,9 @@ module.exports = __webpack_require__(551); module.exports = { - In: __webpack_require__(554), - Out: __webpack_require__(553), - InOut: __webpack_require__(552) - -}; - - -/***/ }), -/* 278 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Elastic - */ - -module.exports = { - - In: __webpack_require__(557), - Out: __webpack_require__(556), - InOut: __webpack_require__(555) + In: __webpack_require__(559), + Out: __webpack_require__(558), + InOut: __webpack_require__(557) }; @@ -50462,14 +52484,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { - In: __webpack_require__(560), - Out: __webpack_require__(559), - InOut: __webpack_require__(558) + In: __webpack_require__(562), + Out: __webpack_require__(561), + InOut: __webpack_require__(560) }; @@ -50485,14 +52507,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Circular + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { - In: __webpack_require__(563), - Out: __webpack_require__(562), - InOut: __webpack_require__(561) + In: __webpack_require__(565), + Out: __webpack_require__(564), + InOut: __webpack_require__(563) }; @@ -50508,14 +52530,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Bounce + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(566), - Out: __webpack_require__(565), - InOut: __webpack_require__(564) + In: __webpack_require__(568), + Out: __webpack_require__(567), + InOut: __webpack_require__(566) }; @@ -50531,14 +52553,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Back + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(569), - Out: __webpack_require__(568), - InOut: __webpack_require__(567) + In: __webpack_require__(571), + Out: __webpack_require__(570), + InOut: __webpack_require__(569) }; @@ -50553,7 +52575,30 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(574), + Out: __webpack_require__(573), + InOut: __webpack_require__(572) + +}; + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Color = __webpack_require__(31); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -50590,7 +52635,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 284 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50599,7 +52644,7 @@ module.exports = RGBStringToColor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -50620,7 +52665,7 @@ module.exports = ObjectToColor; /***/ }), -/* 285 */ +/* 286 */ /***/ (function(module, exports) { /** @@ -50668,7 +52713,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 286 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50677,8 +52722,8 @@ module.exports = IntegerToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); -var IntegerToRGB = __webpack_require__(285); +var Color = __webpack_require__(31); +var IntegerToRGB = __webpack_require__(286); /** * Converts the given color value into an instance of a Color object. @@ -50701,7 +52746,7 @@ module.exports = IntegerToColor; /***/ }), -/* 287 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -50732,7 +52777,7 @@ module.exports = GetColor32; /***/ }), -/* 288 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50741,7 +52786,7 @@ module.exports = GetColor32; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); /** * Converts a hex string into a Phaser Color object. @@ -50784,1787 +52829,6 @@ var HexStringToColor = function (hex) module.exports = HexStringToColor; -/***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); -var EventEmitter = __webpack_require__(8); -var Rectangle = __webpack_require__(11); -var TransformMatrix = __webpack_require__(32); -var ValueToColor = __webpack_require__(134); -var Vector2 = __webpack_require__(4); - -/** - * @typedef {object} JSONCameraBounds - * @property {number} x - The horizontal position of camera - * @property {number} y - The vertical position of camera - * @property {number} width - The width size of camera - * @property {number} height - The height size of camera - */ - -/** - * @typedef {object} JSONCamera - * - * @property {string} name - The name of the camera - * @property {number} x - The horizontal position of camera - * @property {number} y - The vertical position of camera - * @property {number} width - The width size of camera - * @property {number} height - The height size of camera - * @property {number} zoom - The zoom of camera - * @property {number} rotation - The rotation of camera - * @property {boolean} roundPixels - The round pixels st status of camera - * @property {number} scrollX - The horizontal scroll of camera - * @property {number} scrollY - The vertical scroll of camera - * @property {string} backgroundColor - The background color of camera - * @property {(JSONCameraBounds|undefined)} [bounds] - The bounds of camera - */ - -/** - * @classdesc - * A Base Camera class. - * - * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, - * and can be positioned, rotated, zoomed and scrolled accordingly. - * - * A Camera consists of two elements: The viewport and the scroll values. - * - * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are - * created the same size as your game, but their position and size can be set to anything. This means if you - * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, - * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). - * - * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this - * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the - * viewport, and changing the viewport has no impact on the scrolling. - * - * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, - * allowing you to filter Game Objects out on a per-Camera basis. - * - * The Base Camera is extended by the Camera class, which adds in special effects including Fade, - * Flash and Camera Shake, as well as the ability to follow Game Objects. - * - * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow - * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate - * to when they were added to the Camera class. - * - * @class BaseCamera - * @extends Phaser.Events.EventEmitter - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.12.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var BaseCamera = new Class({ - - Extends: EventEmitter, - - initialize: - - function BaseCamera (x, y, width, height) - { - EventEmitter.call(this); - - /** - * A reference to the Scene this camera belongs to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene; - - /** - * A reference to the Game Scene Manager. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager - * @type {Phaser.Scenes.SceneManager} - * @since 3.12.0 - */ - this.sceneManager; - - /** - * A reference to the Game Config. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#config - * @type {object} - * @readOnly - * @since 3.12.0 - */ - this.config; - - /** - * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion. - * This value is a bitmask. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#id - * @type {integer} - * @readOnly - * @since 3.11.0 - */ - this.id = 0; - - /** - * The name of the Camera. This is left empty for your own use. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The resolution of the Game, used in most Camera calculations. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#resolution - * @type {number} - * @readOnly - * @since 3.12.0 - */ - this.resolution = 1; - - /** - * Should this camera round its pixel values to integers? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.roundPixels = false; - - /** - * Is this Camera visible or not? - * - * A visible camera will render and perform input tests. - * An invisible camera will not render anything and will skip input tests. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#visible - * @type {boolean} - * @default true - * @since 3.10.0 - */ - this.visible = true; - - /** - * Is this Camera using a bounds to restrict scrolling movement? - * - * Set this property along with the bounds via `Camera.setBounds`. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.useBounds = false; - - /** - * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at. - * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. - * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. - * You can use it for culling or intersection checks. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#worldView - * @type {Phaser.Geom.Rectangle} - * @readOnly - * @since 3.11.0 - */ - this.worldView = new Rectangle(); - - /** - * Is this Camera dirty? - * - * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. - * - * This flag is cleared during the `postRenderCamera` method of the renderer. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#dirty - * @type {boolean} - * @default true - * @since 3.11.0 - */ - this.dirty = true; - - /** - * The x position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollX` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#x - * @type {number} - * @private - * @since 3.0.0 - */ - this._x = x; - - /** - * The y position of the Camera, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollY` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#y - * @type {number} - * @private - * @since 3.0.0 - */ - this._y = y; - - /** - * Internal Camera X value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cx - * @type {number} - * @private - * @since 3.12.0 - */ - this._cx = 0; - - /** - * Internal Camera Y value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cy - * @type {number} - * @private - * @since 3.12.0 - */ - this._cy = 0; - - /** - * Internal Camera Width value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cw - * @type {number} - * @private - * @since 3.12.0 - */ - this._cw = 0; - - /** - * Internal Camera Height value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_ch - * @type {number} - * @private - * @since 3.12.0 - */ - this._ch = 0; - - /** - * The width of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_width - * @type {number} - * @private - * @since 3.11.0 - */ - this._width = width; - - /** - * The height of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_height - * @type {number} - * @private - * @since 3.11.0 - */ - this._height = height; - - /** - * The bounds the camera is restrained to during scrolling. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); - - /** - * The horizontal scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._scrollX = 0; - - /** - * The vertical scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._scrollY = 0; - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * - * A value of 0.5 would zoom the Camera out, so you can now see twice as much - * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel - * now takes up 2 pixels when rendered. - * - * Set to 1 to return to the default zoom level. - * - * Be careful to never set this value to zero. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom - * @type {number} - * @private - * @default 1 - * @since 3.11.0 - */ - this._zoom = 1; - - /** - * The rotation of the Camera in radians. - * - * 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. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._rotation = 0; - - /** - * A local transform matrix used for internal calculations. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#matrix - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @private - * @since 3.0.0 - */ - this.matrix = new TransformMatrix(); - - /** - * Does this Camera have a transparent background? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#transparent - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.transparent = true; - - /** - * The background color of this Camera. Only used if `transparent` is `false`. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor - * @type {Phaser.Display.Color} - * @since 3.0.0 - */ - this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); - - /** - * The Camera alpha value. Setting this property impacts every single object that this Camera - * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out, - * or via the chainable `setAlpha` method instead. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#alpha - * @type {number} - * @default 1 - * @since 3.11.0 - */ - this.alpha = 1; - - /** - * Should the camera cull Game Objects before checking them for input hit tests? - * In some special cases it may be beneficial to disable this. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.disableCull = false; - - /** - * A temporary array of culled objects. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects - * @type {Phaser.GameObjects.GameObject[]} - * @default [] - * @private - * @since 3.0.0 - */ - this.culledObjects = []; - - /** - * The mid-point of the Camera in 'world' coordinates. - * - * Use it to obtain exactly where in the world the center of the camera is currently looking. - * - * This value is updated in the preRender method, after the scroll values and follower - * have been processed. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint - * @type {Phaser.Math.Vector2} - * @readOnly - * @since 3.11.0 - */ - this.midPoint = new Vector2(width / 2, height / 2); - - /** - * The horizontal origin of rotation for this Camera. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * See `setOrigin` to set both origins in a single, chainable call. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#originX - * @type {number} - * @default 0.5 - * @since 3.11.0 - */ - this.originX = 0.5; - - /** - * The vertical origin of rotation for this Camera. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * See `setOrigin` to set both origins in a single, chainable call. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#originY - * @type {number} - * @default 0.5 - * @since 3.11.0 - */ - this.originY = 0.5; - - /** - * Does this Camera have a custom viewport? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport - * @type {boolean} - * @private - * @default false - * @since 3.12.0 - */ - this._customViewport = false; - }, - - /** - * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha - * @since 3.11.0 - * - * @param {number} [value=1] - The Camera alpha value. - * - * @return {this} This Camera instance. - */ - setAlpha: function (value) - { - if (value === undefined) { value = 1; } - - this.alpha = value; - - return this; - }, - - /** - * Sets the rotation origin of this Camera. - * - * The values are given in the range 0 to 1 and are only used when calculating Camera rotation. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin - * @since 3.11.0 - * - * @param {number} [x=0.5] - The horizontal origin value. - * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. - * - * @return {this} This Camera instance. - */ - setOrigin: function (x, y) - { - if (x === undefined) { x = 0.5; } - if (y === undefined) { y = x; } - - this.originX = x; - this.originY = y; - - return this; - }, - - /** - * Calculates what the Camera.scrollX and scrollY values would need to be in order to move - * the Camera so it is centered on the given x and y coordinates, without actually moving - * the Camera there. The results are clamped based on the Camera bounds, if set. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll - * @since 3.11.0 - * - * @param {number} x - The horizontal coordinate to center on. - * @param {number} y - The vertical coordinate to center on. - * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. - * - * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` abd `y` properties. - */ - getScroll: function (x, y, out) - { - if (out === undefined) { out = new Vector2(); } - - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - out.x = x - originX; - out.y = y - originY; - - if (this.useBounds) - { - out.x = this.clampX(out.x); - out.y = this.clampY(out.y); - } - - return out; - }, - - /** - * Moves the Camera so that it is centered on the given coordinates, bounds allowing. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn - * @since 3.11.0 - * - * @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. - */ - centerOn: function (x, y) - { - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - this.midPoint.set(x, y); - - this.scrollX = x - originX; - this.scrollY = y - originY; - - if (this.useBounds) - { - this.scrollX = this.clampX(this.scrollX); - this.scrollY = this.clampY(this.scrollY); - } - - return this; - }, - - /** - * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - centerToBounds: function () - { - if (this.useBounds) - { - var bounds = this._bounds; - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - this.midPoint.set(bounds.centerX, bounds.centerY); - - this.scrollX = bounds.centerX - originX; - this.scrollY = bounds.centerY - originY; - } - - return this; - }, - - /** - * Moves the Camera so that it is re-centered based on its viewport size. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - centerToSize: function () - { - this.scrollX = this.width * 0.5; - this.scrollY = this.height * 0.5; - - return this; - }, - - /** - * Takes an array of Game Objects and returns a new array featuring only those objects - * visible by this camera. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#cull - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return] - * - * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull. - * - * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera. - */ - cull: function (renderableObjects) - { - if (this.disableCull) - { - return renderableObjects; - } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return renderableObjects; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var culledObjects = this.culledObjects; - var length = renderableObjects.length; - - determinant = 1 / determinant; - - culledObjects.length = 0; - - for (var index = 0; index < length; ++index) - { - var object = renderableObjects[index]; - - if (!object.hasOwnProperty('width') || object.parentContainer) - { - culledObjects.push(object); - continue; - } - - var objectW = object.width; - var objectH = object.height; - var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); - var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); - var tx = (objectX * mva + objectY * mvc + mve); - var ty = (objectX * mvb + objectY * mvd + mvf); - var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); - var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); - var cullW = cameraW + objectW; - var cullH = cameraH + objectH; - - if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && - tw > -objectW && th > -objectH && tw < cullW && th < cullH) - { - culledObjects.push(object); - } - } - - return culledObjects; - }, - - /** - * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform. - * You can optionally provide a Vector2, or similar object, to store the results in. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {number} x - The x position to convert to world space. - * @param {number} y - The y position to convert to world space. - * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created. - * - * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties. - */ - getWorldPoint: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - output.x = x; - output.y = y; - - return output; - } - - determinant = 1 / determinant; - - var ima = mvd * determinant; - var imb = -mvb * determinant; - var imc = -mvc * determinant; - var imd = mva * determinant; - var ime = (mvc * mvf - mvd * mve) * determinant; - var imf = (mvb * mve - mva * mvf) * determinant; - - var c = Math.cos(this.rotation); - var s = Math.sin(this.rotation); - - var zoom = this.zoom; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - - var res = this.resolution; - - var sx = x * res + ((scrollX * c - scrollY * s) * zoom); - var sy = y * res + ((scrollX * s + scrollY * c) * zoom); - - /* Apply transform to point */ - output.x = (sx * ima + sy * imc + ime); - output.y = (sx * imb + sy * imd + imf); - - return output; - }, - - /** - * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings - * so that they are ignored by this Camera. This means they will not be rendered by this Camera. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#ignore - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObject - The Game Object, or array of Game Objects, to be ignored by this Camera. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - ignore: function (gameObject) - { - var id = this.id; - - if (Array.isArray(gameObject)) - { - for (var i = 0; i < gameObject.length; i++) - { - gameObject[i].cameraFilter |= id; - } - } - else - { - gameObject.cameraFilter |= id; - } - - return this; - }, - - /** - * Internal preRender step. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#preRender - * @protected - * @since 3.0.0 - * - * @param {number} baseScale - The base scale, as set in the Camera Manager. - * @param {number} resolution - The game resolution. - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - - var halfWidth = width * 0.5; - var halfHeight = height * 0.5; - - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - - var originX = width * this.originX; - var originY = height * this.originY; - - var sx = this.scrollX; - var sy = this.scrollY; - - if (this.useBounds) - { - sx = this.clampX(sx); - sy = this.clampY(sy); - } - - if (this.roundPixels) - { - originX = Math.round(originX); - originY = Math.round(originY); - } - - // Values are in pixels and not impacted by zooming the Camera - this.scrollX = sx; - this.scrollY = sy; - - var midX = sx + halfWidth; - var midY = sy + halfHeight; - - // The center of the camera, in world space, so taking zoom into account - // Basically the pixel value of what it's looking at in the middle of the cam - this.midPoint.set(midX, midY); - - var displayWidth = width / zoom; - var displayHeight = height / zoom; - - this.worldView.setTo( - midX - (displayWidth / 2), - midY - (displayHeight / 2), - displayWidth, - displayHeight - ); - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - }, - - /** - * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required. - * Do not call this method if you are not using camera bounds. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#clampX - * @since 3.11.0 - * - * @param {number} x - The value to horizontally scroll clamp. - * - * @return {number} The adjusted value to use as scrollX. - */ - clampX: function (x) - { - var bounds = this._bounds; - - var dw = this.displayWidth; - - var bx = bounds.x + ((dw - this.width) / 2); - var bw = Math.max(bx, bx + bounds.width - dw); - - if (x < bx) - { - x = bx; - } - else if (x > bw) - { - x = bw; - } - - return x; - }, - - /** - * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. - * Do not call this method if you are not using camera bounds. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#clampY - * @since 3.11.0 - * - * @param {number} y - The value to vertically scroll clamp. - * - * @return {number} The adjusted value to use as scrollY. - */ - clampY: function (y) - { - var bounds = this._bounds; - - var dh = this.displayHeight; - - var by = bounds.y + ((dh - this.height) / 2); - var bh = Math.max(by, by + bounds.height - dh); - - if (y < by) - { - y = by; - } - else if (y > bh) - { - y = bh; - } - - return y; - }, - - /* - var gap = this._zoomInversed; - return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap); - */ - - /** - * If this Camera has previously had movement bounds set on it, this will remove them. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - removeBounds: function () - { - this.useBounds = false; - - this.dirty = true; - - this._bounds.setEmpty(); - - return this; - }, - - /** - * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * - * Rotating a camera does not rotate the viewport itself, it is applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle - * @since 3.0.0 - * - * @param {number} [value=0] - The cameras angle of rotation, given in degrees. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setAngle: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = DegToRad(value); - - return this; - }, - - /** - * Sets the background color for this Camera. - * - * By default a Camera has a transparent background but it can be given a solid color, with any level - * of transparency, via this method. - * - * The color value can be specified using CSS color notation, hex or numbers. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor - * @since 3.0.0 - * - * @param {(string|number|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. - */ - setBackgroundColor: function (color) - { - if (color === undefined) { color = 'rgba(0,0,0,0)'; } - - this.backgroundColor = ValueToColor(color); - - this.transparent = (this.backgroundColor.alpha === 0); - - return this; - }, - - /** - * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. - * - * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the - * edges and into blank space. It does not limit the placement of Game Objects, or where - * the Camera viewport can be positioned. - * - * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. - * - * Clear the bounds entirely by calling `Camera.removeBounds`. - * - * If you set bounds that are smaller than the viewport it will stop the Camera from being - * able to scroll. The bounds can be positioned where-ever you wish. By default they are from - * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of - * the Camera bounds. However, you can position them anywhere. So if you wanted a game world - * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y - * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find - * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds - * @since 3.0.0 - * - * @param {integer} x - The top-left x coordinate of the bounds. - * @param {integer} y - The top-left y coordinate of the bounds. - * @param {integer} width - The width of the bounds, in pixels. - * @param {integer} height - The height of the bounds, in pixels. - * @param {boolean} [centerOn] - If `true` the Camera will automatically be centered on the new bounds. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setBounds: function (x, y, width, height, centerOn) - { - this._bounds.setTo(x, y, width, height); - - this.dirty = true; - this.useBounds = true; - - if (centerOn) - { - this.centerToBounds(); - } - else - { - this.scrollX = this.clampX(this.scrollX); - this.scrollY = this.clampY(this.scrollY); - } - - return this; - }, - - /** - * Sets the name of this Camera. - * This value is for your own use and isn't used internally. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setName - * @since 3.0.0 - * - * @param {string} [value=''] - The name of the Camera. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setName: function (value) - { - if (value === undefined) { value = ''; } - - this.name = value; - - return this; - }, - - /** - * Set the position of the Camera viewport within the game. - * - * This does not change where the camera is 'looking'. See `setScroll` to control that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition - * @since 3.0.0 - * - * @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. - */ - setPosition: function (x, y) - { - if (y === undefined) { y = x; } - - this.x = x; - this.y = y; - - return this; - }, - - /** - * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * - * Rotating a camera does not rotate the viewport itself, it is applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation - * @since 3.0.0 - * - * @param {number} [value=0] - The rotation of the Camera, in radians. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setRotation: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = value; - - return this; - }, - - /** - * Should the Camera round pixel values to whole integers when rendering Game Objects? - * - * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels - * @since 3.0.0 - * - * @param {boolean} value - `true` to round Camera pixels, `false` to not. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setRoundPixels: function (value) - { - this.roundPixels = value; - - return this; - }, - - /** - * Sets the Scene the Camera is bound to. - * - * Also populates the `resolution` property and updates the internal size values. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setScene - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene the camera is bound to. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setScene: function (scene) - { - this.scene = scene; - - this.config = scene.sys.game.config; - this.sceneManager = scene.sys.game.scene; - - var res = this.config.resolution; - - this.resolution = res; - - this._cx = this._x * res; - this._cy = this._y * res; - this._cw = this._width * res; - this._ch = this._height * res; - - return this; - }, - - /** - * Set the position of where the Camera is looking within the game. - * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. - * Use this method, or the scroll properties, to move your camera around the game world. - * - * This does not change where the camera viewport is placed. See `setPosition` to control that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll - * @since 3.0.0 - * - * @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. - */ - setScroll: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollX = x; - this.scrollY = y; - - return this; - }, - - /** - * Set the size of the Camera viewport. - * - * By default a Camera is the same size as the game, but can be made smaller via this method, - * allowing you to create mini-cam style effects by creating and positioning a smaller Camera - * viewport within your game. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setSize - * @since 3.0.0 - * - * @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. - */ - setSize: function (width, height) - { - if (height === undefined) { height = width; } - - this.width = width; - this.height = height; - - return this; - }, - - /** - * This method sets the position and size of the Camera viewport in a single call. - * - * If you're trying to change where the Camera is looking at in your game, then see - * the method `Camera.setScroll` instead. This method is for changing the viewport - * itself, not what the camera can see. - * - * By default a Camera is the same size as the game, but can be made smaller via this method, - * allowing you to create mini-cam style effects by creating and positioning a smaller Camera - * viewport within your game. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport - * @since 3.0.0 - * - * @param {number} x - The top-left x coordinate of the Camera viewport. - * @param {number} y - The top-left y coordinate of the Camera viewport. - * @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. - */ - setViewport: function (x, y, width, height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - - return this; - }, - - /** - * Set the zoom value of the Camera. - * - * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. - * Changing to a larger value, such as 2, will cause the camera to 'zoom in'. - * - * A value of 1 means 'no zoom' and is the default. - * - * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom - * @since 3.0.0 - * - * @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. - */ - setZoom: function (value) - { - if (value === undefined) { value = 1; } - - if (value === 0) - { - value = 0.001; - } - - this.zoom = value; - - return this; - }, - - /** - * Sets the visibility of this Camera. - * - * An invisible Camera will skip rendering and input tests of everything it can see. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible - * @since 3.10.0 - * - * @param {boolean} value - The visible state of the Camera. - * - * @return {this} This Camera instance. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - }, - - /** - * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON - * @since 3.0.0 - * - * @return {JSONCamera} A well-formed object suitable for conversion to JSON. - */ - toJSON: function () - { - var output = { - 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 - }; - - if (this.useBounds) - { - output['bounds'] = { - x: this._bounds.x, - y: this._bounds.y, - width: this._bounds.width, - height: this._bounds.height - }; - } - - return output; - }, - - /** - * Internal method called automatically by the Camera Manager. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#update - * @protected - * @since 3.0.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 () - { - // NOOP - }, - - /** - * Internal method called automatically when the viewport changes. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem - * @private - * @since 3.12.0 - */ - updateSystem: function () - { - var custom = false; - - if (this._x !== 0 || this._y !== 0) - { - custom = true; - } - else - { - var gameWidth = this.config.width; - var gameHeight = this.config.height; - - if (gameWidth !== this._width || gameHeight !== this._height) - { - custom = true; - } - } - - var sceneManager = this.sceneManager; - - if (custom && !this._customViewport) - { - // We need a custom viewport for this Camera - sceneManager.customViewports++; - } - else if (!custom && this._customViewport) - { - // We're turning off a custom viewport for this Camera - sceneManager.customViewports--; - } - - this.dirty = true; - this._customViewport = custom; - }, - - /** - * This event is fired when a camera is destroyed by the Camera Manager. - * - * @event CameraDestroyEvent - * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed. - */ - - /** - * Destroys this Camera instance. You rarely need to call this directly. - * - * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as - * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#destroy - * @fires CameraDestroyEvent - * @since 3.0.0 - */ - destroy: function () - { - this.emit('cameradestroy', this); - - this.removeAllListeners(); - - this.matrix.destroy(); - - this.culledObjects = []; - - if (this._customViewport) - { - // We're turning off a custom viewport for this Camera - this.sceneManager.customViewports--; - } - - this._bounds = null; - - this.scene = null; - this.config = null; - this.sceneManager = null; - }, - - /** - * The x position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollX` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#x - * @type {number} - * @since 3.0.0 - */ - x: { - - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - this._cx = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The y position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollY` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#y - * @type {number} - * @since 3.0.0 - */ - y: { - - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - this._cy = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The width of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#width - * @type {number} - * @since 3.0.0 - */ - width: { - - get: function () - { - return this._width; - }, - - set: function (value) - { - this._width = value; - this._cw = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The height of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#height - * @type {number} - * @since 3.0.0 - */ - height: { - - get: function () - { - return this._height; - }, - - set: function (value) - { - this._height = value; - this._ch = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The horizontal scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX - * @type {number} - * @default 0 - * @since 3.0.0 - */ - scrollX: { - - get: function () - { - return this._scrollX; - }, - - set: function (value) - { - this._scrollX = value; - this.dirty = true; - } - - }, - - /** - * The vertical scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY - * @type {number} - * @default 0 - * @since 3.0.0 - */ - scrollY: { - - get: function () - { - return this._scrollY; - }, - - set: function (value) - { - this._scrollY = value; - this.dirty = true; - } - - }, - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * - * A value of 0.5 would zoom the Camera out, so you can now see twice as much - * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel - * now takes up 2 pixels when rendered. - * - * Set to 1 to return to the default zoom level. - * - * Be careful to never set this value to zero. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#zoom - * @type {number} - * @default 1 - * @since 3.0.0 - */ - zoom: { - - get: function () - { - return this._zoom; - }, - - set: function (value) - { - this._zoom = value; - this.dirty = true; - } - - }, - - /** - * The rotation of the Camera in radians. - * - * 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. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#rotation - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - rotation: { - - get: function () - { - return this._rotation; - }, - - set: function (value) - { - this._rotation = value; - this.dirty = true; - } - - }, - - /** - * The x position of the center of the Camera's viewport, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#centerX - * @type {number} - * @readOnly - * @since 3.10.0 - */ - centerX: { - - get: function () - { - return this.x + (0.5 * this.width); - } - - }, - - /** - * The y position of the center of the Camera's viewport, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#centerY - * @type {number} - * @readOnly - * @since 3.10.0 - */ - centerY: { - - get: function () - { - return this.y + (0.5 * this.height); - } - - }, - - /** - * The displayed width of the camera viewport, factoring in the camera zoom level. - * - * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width - * would be 1600, as it's displaying twice as many pixels as zoom level 1. - * - * Equally, a camera with a width of 800 and zoom of 2 would have a display width - * of 400 pixels. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth - * @type {number} - * @readOnly - * @since 3.11.0 - */ - displayWidth: { - - get: function () - { - return this.width / this.zoom; - } - - }, - - /** - * The displayed height of the camera viewport, factoring in the camera zoom level. - * - * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height - * would be 1200, as it's displaying twice as many pixels as zoom level 1. - * - * Equally, a camera with a height of 600 and zoom of 2 would have a display height - * of 300 pixels. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight - * @type {number} - * @readOnly - * @since 3.11.0 - */ - displayHeight: { - - get: function () - { - return this.height / this.zoom; - } - - } - -}); - -module.exports = BaseCamera; - - /***/ }), /* 290 */, /* 291 */, @@ -52864,7 +53128,7 @@ module.exports = GetPoint; */ var GetPoint = __webpack_require__(137); -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -53531,17 +53795,21 @@ module.exports = GetPoint; /* 305 */ /***/ (function(module, exports, __webpack_require__) { +/* eslint no-console: 0 */ + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var AdInstance = __webpack_require__(512); var Class = __webpack_require__(0); var DataManager = __webpack_require__(59); var EventEmitter = __webpack_require__(8); -var GetValue = __webpack_require__(3); -var LeaderboardScore = __webpack_require__(507); +var Leaderboard = __webpack_require__(511); +var Product = __webpack_require__(509); +var Purchase = __webpack_require__(508); /** * @classdesc @@ -53562,7 +53830,7 @@ var FacebookInstantGamesPlugin = new Class({ initialize: - function FacebookInstantGamesPlugin (game, config) + function FacebookInstantGamesPlugin (game) { EventEmitter.call(this); @@ -53584,18 +53852,31 @@ var FacebookInstantGamesPlugin = new Class({ this.hasLoaded = false; this.dataLocked = false; - this.apis = []; + this.supportedAPIs = []; + this.entryPoint = ''; this.entryPointData = null; - this.contextID = 0; - this.contextType = ''; - this.locale = ''; - this.platform = ''; - this.version = ''; + this.contextID = null; - this.playerID = ''; - this.playerName = ''; - this.playerPhotoURL = ''; + // POST - A facebook post. + // THREAD - A messenger thread. + // GROUP - A facebook group. + // SOLO - Default context, where the player is the only participant. + this.contextType = null; + this.locale = null; + this.platform = null; + this.version = null; + + this.playerID = null; + this.playerName = null; + this.playerPhotoURL = null; + this.playerCanSubscribeBot = false; + + this.paymentsReady = false; + this.catalog = []; + this.purchases = []; + this.leaderboards = {}; + this.ads = []; }, setDataHandler: function (parent, key, value) @@ -53612,8 +53893,10 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('sdh saved', data); + _this.emit('savedata', data); }); }, @@ -53632,25 +53915,30 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('cdh saved', data); + _this.emit('savedata', data); }); }, showLoadProgress: function (scene) { - scene.load.on('progress', function (value) { + scene.load.on('progress', function (value) + { if (!this.hasLoaded) { console.log(value); + FBInstant.setLoadingProgress(value * 100); } }, this); - scene.load.on('complete', function () { + scene.load.on('complete', function () + { this.hasLoaded = true; @@ -53667,56 +53955,227 @@ var FacebookInstantGamesPlugin = new Class({ { console.log('FBP gameStarted'); - this.apis = FBInstant.getSupportedAPIs(); + var APIs = FBInstant.getSupportedAPIs(); - this.contextID = FBInstant.context.getID(); - this.contextType = FBInstant.context.getType(); - this.locale = FBInstant.getLocale(); - this.platform = FBInstant.getPlatform(); - this.version = FBInstant.getSDKVersion(); + var supported = {}; - this.playerID = FBInstant.player.getID(); - this.playerName = FBInstant.player.getName(); - this.playerPhotoURL = FBInstant.player.getPhoto(); + var dotToUpper = function (match) + { + return match[1].toUpperCase(); + }; + + APIs.forEach(function (api) + { + api = api.replace(/\../g, dotToUpper); + + supported[api] = true; + }); + + this.supportedAPIs = supported; + + console.log(this.supportedAPIs); + + this.getID(); + this.getType(); + this.getLocale(); + this.getPlatform(); + this.getSDKVersion(); + + this.getPlayerID(); + this.getPlayerName(); + this.getPlayerPhotoURL(); var _this = this; - FBInstant.onPause(function() { + FBInstant.onPause(function () + { _this.emit('pause'); }); - FBInstant.getEntryPointAsync().then(function (entrypoint) { - + FBInstant.getEntryPointAsync().then(function (entrypoint) + { _this.entryPoint = entrypoint; _this.entryPointData = FBInstant.getEntryPointData(); + _this.emit('startgame'); + }).catch(function (e) + { + console.warn(e); }); - // this.emit('startgame'); + // Facebook.com and Android 6 only + if (this.supportedAPIs.paymentsPurchaseAsync) + { + FBInstant.payments.onReady(function () + { + console.log('payments ready'); + + _this.paymentsReady = true; + }).catch(function (e) + { + console.warn(e); + }); + } + }, + + checkAPI: function (api) + { + if (!this.supportedAPIs[api]) + { + console.warn(api + ' not supported'); + + return false; + } + else + { + return true; + } + }, + + getID: function () + { + if (!this.contextID && this.supportedAPIs.contextGetID) + { + this.contextID = FBInstant.context.getID(); + } + + return this.contextID; + }, + + getType: function () + { + if (!this.contextType && this.supportedAPIs.contextGetType) + { + this.contextType = FBInstant.context.getType(); + } + + return this.contextType; + }, + + getLocale: function () + { + if (!this.locale && this.supportedAPIs.getLocale) + { + this.locale = FBInstant.getLocale(); + } + + return this.locale; + }, + + getPlatform: function () + { + if (!this.platform && this.supportedAPIs.getPlatform) + { + this.platform = FBInstant.getPlatform(); + } + + return this.platform; + }, + + getSDKVersion: function () + { + if (!this.version && this.supportedAPIs.getSDKVersion) + { + this.version = FBInstant.getSDKVersion(); + } + + return this.version; + }, + + getPlayerID: function () + { + if (!this.playerID && this.supportedAPIs.playerGetID) + { + this.playerID = FBInstant.player.getID(); + } + + return this.playerID; + }, + + getPlayerName: function () + { + if (!this.playerName && this.supportedAPIs.playerGetName) + { + this.playerName = FBInstant.player.getName(); + } + + return this.playerName; + }, + + getPlayerPhotoURL: function () + { + if (!this.playerPhotoURL && this.supportedAPIs.playerGetPhoto) + { + this.playerPhotoURL = FBInstant.player.getPhoto(); + } + + return this.playerPhotoURL; }, loadPlayerPhoto: function (scene, key) { - console.log('load'); + if (this.playerPhotoURL) + { + console.log('load'); - scene.load.setCORS('anonymous'); + scene.load.setCORS('anonymous'); + + scene.load.image(key, this.playerPhotoURL); + + scene.load.on('complete', function () + { + this.emit('photocomplete', key); + }, this); + + scene.load.start(); + } - scene.load.image(key, this.playerPhotoURL); + return this; + }, - scene.load.on('complete', function () { + canSubscribeBot: function () + { + if (this.supportedAPIs.playerCanSubscribeBotAsync) + { + var _this = this; - this.emit('photocomplete', key); + FBInstant.player.canSubscribeBotAsync().then(function () + { + _this.playerCanSubscribeBot = true; - }, this); + _this.emit('cansubscribebot'); + }); + } - scene.load.start(); + return this; + }, + + subscribeBot: function () + { + if (this.playerCanSubscribeBot) + { + var _this = this; + + FBInstant.player.subscribeBotAsync().then(function () + { + _this.emit('subscribebot'); + }).catch(function () + { + _this.emit('subscribebotfailed'); + }); + } return this; }, getData: function (keys) { + if (!this.checkAPI('playerGetDataAsync')) + { + return this; + } + if (!Array.isArray(keys)) { keys = [ keys ]; @@ -53726,8 +54185,8 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.getDataAsync(keys).then(function(data) { - + FBInstant.player.getDataAsync(keys).then(function (data) + { console.log('getdata req', data); _this.dataLocked = true; @@ -53740,7 +54199,6 @@ var FacebookInstantGamesPlugin = new Class({ _this.dataLocked = false; _this.emit('getdata', data); - }); return this; @@ -53748,22 +54206,55 @@ var FacebookInstantGamesPlugin = new Class({ saveData: function (data) { + if (!this.checkAPI('playerSetDataAsync')) + { + return this; + } + var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('data saved to fb'); + _this.emit('savedata', data); }); return this; }, + flushData: function () + { + if (!this.checkAPI('playerFlushDataAsync')) + { + return this; + } + + var _this = this; + + FBInstant.player.flushDataAsync().then(function () + { + console.log('data flushed'); + + _this.emit('flushdata'); + }); + + return this; + }, + getStats: function (keys) { + if (!this.checkAPI('playerGetStatsAsync')) + { + return this; + } + var _this = this; - FBInstant.player.getStatsAsync(keys).then(function(data) { + FBInstant.player.getStatsAsync(keys).then(function (data) + { console.log('stats got from fb'); + _this.emit('getstats', data); }); @@ -53772,6 +54263,11 @@ var FacebookInstantGamesPlugin = new Class({ saveStats: function (data) { + if (!this.checkAPI('playerSetStatsAsync')) + { + return this; + } + var output = {}; for (var key in data) @@ -53784,7 +54280,8 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setStatsAsync(output).then(function() { + FBInstant.player.setStatsAsync(output).then(function () + { console.log('stats saved to fb'); _this.emit('savestats', output); }); @@ -53794,6 +54291,11 @@ var FacebookInstantGamesPlugin = new Class({ incStats: function (data) { + if (!this.checkAPI('playerIncrementStatsAsync')) + { + return this; + } + var output = {}; for (var key in data) @@ -53806,8 +54308,10 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.incrementStatsAsync(output).then(function(stats) { + FBInstant.player.incrementStatsAsync(output).then(function (stats) + { console.log('stats modified'); + _this.emit('incstats', stats); }); @@ -53816,6 +54320,11 @@ var FacebookInstantGamesPlugin = new Class({ saveSession: function (data) { + if (!this.checkAPI('setSessionData')) + { + return this; + } + var test = JSON.stringify(data); if (test.length <= 1000) @@ -53850,26 +54359,13 @@ var FacebookInstantGamesPlugin = new Class({ return this._share('CHALLENGE', text, key, frame, sessionData); }, - createShortcut: function () - { - var _this = this; - - FBInstant.canCreateShortcutAsync().then(function(canCreateShortcut) { - - if (canCreateShortcut) - { - FBInstant.createShortcutAsync().then(function() { - _this.emit('shortcutcreated'); - }).catch(function() { - _this.emit('shortcutfailed'); - }); - } - - }); - }, - _share: function (intent, text, key, frame, sessionData) { + if (!this.checkAPI('shareAsync')) + { + return this; + } + if (sessionData === undefined) { sessionData = {}; } if (key) @@ -53893,15 +54389,318 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.shareAsync(payload).then(function() { + FBInstant.shareAsync(payload).then(function () + { _this.emit('resume'); }); return this; }, + isSizeBetween: function (min, max) + { + if (!this.checkAPI('contextIsSizeBetween')) + { + return this; + } + + return FBInstant.context.isSizeBetween(min, max); + }, + + switchContext: function (contextID) + { + if (!this.checkAPI('contextSwitchAsync')) + { + return this; + } + + if (contextID !== this.contextID) + { + var _this = this; + + FBInstant.context.switchAsync(contextID).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('switch', _this.contextID); + }); + } + + return this; + }, + + chooseContext: function (options) + { + if (!this.checkAPI('contextChoseAsync')) + { + return this; + } + + var _this = this; + + FBInstant.context.chooseAsync(options).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('choose', _this.contextID); + }); + + return this; + }, + + createContext: function (playerID) + { + if (!this.checkAPI('contextCreateAsync')) + { + return this; + } + + var _this = this; + + FBInstant.context.createAsync(playerID).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('create', _this.contextID); + }); + + return this; + }, + + getPlayers: function () + { + if (!this.checkAPI('playerGetConnectedPlayersAsync')) + { + return this; + } + + var _this = this; + + FBInstant.player.getConnectedPlayersAsync().then(function (players) + { + console.log('got player data'); + console.log(players); + + _this.emit('players', players); + }); + + return this; + }, + + getCatalog: function () + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + var catalog = this.catalog; + + FBInstant.payments.getCatalogAsync().then(function (data) + { + console.log('got catalog'); + + catalog = []; + + data.forEach(function (item) + { + + catalog.push(Product(item)); + + }); + + _this.emit('getcatalog', catalog); + }); + + return this; + }, + + purchase: function (productID, developerPayload) + { + if (!this.paymentsReady) + { + return this; + } + + var config = {productID: productID}; + + if (developerPayload) + { + config.developerPayload = developerPayload; + } + + var _this = this; + + FBInstant.payments.purchaseAsync(config).then(function (data) + { + var purchase = Purchase(data); + + console.log('product purchase', purchase); + + _this.emit('purchase', purchase); + }); + + return this; + }, + + getPurchases: function () + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + var purchases = this.purchases; + + FBInstant.payments.getPurchasesAsync().then(function (data) + { + console.log('got purchases'); + + purchases = []; + + data.forEach(function (item) + { + + purchases.push(Purchase(item)); + + }); + + _this.emit('getpurchases', purchases); + }); + + return this; + }, + + consumePurchases: function (purchaseToken) + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + + FBInstant.payments.consumePurchaseAsync(purchaseToken).then(function () + { + console.log('purchase consumed'); + + _this.emit('consumepurchase', purchaseToken); + }); + + return this; + }, + + update: function (cta, text, key, frame, template, updateData) + { + return this._update('CUSTOM', cta, text, key, frame, template, updateData); + }, + + updateLeaderboard: function (cta, text, key, frame, template, updateData) + { + return this._update('LEADERBOARD', cta, text, key, frame, template, updateData); + }, + + _update: function (action, cta, text, key, frame, template, updateData) + { + if (!this.checkAPI('shareAsync')) + { + return this; + } + + if (cta === undefined) { cta = ''; } + + if (typeof text === 'string') + { + text = {default: text}; + } + + if (updateData === undefined) { updateData = {}; } + + if (key) + { + var imageData = this.game.textures.getBase64(key, frame); + } + + var payload = { + action: action, + cta: cta, + image: imageData, + text: text, + template: template, + data: updateData, + strategy: 'IMMEDIATE', + notification: 'NO_PUSH' + }; + + var _this = this; + + FBInstant.updateAsync(payload).then(function () + { + _this.emit('update'); + }); + + return this; + }, + + switchGame: function (appID, data) + { + if (!this.checkAPI('switchGameAsync')) + { + return this; + } + + if (data) + { + var test = JSON.stringify(data); + + if (test.length > 1000) + { + console.warn('Switch Game data too long. Max 1000 chars.'); + return this; + } + } + + var _this = this; + + FBInstant.switchGameAsync(appID, data).then(function () + { + _this.emit('switchgame', appID); + }); + + return this; + }, + + createShortcut: function () + { + var _this = this; + + FBInstant.canCreateShortcutAsync().then(function (canCreateShortcut) + { + if (canCreateShortcut) + { + FBInstant.createShortcutAsync().then(function () + { + _this.emit('shortcutcreated'); + }).catch(function () + { + _this.emit('shortcutfailed'); + }); + } + + }); + }, + + quit: function () + { + FBInstant.quit(); + }, + log: function (name, value, params) { + if (!this.checkAPI('logEvent')) + { + return this; + } + if (params === undefined) { params = {}; } if (name.length >= 2 && name.length <= 40) @@ -53912,6 +54711,232 @@ var FacebookInstantGamesPlugin = new Class({ return this; }, + preloadAds: function (placementID) + { + if (!this.checkAPI('getInterstitialAdAsync')) + { + return this; + } + + if (!Array.isArray(placementID)) + { + placementID = [ placementID ]; + } + + var i; + var _this = this; + + var total = 0; + + for (i = 0; i < this.ads.length; i++) + { + if (!this.ads[i].shown) + { + total++; + } + } + + if (total + placementID.length >= 3) + { + console.warn('Too many AdInstances. Show an ad before loading more'); + return this; + } + + for (i = 0; i < placementID.length; i++) + { + var id = placementID[i]; + + FBInstant.getInterstitialAdAsync(id).then(function (data) + { + console.log('ad preloaded'); + + var ad = AdInstance(data, true); + + _this.ads.push(ad); + + return ad.loadAsync(); + + }).catch(function (e) + { + console.error(e); + }); + } + + return this; + }, + + preloadVideoAds: function (placementID) + { + if (!this.checkAPI('getRewardedVideoAsync')) + { + return this; + } + + if (!Array.isArray(placementID)) + { + placementID = [ placementID ]; + } + + var i; + var _this = this; + + var total = 0; + + for (i = 0; i < this.ads.length; i++) + { + if (!this.ads[i].shown) + { + total++; + } + } + + if (total + placementID.length >= 3) + { + console.warn('Too many AdInstances. Show an ad before loading more'); + return this; + } + + for (i = 0; i < placementID.length; i++) + { + var id = placementID[i]; + + FBInstant.getRewardedVideoAsync(id).then(function (data) + { + console.log('video ad preloaded'); + + var ad = AdInstance(data, true); + + _this.ads.push(ad); + + return ad.loadAsync(); + + }).catch(function (e) + { + console.error(e); + }); + } + + return this; + }, + + showAd: function (placementID) + { + var _this = this; + + for (var i = 0; i < this.ads.length; i++) + { + var ad = this.ads[i]; + + if (ad.placementID === placementID) + { + ad.instance.showAsync().then(function () + { + ad.shown = true; + + _this.emit('showad', ad); + }).catch(function (e) + { + if (e.code === 'ADS_NO_FILL') + { + _this.emit('adsnofill'); + } + else + { + console.error(e); + } + }); + } + } + + return this; + }, + + showVideo: function (placementID) + { + var _this = this; + + for (var i = 0; i < this.ads.length; i++) + { + var ad = this.ads[i]; + + if (ad.placementID === placementID && ad.video) + { + ad.instance.showAsync().then(function () + { + ad.shown = true; + + _this.emit('showvideo', ad); + }).catch(function (e) + { + if (e.code === 'ADS_NO_FILL') + { + _this.emit('adsnofill'); + } + else + { + console.error(e); + } + }); + } + } + + return this; + }, + + matchPlayer: function (matchTag, switchImmediately) + { + if (matchTag === undefined) { matchTag = null; } + if (switchImmediately === undefined) { switchImmediately = false; } + + if (!this.checkAPI('matchPlayerAsync')) + { + return this; + } + + var _this = this; + + FBInstant.matchPlayerAsync(matchTag, switchImmediately).then(function () + { + console.log('match player'); + + _this.getID(); + _this.getType(); + + _this.emit('matchplayer', _this.contextID, _this.contextType); + }); + + return this; + }, + + // TODO: checkCanPlayerMatchAsync ? + + getLeaderboard: function (name) + { + if (!this.checkAPI('getLeaderboardAsync')) + { + return this; + } + + var _this = this; + + FBInstant.getLeaderboardAsync(name).then(function (data) + { + console.log('leaderboard'); + console.log(data); + + var leaderboard = new Leaderboard(_this, data); + + _this.leaderboards[name] = leaderboard; + + _this.emit('getleaderboard', leaderboard); + }).catch(function (e) + { + console.warn(e); + }); + + return this; + }, + /** * Destroys the FacebookInstantGamesPlugin. * @@ -54989,9 +56014,9 @@ module.exports = Animation; */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(168); +var NumberTweenBuilder = __webpack_require__(169); var PluginCache = __webpack_require__(10); -var TimelineBuilder = __webpack_require__(167); +var TimelineBuilder = __webpack_require__(168); var TWEEN_CONST = __webpack_require__(62); var TweenBuilder = __webpack_require__(72); @@ -55750,12 +56775,12 @@ module.exports = { GetBoolean: __webpack_require__(63), GetEaseFunction: __webpack_require__(64), GetNewValue: __webpack_require__(73), - GetProps: __webpack_require__(170), - GetTargets: __webpack_require__(103), - GetTweens: __webpack_require__(169), - GetValueOp: __webpack_require__(102), - NumberTweenBuilder: __webpack_require__(168), - TimelineBuilder: __webpack_require__(167), + GetProps: __webpack_require__(171), + GetTargets: __webpack_require__(104), + GetTweens: __webpack_require__(170), + GetValueOp: __webpack_require__(103), + NumberTweenBuilder: __webpack_require__(169), + TimelineBuilder: __webpack_require__(168), TweenBuilder: __webpack_require__(72) }; @@ -55783,9 +56808,9 @@ var Tweens = { Builders: __webpack_require__(309), TweenManager: __webpack_require__(307), - Tween: __webpack_require__(100), - TweenData: __webpack_require__(99), - Timeline: __webpack_require__(166) + Tween: __webpack_require__(101), + TweenData: __webpack_require__(100), + Timeline: __webpack_require__(167) }; @@ -55807,7 +56832,7 @@ module.exports = Tweens; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(10); -var TimerEvent = __webpack_require__(171); +var TimerEvent = __webpack_require__(172); /** * @classdesc @@ -56206,7 +57231,7 @@ module.exports = Clock; module.exports = { Clock: __webpack_require__(311), - TimerEvent: __webpack_require__(171) + TimerEvent: __webpack_require__(172) }; @@ -56299,11 +57324,11 @@ var FilterMode = __webpack_require__(327); var Textures = { FilterMode: FilterMode, - Frame: __webpack_require__(94), - Parsers: __webpack_require__(189), - Texture: __webpack_require__(120), - TextureManager: __webpack_require__(191), - TextureSource: __webpack_require__(190) + Frame: __webpack_require__(95), + Parsers: __webpack_require__(190), + Texture: __webpack_require__(121), + TextureManager: __webpack_require__(192), + TextureSource: __webpack_require__(191) }; @@ -56328,10 +57353,10 @@ module.exports = Textures; module.exports = { - List: __webpack_require__(93), + List: __webpack_require__(94), Map: __webpack_require__(127), - ProcessQueue: __webpack_require__(229), - RTree: __webpack_require__(228), + ProcessQueue: __webpack_require__(231), + RTree: __webpack_require__(230), Set: __webpack_require__(70) }; @@ -56379,19 +57404,19 @@ module.exports = { module.exports = { - SoundManagerCreator: __webpack_require__(198), + SoundManagerCreator: __webpack_require__(199), BaseSound: __webpack_require__(78), BaseSoundManager: __webpack_require__(79), - WebAudioSound: __webpack_require__(192), - WebAudioSoundManager: __webpack_require__(193), + WebAudioSound: __webpack_require__(193), + WebAudioSoundManager: __webpack_require__(194), - HTML5AudioSound: __webpack_require__(196), - HTML5AudioSoundManager: __webpack_require__(197), + HTML5AudioSound: __webpack_require__(197), + HTML5AudioSoundManager: __webpack_require__(198), - NoAudioSound: __webpack_require__(194), - NoAudioSoundManager: __webpack_require__(195) + NoAudioSound: __webpack_require__(195), + NoAudioSoundManager: __webpack_require__(196) }; @@ -57399,10 +58424,10 @@ var Extend = __webpack_require__(17); var Scene = { - SceneManager: __webpack_require__(201), + SceneManager: __webpack_require__(202), ScenePlugin: __webpack_require__(331), - Settings: __webpack_require__(199), - Systems: __webpack_require__(121) + Settings: __webpack_require__(200), + Systems: __webpack_require__(122) }; @@ -57422,7 +58447,7 @@ module.exports = Scene; * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(172); +var BasePlugin = __webpack_require__(173); var Class = __webpack_require__(0); /** @@ -57535,10 +58560,10 @@ module.exports = ScenePlugin; module.exports = { - BasePlugin: __webpack_require__(172), - DefaultPlugins: __webpack_require__(123), + BasePlugin: __webpack_require__(173), + DefaultPlugins: __webpack_require__(124), PluginCache: __webpack_require__(10), - PluginManager: __webpack_require__(203), + PluginManager: __webpack_require__(204), ScenePlugin: __webpack_require__(333) }; @@ -59272,7 +60297,7 @@ var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -59603,12 +60628,12 @@ module.exports = MultiAtlasFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AudioFile = __webpack_require__(175); +var AudioFile = __webpack_require__(176); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -59909,7 +60934,7 @@ var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -60168,7 +61193,7 @@ module.exports = AtlasJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); /** * @classdesc @@ -60375,7 +61400,7 @@ module.exports = AnimationJSONFile; /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(204) + TouchManager: __webpack_require__(205) }; /* eslint-enable */ @@ -60398,7 +61423,7 @@ module.exports = { /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(206) + MouseManager: __webpack_require__(207) }; /* eslint-enable */ @@ -60673,7 +61698,7 @@ module.exports = ProcessKeyDown; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var KeyCodes = __webpack_require__(110); +var KeyCodes = __webpack_require__(111); var KeyMap = {}; @@ -60857,9 +61882,9 @@ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var GetValue = __webpack_require__(3); var InputPluginCache = __webpack_require__(76); -var Key = __webpack_require__(178); -var KeyCodes = __webpack_require__(110); -var KeyCombo = __webpack_require__(177); +var Key = __webpack_require__(179); +var KeyCodes = __webpack_require__(111); +var KeyCombo = __webpack_require__(178); var KeyMap = __webpack_require__(374); var ProcessKeyDown = __webpack_require__(373); var ProcessKeyUp = __webpack_require__(372); @@ -61495,10 +62520,10 @@ module.exports = { KeyboardPlugin: __webpack_require__(378), - Key: __webpack_require__(178), - KeyCodes: __webpack_require__(110), + Key: __webpack_require__(179), + KeyCodes: __webpack_require__(111), - KeyCombo: __webpack_require__(177), + KeyCombo: __webpack_require__(178), JustDown: __webpack_require__(371), JustUp: __webpack_require__(370), @@ -61554,13 +62579,13 @@ module.exports = CreatePixelPerfectHandler; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); -var CreateInteractiveObject = __webpack_require__(182); +var CreateInteractiveObject = __webpack_require__(183); var CreatePixelPerfectHandler = __webpack_require__(380); var DistanceBetween = __webpack_require__(58); -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); var EllipseContains = __webpack_require__(55); var EventEmitter = __webpack_require__(8); var GetFastValue = __webpack_require__(1); @@ -61568,7 +62593,7 @@ var InputPluginCache = __webpack_require__(76); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(10); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); var Triangle = __webpack_require__(68); var TriangleContains = __webpack_require__(61); @@ -64086,7 +65111,7 @@ module.exports = { var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); -var Gamepad = __webpack_require__(179); +var Gamepad = __webpack_require__(180); var GetValue = __webpack_require__(3); var InputPluginCache = __webpack_require__(76); @@ -64733,9 +65758,9 @@ module.exports = GamepadPlugin; module.exports = { - Axis: __webpack_require__(181), - Button: __webpack_require__(180), - Gamepad: __webpack_require__(179), + Axis: __webpack_require__(182), + Button: __webpack_require__(181), + Gamepad: __webpack_require__(180), GamepadPlugin: __webpack_require__(386), Configs: __webpack_require__(385) @@ -64752,7 +65777,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(207); +var CONST = __webpack_require__(208); var Extend = __webpack_require__(17); /** @@ -64761,14 +65786,14 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(182), + CreateInteractiveObject: __webpack_require__(183), Gamepad: __webpack_require__(387), - InputManager: __webpack_require__(208), + InputManager: __webpack_require__(209), InputPlugin: __webpack_require__(381), InputPluginCache: __webpack_require__(76), Keyboard: __webpack_require__(379), Mouse: __webpack_require__(367), - Pointer: __webpack_require__(205), + Pointer: __webpack_require__(206), Touch: __webpack_require__(366) }; @@ -64807,9 +65832,9 @@ module.exports = Input; */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Text = __webpack_require__(111); +var Text = __webpack_require__(112); /** * Creates a new Text Game Object and returns it. @@ -64895,7 +65920,7 @@ GameObjectCreator.register('text', function (config, addToScene) var BuildGameObject = __webpack_require__(25); var BuildGameObjectAnimation = __webpack_require__(130); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var Sprite = __webpack_require__(35); @@ -64955,7 +65980,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var Image = __webpack_require__(69); @@ -65004,8 +66029,8 @@ GameObjectCreator.register('image', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); -var Graphics = __webpack_require__(117); +var GameObjectCreator = __webpack_require__(14); +var Graphics = __webpack_require__(118); /** * Creates a new Graphics Game Object and returns it. @@ -65052,7 +66077,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Text = __webpack_require__(111); +var Text = __webpack_require__(112); var GameObjectFactory = __webpack_require__(9); /** @@ -65183,7 +66208,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Graphics = __webpack_require__(117); +var Graphics = __webpack_require__(118); var GameObjectFactory = __webpack_require__(9); /** @@ -65223,7 +66248,7 @@ GameObjectFactory.register('graphics', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Calculates the ascent, descent and fontSize of a given font style. @@ -66704,7 +67729,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(116); +var Commands = __webpack_require__(117); var Utils = __webpack_require__(21); // TODO: Remove the use of this @@ -67043,12 +68068,12 @@ if (true) renderWebGL = __webpack_require__(433); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(183); + renderCanvas = __webpack_require__(184); } if (true) { - renderCanvas = __webpack_require__(183); + renderCanvas = __webpack_require__(184); } module.exports = { @@ -67312,7 +68337,7 @@ module.exports = ContainsPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -67742,7 +68767,7 @@ module.exports = Swap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Scans the array for elements with the given property. If found, the property is set to the `value`. @@ -67916,7 +68941,7 @@ module.exports = RemoveRandomElement; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Removes the item within the given range in the array. @@ -68030,7 +69055,7 @@ module.exports = RemoveAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RoundAwayFromZero = __webpack_require__(249); +var RoundAwayFromZero = __webpack_require__(251); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -68302,7 +69327,7 @@ module.exports = MoveDown; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns the first element in the array. @@ -68361,7 +69386,7 @@ module.exports = GetFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns all elements in the array. @@ -68423,7 +69448,7 @@ module.exports = GetAll; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Passes each element in the array, between the start and end indexes, to the given callback. @@ -68525,7 +69550,7 @@ module.exports = Each; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns the total number of elements in the array which have a property matching the given value. @@ -69006,7 +70031,7 @@ module.exports = ReverseColumns; */ var Pad = __webpack_require__(135); -var CheckMatrix = __webpack_require__(119); +var CheckMatrix = __webpack_require__(120); // Generates a string (which you can pass to console.log) from the given // Array Matrix. @@ -69092,7 +70117,7 @@ module.exports = MatrixToString; module.exports = { - CheckMatrix: __webpack_require__(119), + CheckMatrix: __webpack_require__(120), MatrixToString: __webpack_require__(474), ReverseColumns: __webpack_require__(473), ReverseRows: __webpack_require__(472), @@ -69100,7 +70125,7 @@ module.exports = { RotateLeft: __webpack_require__(470), RotateMatrix: __webpack_require__(77), RotateRight: __webpack_require__(469), - TransposeMatrix: __webpack_require__(188) + TransposeMatrix: __webpack_require__(189) }; @@ -69116,7 +70141,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var List = __webpack_require__(93); +var List = __webpack_require__(94); var PluginCache = __webpack_require__(10); var StableSort = __webpack_require__(83); @@ -69494,7 +70519,7 @@ module.exports = VisibilityHandler; var Class = __webpack_require__(0); var GetValue = __webpack_require__(3); var NOOP = __webpack_require__(2); -var RequestAnimationFrame = __webpack_require__(260); +var RequestAnimationFrame = __webpack_require__(262); // Frame Rate config // fps: { @@ -70999,7 +72024,7 @@ module.exports = AtlasXML; var Class = __webpack_require__(0); var IsSizePowerOfTwo = __webpack_require__(84); -var Texture = __webpack_require__(120); +var Texture = __webpack_require__(121); /** * @classdesc @@ -71310,7 +72335,7 @@ module.exports = GetScenePlugins; */ var GetFastValue = __webpack_require__(1); -var UppercaseFirst = __webpack_require__(250); +var UppercaseFirst = __webpack_require__(252); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -71363,6 +72388,305 @@ module.exports = GetPhysicsPlugins; /***/ }), /* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Vec2 = __webpack_require__(4); + +/* + Use `scaleMode` SHOW_ALL. + Use `scaleMode` EXACT_FIT. + Use `scaleMode` USER_SCALE. Examine `parentBounds` in the {@link #setResizeCallback resize callback} and call {@link #setUserScale} if necessary. + Use `scaleMode` RESIZE. Examine the game or canvas size from the {@link #onSizeChange} signal **or** the {@link Phaser.State#resize} callback and reposition game objects if necessary. + + Canvas width / height in the element + Canvas CSS width / height in the style + + Detect orientation + Lock orientation (Android only?) + Full-screen support + + Scale Mode - +*/ + +/** + * @classdesc + * [description] + * + * @class ScaleManager + * @memberOf Phaser.Boot + * @constructor + * @since 3.12.0 + * + * @param {Phaser.Game} game - A reference to the Phaser.Game instance. + * @param {ScaleManagerConfig} config + */ +var ScaleManager = new Class({ + + initialize: + + function ScaleManager (game, config) + { + /** + * A reference to the Phaser.Game instance. + * + * @name Phaser.Boot.ScaleManager#game + * @type {Phaser.Game} + * @readOnly + * @since 3.12.0 + */ + this.game = game; + + this.config = config; + + /** + * Target width (in pixels) of the Display canvas. + * @property {number} width + * @readonly + */ + this.width = 0; + + /** + * Target height (in pixels) of the Display canvas. + * @property {number} height + * @readonly + */ + this.height = 0; + + this.zoom = 0; + + this.resolution = 1; + + this.parent = null; + + this.scaleMode = 0; + + /** + * Minimum width the canvas should be scaled to (in pixels). + * Change with {@link #setMinMax}. + * @property {?number} minWidth + * @readonly + * @protected + */ + this.minWidth = null; + + /** + * Minimum height the canvas should be scaled to (in pixels). + * Change with {@link #setMinMax}. + * @property {?number} minHeight + * @readonly + * @protected + */ + this.minHeight = null; + + /** + * Maximum width the canvas should be scaled to (in pixels). + * If null it will scale to whatever width the browser can handle. + * Change with {@link #setMinMax}. + * @property {?number} maxWidth + * @readonly + * @protected + */ + this.maxWidth = null; + + /** + * Maximum height the canvas should be scaled to (in pixels). + * If null it will scale to whatever height the browser can handle. + * Change with {@link #setMinMax}. + * @property {?number} maxHeight + * @readonly + * @protected + */ + this.maxHeight = null; + + /** + * The _current_ scale factor based on the game dimensions vs. the scaled dimensions. + * @property {Phaser.Point} scaleFactor + * @readonly + */ + this.scaleFactor = new Vec2(1, 1); + + /** + * The _current_ inversed scale factor. The displayed dimensions divided by the game dimensions. + * @property {Phaser.Point} scaleFactorInversed + * @readonly + * @protected + */ + this.scaleFactorInversed = new Vec2(1, 1); + + /** + * The aspect ratio of the scaled Display canvas. + * @property {number} aspectRatio + * @readonly + */ + this.aspectRatio = 0; + + /** + * The aspect ratio of the original game dimensions. + * @property {number} sourceAspectRatio + * @readonly + */ + this.sourceAspectRatio = 0; + + /** + * True if the the browser window (instead of the display canvas's DOM parent) should be used as the bounding parent. + * + * This is set automatically based on the `parent` argument passed to {@link Phaser.Game}. + * + * The {@link #parentNode} property is generally ignored while this is in effect. + * + * @property {boolean} parentIsWindow + */ + this.parentIsWindow = false; + + /** + * The _original_ DOM element for the parent of the Display canvas. + * This may be different in fullscreen - see {@link #createFullScreenTarget}. + * + * This is set automatically based on the `parent` argument passed to {@link Phaser.Game}. + * + * This should only be changed after moving the Game canvas to a different DOM parent. + * + * @property {?DOMElement} parentNode + */ + this.parentNode = null; + + /** + * The scale of the game in relation to its parent container. + * @property {Phaser.Point} parentScaleFactor + * @readonly + */ + this.parentScaleFactor = new Vec2(1, 1); + + this._lastParentWidth = 0; + + this._lastParentHeight = 0; + + this._innerHeight = 0; + + this.init(); + }, + + init: function () + { + this._innerHeight = this.getInnerHeight(); + + // var gameWidth = this.config.width; + // var gameHeight = this.config.height; + }, + + centerDisplay: function () + { + var height = this.height; + var gameWidth = 0; + var gameHeight = 0; + + this.parentNode.style.display = 'flex'; + this.parentNode.style.height = height + 'px'; + + this.canvas.style.margin = 'auto'; + this.canvas.style.width = gameWidth + 'px'; + this.canvas.style.height = gameHeight + 'px'; + }, + + /* + iOS10 Resize hack. Thanks, Apple. + + I._onWindowResize = function(a) { + if (this._lastReportedWidth != document.body.offsetWidth) { + this._lastReportedWidth = document.body.offsetWidth; + if (this._isAutoPlaying && this._cancelAutoPlayOnInteraction) { + this.stopAutoPlay(a) + } + window.clearTimeout(this._onResizeDebouncedTimeout); + this._onResizeDebouncedTimeout = setTimeout(this._onResizeDebounced, 500); + aj._onWindowResize.call(this, a) + } + }; + */ + + resizeHandler: function () + { + + }, + + /* + resize: function () + { + let scale = Math.min(window.innerWidth / canvas.width, window.innerHeight / canvas.height); + let orientation = 'left'; + let extra = (this.mobile) ? 'margin-left: -50%': ''; + let margin = window.innerWidth / 2 - (canvas.width / 2) * scale; + + canvas.setAttribute('style', '-ms-transform-origin: ' + orientation + ' top; -webkit-transform-origin: ' + orientation + ' top;' + + ' -moz-transform-origin: ' + orientation + ' top; -o-transform-origin: ' + orientation + ' top; transform-origin: ' + orientation + ' top;' + + ' -ms-transform: scale(' + scale + '); -webkit-transform: scale3d(' + scale + ', 1);' + + ' -moz-transform: scale(' + scale + '); -o-transform: scale(' + scale + '); transform: scale(' + scale + ');' + + ' display: block; margin-left: ' + margin + 'px;' + ); + }, + */ + + getInnerHeight: function () + { + // Based on code by @tylerjpeterson + + if (!this.game.device.os.iOS) + { + return window.innerHeight; + } + + var axis = Math.abs(window.orientation); + + var size = { w: 0, h: 0 }; + + var ruler = document.createElement('div'); + + ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0'); + + document.documentElement.appendChild(ruler); + + size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth; + size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight; + + document.documentElement.removeChild(ruler); + + ruler = null; + + if (Math.abs(window.orientation) !== 90) + { + return size.h; + } + else + { + return size.w; + } + }, + + /** + * Destroys the ScaleManager. + * + * @method Phaser.Boot.ScaleManager#destroy + * @since 3.12.0 + */ + destroy: function () + { + this.game = null; + } + +}); + +module.exports = ScaleManager; + + +/***/ }), +/* 492 */ /***/ (function(module, exports) { /** @@ -71460,7 +72784,7 @@ module.exports = init(); /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports) { /** @@ -71545,7 +72869,7 @@ module.exports = init(); /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71670,7 +72994,7 @@ module.exports = init(); /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71749,7 +73073,7 @@ module.exports = init(); /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71785,18 +73109,18 @@ module.exports = { os: __webpack_require__(57), browser: __webpack_require__(81), - features: __webpack_require__(122), - input: __webpack_require__(494), - audio: __webpack_require__(493), - video: __webpack_require__(492), - fullscreen: __webpack_require__(491), - canvasFeatures: __webpack_require__(209) + features: __webpack_require__(123), + input: __webpack_require__(495), + audio: __webpack_require__(494), + video: __webpack_require__(493), + fullscreen: __webpack_require__(492), + canvasFeatures: __webpack_require__(210) }; /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71805,7 +73129,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -71924,7 +73248,7 @@ module.exports = DebugHeader; /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports) { module.exports = [ @@ -71959,7 +73283,7 @@ module.exports = [ /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, exports) { module.exports = [ @@ -72002,7 +73326,7 @@ module.exports = [ /***/ }), -/* 499 */ +/* 500 */ /***/ (function(module, exports) { /** @@ -72593,7 +73917,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 500 */ +/* 501 */ /***/ (function(module, exports) { module.exports = [ @@ -72651,7 +73975,7 @@ module.exports = [ /***/ }), -/* 501 */ +/* 502 */ /***/ (function(module, exports) { module.exports = [ @@ -72670,7 +73994,7 @@ module.exports = [ /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports) { module.exports = [ @@ -72706,7 +74030,7 @@ module.exports = [ /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72715,10 +74039,10 @@ module.exports = [ * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasInterpolation = __webpack_require__(264); -var CanvasPool = __webpack_require__(24); -var CONST = __webpack_require__(22); -var Features = __webpack_require__(122); +var CanvasInterpolation = __webpack_require__(265); +var CanvasPool = __webpack_require__(22); +var CONST = __webpack_require__(23); +var Features = __webpack_require__(123); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -72801,8 +74125,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(259); - WebGLRenderer = __webpack_require__(256); + CanvasRenderer = __webpack_require__(261); + WebGLRenderer = __webpack_require__(258); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -72830,7 +74154,7 @@ module.exports = CreateRenderer; /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72872,7 +74196,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72882,13 +74206,13 @@ module.exports = CreateDOMContainer; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); var IsPlainObject = __webpack_require__(7); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(2); -var DefaultPlugins = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(124); var ValueToColor = __webpack_require__(134); /** @@ -72913,6 +74237,21 @@ var ValueToColor = __webpack_require__(134); * @property {integer} [panicMax=120] - [description] */ +/** + * @typedef {object} ScaleConfig + * + * @property {(integer|string)} [width=1024] - The base width of your game. + * @property {(integer|string)} [height=768] - The base height of your game. + * @property {integer} [zoom=1] - The zoom value of the game canvas. + * @property {number} [resolution=1] - The rendering resolution of the canvas. + * @property {any} [parent] - The parent DOM element. + * @property {integer} [mode=0] - The scale mode to apply to the canvas. + * @property {integer} [minWidth] - The minimum width the canvas can be scaled down to. + * @property {integer} [minHeight] - The minimum height the canvas can be scaled down to. + * @property {integer} [maxWidth] - The maximum width the canvas can be scaled up to. + * @property {integer} [maxHeight] - The maximum height the canvas can be scaled up to. + */ + /** * @typedef {object} LoaderConfig * @@ -72934,6 +74273,26 @@ var ValueToColor = __webpack_require__(134); * @property {boolean} [behindCanvas=false] - Place the DOM Container behind the Phaser Canvas. The default is to place it over the Canvas. */ +/** + * @typedef {object} PluginObjectItem + * + * @property {string} [key] - [description] + * @property {*} [plugin] - [description] + * @property {boolean} [start] - [description] + * @property {string} [systemKey] - [description] + * @property {string} [sceneKey] - [description] + * @property {*} [data] - [description] + */ + +/** + * @typedef {object} PluginObject + * + * @property {PluginObjectItem[]} [global=null] - [description] + * @property {PluginObjectItem[]} [scene=null] - [description] + * @property {Array} [default=[]] - [description] + * @property {*} [defaultMerge={}] - [description] + */ + /** * @typedef {object} GameConfig * @@ -72989,6 +74348,7 @@ var ValueToColor = __webpack_require__(134); * @property {string} [images.default] - [description] * @property {string} [images.missing] - [description] * @property {object} [physics] - [description] + * @property {PluginObject|PluginObjectItem[]} [plugins] - [description] */ /** @@ -73040,16 +74400,37 @@ var Config = new Class({ */ this.resolution = GetValue(config, 'resolution', 1); - /** - * @const {number} Phaser.Boot.Config#renderType - [description] - */ - this.renderType = GetValue(config, 'type', CONST.AUTO); - /** * @const {?*} Phaser.Boot.Config#parent - [description] */ this.parent = GetValue(config, 'parent', null); + /** + * @const {?*} Phaser.Boot.Config#scaleMode - [description] + */ + this.scaleMode = GetValue(config, 'scaleMode', 0); + + // Scale Manager - Anything set in here over-rides anything set above + + var scaleConfig = GetValue(config, 'scale', null); + + if (scaleConfig) + { + this.width = GetValue(scaleConfig, 'width', this.width); + this.height = GetValue(scaleConfig, 'height', this.height); + this.zoom = GetValue(scaleConfig, 'zoom', this.zoom); + this.resolution = GetValue(scaleConfig, 'resolution', this.resolution); + this.parent = GetValue(scaleConfig, 'parent', this.parent); + this.scaleMode = GetValue(scaleConfig, 'mode', this.scaleMode); + + // TODO: Add in min / max sizes + } + + /** + * @const {number} Phaser.Boot.Config#renderType - [description] + */ + this.renderType = GetValue(config, 'type', CONST.AUTO); + /** * @const {?HTMLCanvasElement} Phaser.Boot.Config#canvas - Force Phaser to use your own Canvas element instead of creating one. */ @@ -73464,7 +74845,7 @@ module.exports = Config; /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73474,25 +74855,26 @@ module.exports = Config; */ var AddToDOM = __webpack_require__(85); -var AnimationManager = __webpack_require__(213); -var CacheManager = __webpack_require__(211); -var CanvasPool = __webpack_require__(24); +var AnimationManager = __webpack_require__(215); +var CacheManager = __webpack_require__(213); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Config = __webpack_require__(505); -var CreateDOMContainer = __webpack_require__(504); -var CreateRenderer = __webpack_require__(503); +var Config = __webpack_require__(506); +var CreateDOMContainer = __webpack_require__(505); +var CreateRenderer = __webpack_require__(504); var DataManager = __webpack_require__(59); -var DebugHeader = __webpack_require__(496); -var Device = __webpack_require__(495); -var DOMContentLoaded = __webpack_require__(263); +var DebugHeader = __webpack_require__(497); +var Device = __webpack_require__(496); +var DOMContentLoaded = __webpack_require__(264); var EventEmitter = __webpack_require__(8); var FacebookInstantGamesPlugin = __webpack_require__(305); -var InputManager = __webpack_require__(208); +var InputManager = __webpack_require__(209); var PluginCache = __webpack_require__(10); -var PluginManager = __webpack_require__(203); -var SceneManager = __webpack_require__(201); -var SoundManagerCreator = __webpack_require__(198); -var TextureManager = __webpack_require__(191); +var PluginManager = __webpack_require__(204); +var ScaleManager = __webpack_require__(491); +var SceneManager = __webpack_require__(202); +var SoundManagerCreator = __webpack_require__(199); +var TextureManager = __webpack_require__(192); var TimeStep = __webpack_require__(478); var VisibilityHandler = __webpack_require__(477); @@ -73683,6 +75065,17 @@ var Game = new Class({ */ this.device = Device; + /** + * An instance of the Scale Manager. + * + * The Scale Manager is a global system responsible for handling game scaling events. + * + * @name Phaser.Game#scaleManager + * @type {Phaser.Boot.ScaleManager} + * @since 3.12.0 + */ + this.scaleManager = new ScaleManager(this, this.config); + /** * An instance of the base Sound Manager. * @@ -74227,7 +75620,7 @@ module.exports = Game; /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74236,7 +75629,34 @@ module.exports = Game; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(1); + +var Purchase = function (data) +{ + return { + developerPayload: GetFastValue(data, 'developerPayload', ''), + paymentID: GetFastValue(data, 'paymentID', ''), + productID: GetFastValue(data, 'productID', ''), + purchaseTime: GetFastValue(data, 'purchaseTime', ''), + purchaseToken: GetFastValue(data, 'purchaseToken', ''), + signedRequest: GetFastValue(data, 'signedRequest', '') + }; +}; + +module.exports = Purchase; + + +/***/ }), +/* 509 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var GetFastValue = __webpack_require__(1); /** * @classdesc @@ -74247,26 +75667,212 @@ var Class = __webpack_require__(0); * @constructor * @since 3.12.0 */ -var LeaderboardScore = new Class({ +var Product = function (data) +{ + return { + title: GetFastValue(data, 'title', ''), + productID: GetFastValue(data, 'productID', ''), + description: GetFastValue(data, 'description', ''), + imageURI: GetFastValue(data, 'imageURI', ''), + price: GetFastValue(data, 'price', ''), + priceCurrencyCode: GetFastValue(data, 'priceCurrencyCode', '') + }; +}; - initialize: +module.exports = Product; - function LeaderboardScore () - { - this.value; - this.valueFormatted; - this.timestamp; - this.rank; - this.data; - } -}); +/***/ }), +/* 510 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var LeaderboardScore = function (entry) +{ + return { + score: entry.getScore(), + scoreFormatted: entry.getFormattedScore(), + timestamp: entry.getTimestamp(), + rank: entry.getRank(), + data: entry.getExtraData(), + playerName: entry.getPlayer().getName(), + playerPhotoURL: entry.getPlayer().getPhoto(), + playerID: entry.getPlayer().getID() + }; +}; module.exports = LeaderboardScore; /***/ }), -/* 508 */ +/* 511 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var EventEmitter = __webpack_require__(8); +var LeaderboardScore = __webpack_require__(510); + +/** + * @classdesc + * [description] + * + * @class FacebookInstantGamesPlugin + * @memberOf Phaser + * @constructor + * @since 3.12.0 + */ +var Leaderboard = new Class({ + + Extends: EventEmitter, + + initialize: + + function Leaderboard (plugin, data) + { + EventEmitter.call(this); + + this.plugin = plugin; + this.ref = data; + + this.name = data.getName(); + this.contextID = data.getContextID(); + this.entryCount = 0; + + this.playerScore = null; + this.scores = []; + + this.getEntryCount(); + }, + + getEntryCount: function () + { + var _this = this; + + this.ref.getEntryCountAsync().then(function (count) + { + console.log('entry count', count); + + _this.entryCount = count; + + _this.emit('getentrycount', count, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + }, + + setScore: function (score, data) + { + if (data === undefined) { data = ''; } + + var _this = this; + + this.ref.setScoreAsync(score, data).then(function (entry) + { + console.log('set score', entry); + + _this.emit('setscore', entry.getScore(), entry.getExtraData(), _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + }, + + getPlayerScore: function () + { + var _this = this; + + this.ref.getPlayerEntryAsync().then(function (entry) + { + console.log('get player score'); + + var score = LeaderboardScore(entry); + + console.log(score); + + _this.playerScore = score; + + _this.emit('getplayerscore', score, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + + }, + + getScores: function (count, offset) + { + if (count === undefined) { count = 10; } + if (offset === undefined) { offset = 0; } + + var _this = this; + + this.ref.getEntriesAsync().then(function (entries) + { + console.log('get scores', entries); + + _this.scores = []; + + entries.forEach(function (entry) + { + + _this.scores.push(LeaderboardScore(entry)); + + }); + + _this.emit('getscores', _this.scores, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + + } + +}); + +module.exports = Leaderboard; + + +/***/ }), +/* 512 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var AdInstance = function (instance, video) +{ + return { + instance: instance, + placementID: instance.getPlacementID(), + shown: false, + video: video + }; +}; + +module.exports = AdInstance; + + +/***/ }), +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74450,7 +76056,7 @@ module.exports = EventEmitter; /***/ }), -/* 509 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74463,11 +76069,11 @@ module.exports = EventEmitter; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(508) }; +module.exports = { EventEmitter: __webpack_require__(513) }; /***/ }), -/* 510 */ +/* 515 */ /***/ (function(module, exports) { // shim for using process in browser @@ -74657,7 +76263,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 511 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74672,18 +76278,18 @@ process.umask = function() { return 0; }; module.exports = { - BitmapMask: __webpack_require__(220), - GeometryMask: __webpack_require__(219) + BitmapMask: __webpack_require__(222), + GeometryMask: __webpack_require__(221) }; /***/ }), -/* 512 */, -/* 513 */, -/* 514 */, -/* 515 */, -/* 516 */ +/* 517 */, +/* 518 */, +/* 519 */, +/* 520 */, +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74809,7 +76415,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 517 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74825,22 +76431,22 @@ module.exports = DataManagerPlugin; module.exports = { DataManager: __webpack_require__(59), - DataManagerPlugin: __webpack_require__(516) + DataManagerPlugin: __webpack_require__(521) }; /***/ }), -/* 518 */, -/* 519 */, -/* 520 */, -/* 521 */, -/* 522 */, /* 523 */, /* 524 */, /* 525 */, /* 526 */, -/* 527 */ +/* 527 */, +/* 528 */, +/* 529 */, +/* 530 */, +/* 531 */, +/* 532 */ /***/ (function(module, exports) { /** @@ -74873,7 +76479,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 528 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -74906,7 +76512,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 529 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74920,12 +76526,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(528); + renderWebGL = __webpack_require__(533); } if (true) { - renderCanvas = __webpack_require__(527); + renderCanvas = __webpack_require__(532); } module.exports = { @@ -74937,12 +76543,12 @@ module.exports = { /***/ }), -/* 530 */, -/* 531 */, -/* 532 */, -/* 533 */, -/* 534 */, -/* 535 */ +/* 535 */, +/* 536 */, +/* 537 */, +/* 538 */, +/* 539 */, +/* 540 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74951,11 +76557,11 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(126); +var Camera = __webpack_require__(212); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var PluginCache = __webpack_require__(10); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); /** * @typedef {object} InputJSONCameraObject @@ -75662,7 +77268,7 @@ module.exports = CameraManager; /***/ }), -/* 536 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75673,7 +77279,7 @@ module.exports = CameraManager; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * @classdesc @@ -75979,7 +77585,7 @@ module.exports = Zoom; /***/ }), -/* 537 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76321,7 +77927,7 @@ module.exports = Shake; /***/ }), -/* 538 */ +/* 543 */ /***/ (function(module, exports) { /** @@ -76363,7 +77969,7 @@ module.exports = Stepped; /***/ }), -/* 539 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -76402,7 +78008,7 @@ module.exports = InOut; /***/ }), -/* 540 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -76441,7 +78047,7 @@ module.exports = Out; /***/ }), -/* 541 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -76480,7 +78086,7 @@ module.exports = In; /***/ }), -/* 542 */ +/* 547 */ /***/ (function(module, exports) { /** @@ -76515,7 +78121,7 @@ module.exports = InOut; /***/ }), -/* 543 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -76543,7 +78149,7 @@ module.exports = Out; /***/ }), -/* 544 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -76571,7 +78177,7 @@ module.exports = In; /***/ }), -/* 545 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -76606,7 +78212,7 @@ module.exports = InOut; /***/ }), -/* 546 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -76634,7 +78240,7 @@ module.exports = Out; /***/ }), -/* 547 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -76662,7 +78268,7 @@ module.exports = In; /***/ }), -/* 548 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -76697,7 +78303,7 @@ module.exports = InOut; /***/ }), -/* 549 */ +/* 554 */ /***/ (function(module, exports) { /** @@ -76725,7 +78331,7 @@ module.exports = Out; /***/ }), -/* 550 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -76753,7 +78359,7 @@ module.exports = In; /***/ }), -/* 551 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -76781,7 +78387,7 @@ module.exports = Linear; /***/ }), -/* 552 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -76816,7 +78422,7 @@ module.exports = InOut; /***/ }), -/* 553 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -76844,7 +78450,7 @@ module.exports = Out; /***/ }), -/* 554 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -76872,7 +78478,7 @@ module.exports = In; /***/ }), -/* 555 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -76934,7 +78540,7 @@ module.exports = InOut; /***/ }), -/* 556 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -76989,7 +78595,7 @@ module.exports = Out; /***/ }), -/* 557 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -77044,7 +78650,7 @@ module.exports = In; /***/ }), -/* 558 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -77079,7 +78685,7 @@ module.exports = InOut; /***/ }), -/* 559 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -77107,7 +78713,7 @@ module.exports = Out; /***/ }), -/* 560 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -77135,7 +78741,7 @@ module.exports = In; /***/ }), -/* 561 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -77170,7 +78776,7 @@ module.exports = InOut; /***/ }), -/* 562 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -77198,7 +78804,7 @@ module.exports = Out; /***/ }), -/* 563 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -77226,7 +78832,7 @@ module.exports = In; /***/ }), -/* 564 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -77290,7 +78896,7 @@ module.exports = InOut; /***/ }), -/* 565 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -77333,7 +78939,7 @@ module.exports = Out; /***/ }), -/* 566 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -77378,7 +78984,7 @@ module.exports = In; /***/ }), -/* 567 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -77418,7 +79024,7 @@ module.exports = InOut; /***/ }), -/* 568 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -77449,7 +79055,7 @@ module.exports = Out; /***/ }), -/* 569 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -77480,7 +79086,7 @@ module.exports = In; /***/ }), -/* 570 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77492,7 +79098,7 @@ module.exports = In; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); var Vector2 = __webpack_require__(4); -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * @classdesc @@ -77831,7 +79437,7 @@ module.exports = Pan; /***/ }), -/* 571 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78207,7 +79813,7 @@ module.exports = Flash; /***/ }), -/* 572 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78640,7 +80246,7 @@ module.exports = Fade; /***/ }), -/* 573 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78655,15 +80261,15 @@ module.exports = Fade; module.exports = { - Camera: __webpack_require__(126), - CameraManager: __webpack_require__(535), - Effects: __webpack_require__(210) + Camera: __webpack_require__(212), + CameraManager: __webpack_require__(540), + Effects: __webpack_require__(211) }; /***/ }), -/* 574 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78678,14 +80284,14 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(212), - CacheManager: __webpack_require__(211) + BaseCache: __webpack_require__(214), + CacheManager: __webpack_require__(213) }; /***/ }), -/* 575 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78700,17 +80306,17 @@ module.exports = { module.exports = { - Animation: __webpack_require__(216), - AnimationFrame: __webpack_require__(214), - AnimationManager: __webpack_require__(213) + Animation: __webpack_require__(218), + AnimationFrame: __webpack_require__(216), + AnimationManager: __webpack_require__(215) }; /***/ }), -/* 576 */, -/* 577 */, -/* 578 */ +/* 581 */, +/* 582 */, +/* 583 */ /***/ (function(module, exports) { /** @@ -78799,7 +80405,7 @@ module.exports = Visible; /***/ }), -/* 579 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78809,9 +80415,9 @@ module.exports = Visible; */ var MATH_CONST = __webpack_require__(16); -var TransformMatrix = __webpack_require__(32); -var WrapAngle = __webpack_require__(218); -var WrapAngleDegrees = __webpack_require__(217); +var TransformMatrix = __webpack_require__(27); +var WrapAngle = __webpack_require__(220); +var WrapAngleDegrees = __webpack_require__(219); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -79279,7 +80885,7 @@ module.exports = Transform; /***/ }), -/* 580 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -79366,7 +80972,7 @@ module.exports = ToJSON; /***/ }), -/* 581 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -79705,7 +81311,7 @@ module.exports = Tint; /***/ }), -/* 582 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -79913,7 +81519,7 @@ module.exports = TextureCrop; /***/ }), -/* 583 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -80043,7 +81649,7 @@ module.exports = Texture; /***/ }), -/* 584 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -80075,6 +81681,10 @@ var Size = { /** * The native (un-scaled) width of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * * @name Phaser.GameObjects.Components.Size#width * @type {number} * @since 3.0.0 @@ -80084,6 +81694,10 @@ var Size = { /** * The native (un-scaled) height of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * * @name Phaser.GameObjects.Components.Size#height * @type {number} * @since 3.0.0 @@ -80092,8 +81706,11 @@ var Size = { /** * The displayed width of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.Size#displayWidth * @type {number} * @since 3.0.0 @@ -80114,8 +81731,11 @@ var Size = { /** * The displayed height of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.Size#displayHeight * @type {number} * @since 3.0.0 @@ -80137,6 +81757,14 @@ var Size = { /** * Sets the size of this Game Object to be that of the given Frame. * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * * @method Phaser.GameObjects.Components.Size#setSizeToFrame * @since 3.0.0 * @@ -80162,6 +81790,9 @@ var Size = { * `setDisplaySize` method, which is the same thing as changing the scale but allows you * to do so by giving pixel values. * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * * @method Phaser.GameObjects.Components.Size#setSize * @since 3.0.0 * @@ -80205,7 +81836,7 @@ module.exports = Size; /***/ }), -/* 585 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -80297,7 +81928,7 @@ module.exports = ScrollFactor; /***/ }), -/* 586 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80368,7 +81999,7 @@ module.exports = ScaleMode; /***/ }), -/* 587 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -80571,7 +82202,7 @@ module.exports = Origin; /***/ }), -/* 588 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80580,8 +82211,8 @@ module.exports = Origin; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapMask = __webpack_require__(220); -var GeometryMask = __webpack_require__(219); +var BitmapMask = __webpack_require__(222); +var GeometryMask = __webpack_require__(221); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -80718,7 +82349,7 @@ module.exports = Mask; /***/ }), -/* 589 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81000,7 +82631,7 @@ module.exports = GetBounds; /***/ }), -/* 590 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -81148,7 +82779,7 @@ module.exports = Flip; /***/ }), -/* 591 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -81241,7 +82872,7 @@ module.exports = Depth; /***/ }), -/* 592 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -81366,7 +82997,7 @@ module.exports = Crop; /***/ }), -/* 593 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -81388,6 +83019,10 @@ var ComputedSize = { /** * The native (un-scaled) width of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * * @name Phaser.GameObjects.Components.ComputedSize#width * @type {number} * @since 3.0.0 @@ -81397,6 +83032,10 @@ var ComputedSize = { /** * The native (un-scaled) height of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * * @name Phaser.GameObjects.Components.ComputedSize#height * @type {number} * @since 3.0.0 @@ -81405,8 +83044,11 @@ var ComputedSize = { /** * The displayed width of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.ComputedSize#displayWidth * @type {number} * @since 3.0.0 @@ -81427,8 +83069,11 @@ var ComputedSize = { /** * The displayed height of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.ComputedSize#displayHeight * @type {number} * @since 3.0.0 @@ -81448,7 +83093,15 @@ var ComputedSize = { }, /** - * Sets the size of this Game Object. + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. * * @method Phaser.GameObjects.Components.ComputedSize#setSize * @since 3.4.0 @@ -81468,6 +83121,7 @@ var ComputedSize = { /** * Sets the display size of this Game Object. + * * Calling this will adjust the scale. * * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize @@ -81492,7 +83146,7 @@ module.exports = ComputedSize; /***/ }), -/* 594 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81612,7 +83266,7 @@ module.exports = BlendMode; /***/ }), -/* 595 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81907,11 +83561,6 @@ module.exports = Alpha; /***/ }), -/* 596 */, -/* 597 */, -/* 598 */, -/* 599 */, -/* 600 */, /* 601 */, /* 602 */, /* 603 */, @@ -81919,7 +83568,12 @@ module.exports = Alpha; /* 605 */, /* 606 */, /* 607 */, -/* 608 */ +/* 608 */, +/* 609 */, +/* 610 */, +/* 611 */, +/* 612 */, +/* 613 */ /***/ (function(module, exports) { /** @@ -81972,7 +83626,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 609 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -82042,10 +83696,10 @@ if (!global.cancelAnimationFrame) { }; } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(221))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(223))) /***/ }), -/* 610 */ +/* 615 */ /***/ (function(module, exports) { /** @@ -82082,7 +83736,7 @@ if (!global.cancelAnimationFrame) { /***/ }), -/* 611 */ +/* 616 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -82094,7 +83748,7 @@ if (!Math.trunc) { /***/ }), -/* 612 */ +/* 617 */ /***/ (function(module, exports) { /** @@ -82109,7 +83763,7 @@ if (!window.console) /***/ }), -/* 613 */ +/* 618 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -82296,7 +83950,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 614 */ +/* 619 */ /***/ (function(module, exports) { /** @@ -82312,7 +83966,7 @@ if (!Array.isArray) /***/ }), -/* 615 */ +/* 620 */ /***/ (function(module, exports) { /** @@ -82352,25 +84006,20 @@ if (!Array.prototype.forEach) /***/ }), -/* 616 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { +__webpack_require__(620); +__webpack_require__(619); +__webpack_require__(618); +__webpack_require__(617); +__webpack_require__(616); __webpack_require__(615); __webpack_require__(614); __webpack_require__(613); -__webpack_require__(612); -__webpack_require__(611); -__webpack_require__(610); -__webpack_require__(609); -__webpack_require__(608); /***/ }), -/* 617 */, -/* 618 */, -/* 619 */, -/* 620 */, -/* 621 */, /* 622 */, /* 623 */, /* 624 */, @@ -82425,7 +84074,12 @@ __webpack_require__(608); /* 673 */, /* 674 */, /* 675 */, -/* 676 */ +/* 676 */, +/* 677 */, +/* 678 */, +/* 679 */, +/* 680 */, +/* 681 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82440,7 +84094,7 @@ __webpack_require__(608); module.exports = { - BitmapMaskPipeline: __webpack_require__(254), + BitmapMaskPipeline: __webpack_require__(256), ForwardDiffuseLightPipeline: __webpack_require__(152), TextureTintPipeline: __webpack_require__(131) @@ -82448,7 +84102,7 @@ module.exports = { /***/ }), -/* 677 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82465,8 +84119,8 @@ module.exports = { Utils: __webpack_require__(21), WebGLPipeline: __webpack_require__(132), - WebGLRenderer: __webpack_require__(256), - Pipelines: __webpack_require__(676), + WebGLRenderer: __webpack_require__(258), + Pipelines: __webpack_require__(681), // Constants BYTE: 0, @@ -82479,7 +84133,7 @@ module.exports = { /***/ }), -/* 678 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82500,14 +84154,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(258), - WebGL: __webpack_require__(255) + Canvas: __webpack_require__(260), + WebGL: __webpack_require__(257) }; /***/ }), -/* 679 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82522,15 +84176,15 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(259), - GetBlendModes: __webpack_require__(257), - SetTransform: __webpack_require__(118) + CanvasRenderer: __webpack_require__(261), + GetBlendModes: __webpack_require__(259), + SetTransform: __webpack_require__(119) }; /***/ }), -/* 680 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82556,19 +84210,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(679), - Snapshot: __webpack_require__(678), - WebGL: __webpack_require__(677) + Canvas: __webpack_require__(684), + Snapshot: __webpack_require__(683), + WebGL: __webpack_require__(682) }; /***/ }), -/* 681 */, -/* 682 */, -/* 683 */, -/* 684 */, -/* 685 */, /* 686 */, /* 687 */, /* 688 */, @@ -82917,7 +84566,12 @@ module.exports = { /* 1031 */, /* 1032 */, /* 1033 */, -/* 1034 */ +/* 1034 */, +/* 1035 */, +/* 1036 */, +/* 1037 */, +/* 1038 */, +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -82926,9 +84580,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(616); +__webpack_require__(621); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var Extend = __webpack_require__(17); /** @@ -82937,27 +84591,27 @@ var Extend = __webpack_require__(17); var Phaser = { - Animation: __webpack_require__(575), - Cache: __webpack_require__(574), - Cameras: { Scene2D: __webpack_require__(573) }, + Animation: __webpack_require__(580), + Cache: __webpack_require__(579), + Cameras: { Scene2D: __webpack_require__(578) }, Class: __webpack_require__(0), - Data: __webpack_require__(517), - Display: { Masks: __webpack_require__(511) }, - Events: __webpack_require__(509), - Game: __webpack_require__(506), + Data: __webpack_require__(522), + Display: { Masks: __webpack_require__(516) }, + Events: __webpack_require__(514), + Game: __webpack_require__(507), GameObjects: { DisplayList: __webpack_require__(476), - GameObjectCreator: __webpack_require__(13), + GameObjectCreator: __webpack_require__(14), GameObjectFactory: __webpack_require__(9), UpdateList: __webpack_require__(448), - Components: __webpack_require__(14), + Components: __webpack_require__(13), BuildGameObject: __webpack_require__(25), BuildGameObjectAnimation: __webpack_require__(130), GameObject: __webpack_require__(15), - Graphics: __webpack_require__(117), + Graphics: __webpack_require__(118), Image: __webpack_require__(69), Sprite: __webpack_require__(35), - Text: __webpack_require__(111), + Text: __webpack_require__(112), Factories: { Graphics: __webpack_require__(413), Image: __webpack_require__(412), @@ -82976,37 +84630,37 @@ var Phaser = { FileTypes: { AnimationJSONFile: __webpack_require__(365), AtlasJSONFile: __webpack_require__(364), - AudioFile: __webpack_require__(175), + AudioFile: __webpack_require__(176), AudioSpriteFile: __webpack_require__(363), - HTML5AudioFile: __webpack_require__(174), + HTML5AudioFile: __webpack_require__(175), ImageFile: __webpack_require__(38), - JSONFile: __webpack_require__(28), + JSONFile: __webpack_require__(29), MultiAtlasFile: __webpack_require__(362), PluginFile: __webpack_require__(361), ScriptFile: __webpack_require__(360), SpriteSheetFile: __webpack_require__(359), - TextFile: __webpack_require__(230), + TextFile: __webpack_require__(232), XMLFile: __webpack_require__(145) }, File: __webpack_require__(19), FileTypesManager: __webpack_require__(6), - GetURL: __webpack_require__(109), + GetURL: __webpack_require__(110), LoaderPlugin: __webpack_require__(358), - MergeXHRSettings: __webpack_require__(108), + MergeXHRSettings: __webpack_require__(109), MultiFile: __webpack_require__(37), - XHRLoader: __webpack_require__(176), + XHRLoader: __webpack_require__(177), XHRSettings: __webpack_require__(75) }, Math: { - Between: __webpack_require__(153), + Between: __webpack_require__(154), DegToRad: __webpack_require__(39), - FloatBetween: __webpack_require__(243), - RadToDeg: __webpack_require__(154), + FloatBetween: __webpack_require__(245), + RadToDeg: __webpack_require__(155), Vector2: __webpack_require__(4) }, Plugins: __webpack_require__(334), - Renderer: __webpack_require__(680), - Scene: __webpack_require__(200), + Renderer: __webpack_require__(685), + Scene: __webpack_require__(201), Scenes: __webpack_require__(332), Sound: __webpack_require__(330), Structs: __webpack_require__(329), @@ -83031,7 +84685,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(221))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(223))) /***/ }) /******/ ]); diff --git a/dist/phaser-core.min.js b/dist/phaser-core.min.js index d4bc3cdfb..a7410392d 100644 --- a/dist/phaser-core.min.js +++ b/dist/phaser-core.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(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=1034)}([function(t,e){function i(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function s(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function n(t,e,n,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,n);if(!1!==h){if(s((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,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this}});s.ZERO=new s,t.exports=s},function(t,e,i){var s=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),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=s},function(t,e){var i={},s={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=s},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){"use strict";var s=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,i,s,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,s||t,r),a=n?n+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)s.call(t,e)&&i.push(n?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,r=i.length,o=new Array(r);s=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){var s=i(16),n=i(3);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var s=i(0),n=i(10),r=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},n.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){t.exports={Alpha:i(595),Animation:i(306),BlendMode:i(594),ComputedSize:i(593),Crop:i(592),Depth:i(591),Flip:i(590),GetBounds:i(589),Mask:i(588),Origin:i(587),Pipeline:i(294),ScaleMode:i(586),ScrollFactor:i(585),Size:i(584),Texture:i(583),TextureCrop:i(582),Tint:i(581),ToJSON:i(580),Transform:i(579),TransformMatrix:i(32),Visible:i(578)}},function(t,e,i){var s=i(0),n=i(14),r=i(59),o=i(8),a=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,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(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=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 n.ToJSON(this)},willRender:function(t){return!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter>0&&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(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,t.exports=a},function(t,e,i){var s=i(300),n={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:new s};t.exports=n},function(t,e,i){var s=i(7),n=function(){var t,e,i,r,o,a,h=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},u=2),l===u&&(h=this,--u);u=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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("fileprogress",this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=n.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("filecomplete",e,i,t),this.loader.emit("filecomplete-"+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}});l.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},l.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=l},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>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,s=0;sn||e>=i||i>n||e+i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var s=i(0),n=i(158),r=i(287),o=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,s){return void 0===s&&(s=255),this.red=t,this.green=e,this.blue=i,this.alpha=s,this.update()},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this.update()},setFromRGB:function(t){return this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this.update()},update:function(){return this._color=n(this.r,this.g,this.b),this._color32=r(this.r,this.g,this.b,this.a),this._rgba="rgba("+this.r+","+this.g+","+this.b+","+this.a/255+")",this},clone:function(){return new o(this.r,this.g,this.b,this.a)},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()}},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()}},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()}},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()}},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()}},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()}},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()}}});t.exports=o},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){var s=new(i(0))({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,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)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+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),s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3];return s[0]=n*i+o*e,s[1]=r*i+a*e,s[2]=n*-e+o*i,s[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],o=i[2],a=i[3],h=i[4],u=i[5],l=s[0],c=s[1],d=s[2],f=s[3],p=s[4],g=s[5],m=void 0===e?this:e;return m.a=l*n+c*o,m.b=l*r+c*a,m.c=d*n+f*o,m.d=d*r+f*a,m.e=p*n+g*o+h,m.f=p*r+g*a+u,m},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],o=s[1],a=s[2],h=s[3],u=e*r+i*a+s[4],l=e*o+i*h+s[5],c=n[0],d=n[1],f=n[2],p=n[3],g=n[4],m=n[5];return s[0]=c*r+d*a,s[1]=c*o+d*h,s[2]=f*r+p*a,s[3]=f*o+p*h,s[4]=g*r+m*a+u,s[5]=g*o+m*h+l,this},transform:function(t,e,i,s,n,r){var o=this.matrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=t*a+e*u,o[1]=t*h+e*l,o[2]=i*a+s*u,o[3]=i*h+s*l,o[4]=n*a+r*u+c,o[5]=n*h+r*l+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],u=s[5];return i.x=t*n+e*o+h,i.y=t*r+e*a+u,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=e*n-i*s;return t[0]=n/a,t[1]=-i/a,t[2]=-s/a,t[3]=e/a,t[4]=(s*o-n*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,s,n,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=n,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*i,a=s*s,h=n*n,u=r*r,l=Math.sqrt(o+h),c=Math.sqrt(a+u);return t.translateX=e[4],t.translateY=e[5],t.scaleX=l,t.scaleY=c,t.rotation=Math.acos(i/l)*(Math.atan(-n/i)<0?-1:1),t},applyITRS:function(t,e,i,s,n){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*s,r[1]=o*s,r[2]=-o*n,r[3]=a*n,this},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=s},function(t,e){t.exports=function(t,e,i){return t.radius>0&&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){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,i){var s=i(0),n=i(14),r=i(15),o=i(529),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScaleMode,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n.Animation(this),this.setTexture(s,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")},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 n.ToJSON(this)}});t.exports=a},,function(t,e,i){var s=new(i(0))({initialize:function(t,e,i,s){this.loader=t,this.type=e,this.key=i,this.files=s,this.complete=!1,this.pending=s.length,this.failed=0,this.config={};for(var n=0;n=t.length)){for(var i=t.length-1,s=t[e],n=e;n=0&&v>=0&&m+v<1}},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){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e,i){var s=i(125);t.exports=function(t,e){if("string"==typeof t&&s.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,s[t].apply(this,i)}}return s[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,s.Power0)}},function(t,e,i){var s=i(20);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))}},,,function(t,e,i){var s=i(0),n=i(61),r=i(233),o=i(232),a=i(97),h=i(160),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(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,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=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}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=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 s=i(0),n=i(14),r=i(15),o=i(432),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScaleMode,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=a},function(t,e,i){var s=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=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 s;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new s;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new s;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=s},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,i){var s=i(101),n=i(12),r=i(63),o=i(64),a=i(73),h=i(170),u=i(103),l=i(3),c=i(102),d=i(100),f=i(99);t.exports=function(t,e,i){void 0===i&&(i=s);for(var p=i.targets?i.targets:u(e),g=h(e),m=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=o(l(e,"ease",i.ease),y),w=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),_=a(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),b=r(e,"flipX",i.flipX),A=r(e,"flipY",i.flipY),E=[],C=0;C=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:o,onBlur:o,onFocus:o,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("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(s,n){s.pendingRemove||t.call(e||i,s,n,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("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("detune",this,t)}}});t.exports=a},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 s,n=i(57),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=(s=navigator.userAgent,/Edge\/\d+/.test(s)?r.edge=!0:/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(s)?r.opera=!0:/Safari/.test(s)&&!n.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},,function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var n=new Array(i),r=1;ru&&(r=u),o>u&&(o=u),a=n,h=r;;)if(a0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var s;if(void 0===i&&(i=!0),e)"string"==typeof e?s=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(s=e);else if(t.parentElement)return t;return s||(s=document.body),i&&s.style&&(s.style.overflow="hidden"),s.appendChild(t),t}},,,function(t,e,i){var s=i(0),n=i(33),r=i(301),o=i(299),a=i(164),h=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(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 a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},,,,,function(t,e,i){var s=i(151),n=i(0),r=i(2),o=i(83),a=new n({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?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.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){return t&&(this._sortKey=t,o.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirstElement(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.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 s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?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 s=i(0),n=i(20),r=i(17),o=new s({initialize:function(t,e,i,s,n,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,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,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 n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var o=n.drawImage;return o.x=i,o.y=s,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,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=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,o,a){var h=this.cutX,u=this.cutY,l=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=n(e,0,d)),g=u+(i=n(i,0,f)),m=s=n(s,0,d-e),v=r=n(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,w=e+s,T=i+r;if(!(x.rw||x.y>T)){var _=Math.max(x.x,e),S=Math.max(x.y,i),b=Math.min(x.r,w)-_,A=Math.min(x.b,T)-S;m=b,v=A,p=o?h+(l-(_-x.x)-b):h+(_-x.x),g=a?u+(c-(S-x.y)-A):u+(S-x.y),e=_,i=S,s=b,r=A}else p=0,g=0,m=0,v=0}else o&&(p=h+(l-e-s)),a&&(g=u+(c-i-r));var E=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/E),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+m)/E),t.v1=Math.min(1,(g+v)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=m,t.ch=v,t.width=s,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,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;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+s)/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.texture=null,this.source=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 s=i(34);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},function(t,e){t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},function(t,e,i){var s=i(0),n=i(296),r=i(163),o=i(162),a=i(4),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),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=h},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t,e,i,s,n,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:s,ease:n,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var s=i(0),n=i(13),r=i(9),o=i(62),a=new s({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var s=0;s0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(s.elapsed=s.delay,s.state=o.DELAY):s.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i=n.totalDuration?(r=1,o=n.duration):s>n.delay&&s<=n.t1?(r=(s=Math.max(0,s-n.delay))/n.t1,o=n.duration*r):s>n.t1&&sn.repeatDelay&&(r=s/n.t1,o=n.duration*r)),n.progress=r,n.elapsed=o;var a=n.ease(n.progress);n.current=n.start+(n.end-n.start)*a,n.target[n.key]=n.current}},setCallback:function(t,e,i,s){return this.callbacks[t]={func:e,scope:s,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},stop:function(t){this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state=o.PENDING_REMOVE)},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.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 o.ACTIVE:for(var i=!1,s=0;s0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var s=e.elapsed,n=e.duration,r=0;(s+=i)>n&&(r=s-n,s=n);var a,h=e.state===o.PLAYING_FORWARD,u=s/n;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=s,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),n.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function s(t){return!!t.getEnd&&"function"==typeof t.getEnd}var n=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)a=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===u?a=e:"object"===u&&(i(o=e)||s(o))?(s(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=n(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=n},function(t,e,i){var s=i(3);t.exports=function(t){var e=s(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},,,,,function(t,e,i){var s=i(17),n=i(75);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},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={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,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}},function(t,e,i){var s=i(85),n=i(24),r=i(0),o=i(14),a=i(22),h=i(15),u=i(420),l=i(3),c=i(261),d=i(419),f=i(416),p=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,d],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.renderer=t.sys.game.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new f(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this.text="",this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=t.sys.game.config.resolution),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&(this._lineSpacing=r.lineSpacing),this.setText(s),t.sys.game.config.renderType===a.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;ou){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var m=d.substr(g.length);l[c]=m,h+=g}var v=l[c].length?c:c+1,y=l.slice(v).join(" ").replace(/[ \n]*$/gi,"");n[o+1]=y+" "+(n[o+1]||""),r=n.length;break}h+=f,u-=p}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=0;ro?(h>0&&(s+="\n"),s+=a[h]+" ",o=i-u):(o-=l,s+=a[h],h0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},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),n.remove(this.canvas),this.texture.destroy()}});t.exports=p},,,function(t,e,i){var s=i(5);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var s=i(0),n=i(55),r=i(186),o=i(185),a=i(136),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(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 a(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,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=h},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,LINE_FX_TO:12,MOVE_FX_TO:13,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 s=i(126),n=i(0),r=i(116),o=i(14),a=i(244),h=i(15),u=i(1),l=i(3),c=i(16),d=i(434),f=new n({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,d],initialize:function(t,e){var i=l(e,"x",0),s=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline("TextureTintPipeline"),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.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(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,s,n){return void 0===n&&(n=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,s,n),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var s=this.scene.sys.textures.getFrame(t,e);s&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,s,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},strokePath: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,c.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.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,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,o=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(o+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=u(n,"tl",20),o=u(n,"tr",20),a=u(n,"bl",20),h=u(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-c.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,c.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,c.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-c.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=u(n,"tl",20),o=u(n,"tr",20),a=u(n,"bl",20),h=u(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-c.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,c.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,c.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-c.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,s,n,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,o),this},strokeTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),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},lineFxTo:function(t,e,i,s){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,s,1),this},moveFxTo:function(t,e,i,s){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,s,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s=0&&(n=n%h-h-a):(n-=s,(n+=a)>h+a?n=h+a:n<-a&&(n=h+n%h-a)),this.commandBuffer.push(r.ARC,t,e,i,s,n,o),this},slice:function(t,e,i,s,n,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?n<-h?n=-h-a:n>=0&&(n=n%h-h-a):(n-=s,(n+=a)>h+a?n=h+a:n<=-a&&(n=h+n%h-a)),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,s,n,o),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-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 s,n,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(s=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(n=o.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(r.game.renderer,this,0,f.TargetCamera,null,n),r.game.renderer.gl&&s&&(s.source[0].glTexture=r.game.renderer.canvasToTexture(n.canvas,s.source[0].glTexture))),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new s(0,0,0,0),t.exports=f},function(t,e){t.exports=function(t,e,i,s,n){var r=s.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(s.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return n?(o.multiplyWithOffset(n,-s.scrollX*i.scrollFactorX,-s.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=s.scrollX*i.scrollFactorX,a.f-=s.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),!0}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i0},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=n.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this),this.events.emit("ready",this,t)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(t){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=n.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this,t)},destroy:function(){this.settings.status=n.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("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;ef.right&&(p=h(p,p+(m-f.right),this.lerp.x)),vf.bottom&&(g=h(g,g+(v-f.bottom),this.lerp.y))):(p=h(p,m-l,this.lerp.x),g=h(g,v-c,this.lerp.y))}this.useBounds&&(p=this.clampX(p),g=this.clampY(g)),this.roundPixels&&(l=Math.round(l),c=Math.round(c)),this.scrollX=p,this.scrollY=g;var y=p+r,x=g+o;this.midPoint.set(y,x);var w=i/a,T=s/a;this.worldView.setTo(y-w/2,x-T/2,w,T),u.loadIdentity(),u.scale(e,e),u.translate(this.x+l,this.y+c),u.rotate(this.rotation),u.scale(a,a),u.translate(-l,-c),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,s,n,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===o&&(o=n),this._follow=t,this.roundPixels=e,i=r(i,0,1),s=r(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,o);var a=this.width/2,h=this.height/2,u=t.x-n,l=t.y-o;return this.midPoint.set(u,l),this.scrollX=u-a,this.scrollY=l-h,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(){s.prototype.destroy.call(this),this.resetFX(),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var s=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e0?n.delayedPlay(d,r,o):n.load(r)}return t}},function(t,e,i){var s=i(0),n=i(253),r=i(1),o=i(499),a=i(498),h=i(497),u=i(32),l=i(21),c=i(132),d=new s({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._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this._tempMatrix4=new u,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=null,this.firstQuad=[0,0,0,0],this.prevQuad=[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 this.renderer.setTexture2D(t,e),this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,s=this.vertexSize,n=this.renderer;if(0!==e)return n.setBlankTexture(),t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*s)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.width,m=o.height,v=-t.displayOriginX+f,y=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,u=x.v0,c=x.u1,d=x.v1,g=x.width,m=x.height,f=x.x,p=x.y,v=-t.displayOriginX+f,y=-t.displayOriginY+p}t.flipX&&(v+=g,g*=-1),t.flipY&&(y+=m,m*=-1);var w=v+g,T=y+m;n.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=t.x,n.f=t.y,s.multiply(n,r)):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY,s.multiply(n,r));var _=r.getX(v,y),S=r.getY(v,y),b=r.getX(v,T),A=r.getY(v,T),E=r.getX(w,T),C=r.getY(w,T),k=r.getX(w,y),P=r.getY(w,y),M=l.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),L=l.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),R=l.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),F=l.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(_|=0,S|=0,b|=0,A|=0,E|=0,C|=0,k|=0,P|=0),this.setTexture2D(a,0);var O=t._isTinted&&t.tintFill;this.batchQuad(_,S,b,A,E,C,k,P,h,u,c,d,M,L,R,F,O)},batchQuad:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m){var v=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),v=!0);var y=this.vertexViewF32,x=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount-1;return y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=m,x[++w]=d,y[++w]=i,y[++w]=s,y[++w]=h,y[++w]=c,y[++w]=m,x[++w]=p,y[++w]=n,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=m,x[++w]=g,y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=m,x[++w]=d,y[++w]=n,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=m,x[++w]=g,y[++w]=o,y[++w]=a,y[++w]=l,y[++w]=u,y[++w]=m,x[++w]=f,this.vertexCount+=6,v},batchTri:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f){var p=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),p=!0);var g=this.vertexViewF32,m=this.vertexViewU32,v=this.vertexCount*this.vertexComponentCount-1;return g[++v]=t,g[++v]=e,g[++v]=o,g[++v]=a,g[++v]=f,m[++v]=l,g[++v]=i,g[++v]=s,g[++v]=o,g[++v]=u,g[++v]=f,m[++v]=c,g[++v]=n,g[++v]=r,g[++v]=h,g[++v]=u,g[++v]=f,m[++v]=d,this.vertexCount+=3,p},batchTexture:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,_,S,b,A,E,C,k,P){this.renderer.setPipeline(this,t);var M=this._tempMatrix1,L=this._tempMatrix2,R=this._tempMatrix3,F=v/i+E,O=y/s+C,D=(v+x)/i+E,I=(y+w)/s+C,B=o,U=a,N=-g,Y=-m;if(t.isCropped){var X=t._crop;B=X.width,U=X.height,o=X.width,a=X.height;var z=v=X.x,G=y=X.y;c&&(z=x-X.x-X.width),d&&!e.isRenderTexture&&(G=w-X.y-X.height),F=z/i+E,O=G/s+C,D=(z+X.width)/i+E,I=(G+X.height)/s+C,N=-g+v,Y=-m+y}d^=e.isRenderTexture?1:0,c&&(B*=-1,N+=o),d&&(U*=-1,Y+=a);var V=N+B,W=Y+U;L.applyITRS(n,r,l,h,u),M.copyFrom(k.matrix),P?(M.multiplyWithOffset(P,-k.scrollX*f,-k.scrollY*p),L.e=n,L.f=r,M.multiply(L,R)):(L.e-=k.scrollX*f,L.f-=k.scrollY*p,M.multiply(L,R));var H=R.getX(N,Y),j=R.getY(N,Y),q=R.getX(N,W),K=R.getY(N,W),J=R.getX(V,W),Z=R.getY(V,W),Q=R.getX(V,Y),$=R.getY(V,Y);k.roundPixels&&(H|=0,j|=0,q|=0,K|=0,J|=0,Z|=0,Q|=0,$|=0),this.setTexture2D(e,0),this.batchQuad(H,j,q,K,J,Z,Q,$,F,O,D,I,T,_,S,b,A)},batchTextureFrame:function(t,e,i,s,n,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=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),m=h.getX(u,c),v=h.getY(u,c),y=h.getX(u,i),x=h.getY(u,i);this.setTexture2D(t.glTexture,0),s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(d,f,p,g,m,v,y,x,t.u0,t.v0,t.u1,t.v1,s,s,s,s,0)},drawFillRect:function(t,e,i,s,n,r){var o=t+i,a=e+s,h=l.getTintAppendFloatAlphaAndSwap(n,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,s,n,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r.multiply(n,o);var a=t+i,h=e+s,u=o.getX(t,e),l=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),m=o.getY(a,e),v=this.currentFrame,y=v.u0,x=v.v0,w=v.u1,T=v.v1;this.batchQuad(u,l,c,d,f,p,g,m,y,x,w,T,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,s,n,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),f=h.getX(n,r),p=h.getY(n,r),g=this.currentFrame,m=g.u0,v=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,m,v,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=s,u[1].width=o,u[2].x=n,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var s=this._tempMatrix3;i.multiply(e,s);for(var r,o,a=t.length,h=this.polygonCache,u=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;fthis.vertexCapacity&&this.flush();var d=i-t,f=s-e,p=Math.sqrt(d*d+f*f),g=n*(s-e)/p,m=n*(t-i)/p,v=r*(s-e)/p,y=r*(t-i)/p,x=i-v,w=s-y,T=t-g,_=e-m,S=i+v,b=s+y,A=t+g,E=e+m,C=c.getX(x,w),k=c.getY(x,w),P=c.getX(T,_),M=c.getY(T,_),L=c.getX(S,b),R=c.getY(S,b),F=c.getX(A,E),O=c.getY(A,E),D=this.strokeTint,I=this.tintEffect,B=D.TL,U=D.TR,N=D.BL,Y=D.BR,X=this.currentFrame,z=X.u0,G=X.v0,V=X.u1,W=X.v1;if(this.batchQuad(F,O,P,M,C,k,L,R,z,G,V,W,B,U,N,Y,I),!(o<=1)){var H=this.prevQuad,j=this.firstQuad;a>0?this.batchQuad(F,O,P,M,H[0],H[1],H[2],H[3],z,G,V,W,B,U,N,Y,I):(j[0]=P,j[1]=M,j[2]=F,j[3]=O),h?this.batchQuad(j[0],j[1],j[2],j[3],C,k,L,R,z,G,V,W,B,U,N,Y,I):(H[0]=C,H[1]=k,H[2]=L,H[3]=R)}}});t.exports=d},function(t,e,i){var s=i(0),n=i(21),r=new s({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,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=n.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,s,n){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:s,offset:n}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,s=this.program,n=this.renderer,r=this.vertexSize;n.setProgram(s),n.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):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,s=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*s)),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,s){return this.renderer.setFloat3(this.program,t,e,i,s),this},setFloat4:function(t,e,i,s,n){return this.renderer.setFloat4(this.program,t,e,i,s,n),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,s){return this.renderer.setInt3(this.program,t,e,i,s),this},setInt4:function(t,e,i,s,n){return this.renderer.setInt4(this.program,t,e,i,s,n),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){var i,s="";t.exports={disable:function(t){return""===s&&(s=i(t)),s&&(t[s]=!1),t},enable:function(t){return""===s&&(s=i(t)),s&&(t[s]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-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 s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},function(t,e,i){var s=i(98),n=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(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 s=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},,,,,,,function(t,e,i){var s=i(0),n=i(18),r=i(19),o=i(6),a=i(1),h=i(7),u=i(262),l=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=u(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 s=0;s0?(s.textures[e-1]&&s.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==s.texture&&s.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var s=i.cull(e),n=Math.min(s.length,10);if(0===n)return this;this.active=!0;var r,o=this.renderer,a=this.program,h=e.matrix,u={x:0,y:0},l=o.height;for(r=0;r<10;++r)o.setFloat1(a,"uLights["+r+"].radius",0);for(o.setFloat4(a,"uCamera",e.x,e.y,e.rotation,e.zoom),o.setFloat3(a,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r0){for(e=0;e0){for(e=0;e0&&(n.setTexture2D(l.texture,0),s.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},batchTexture:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,_,S,b,A,E,C,k,P){if(this.active){var M;this.renderer.setPipeline(this),t.texture?M=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(M=t.tileset.image.dataSource[0]),M||(M=this.defaultNormalMap),this.setTexture2D(M.glTexture,1);var L=this._tempMatrix1,R=this._tempMatrix2,F=this._tempMatrix3,O=o,D=a,I=-g,B=-m;d^=e.isRenderTexture?1:0,c&&(O*=-1,I+=o),d&&(D*=-1,B+=a),k.roundPixels&&(I|=0,B|=0);var U=I+O,N=B+D;R.applyITRS(n,r,l,h,u),L.copyFrom(k.matrix),P?(L.multiplyWithOffset(P,-k.scrollX*f,-k.scrollY*p),R.e=n,R.f=r,L.multiply(R,F)):(R.e-=k.scrollX*f,R.f-=k.scrollY*p,L.multiply(R,F));var Y=I*F.a+B*F.c+F.e,X=I*F.b+B*F.d+F.f,z=I*F.a+N*F.c+F.e,G=I*F.b+N*F.d+F.f,V=U*F.a+N*F.c+F.e,W=U*F.b+N*F.d+F.f,H=U*F.a+B*F.c+F.e,j=U*F.b+B*F.d+F.f;k.roundPixels&&(Y|=0,X|=0,z|=0,G|=0,V|=0,W|=0,H|=0,j|=0);var q=v/i+E,K=y/s+C,J=(v+x)/i+E,Z=(y+w)/s+C;this.setTexture2D(e,0),this.batchVertices(Y,X,z,G,V,W,H,j,q,K,J,Z,T,_,S,b,A)}},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},batchSprite:function(t,e,i){if(this.active){var s=t.texture.dataSource[t.frame.sourceIndex];s&&(this.renderer.setPipeline(this),this.setTexture2D(s.glTexture,1),r.prototype.batchSprite.call(this,t,e,i))}}});o.LIGHT_COUNT=10,t.exports=o},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var s=i(16);t.exports=function(t){return t*s.RAD_TO_DEG}},,,function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},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 s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(n*a+o*h),e}},function(t,e,i){var s=i(5);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var s=i(71),n=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l1?2-n:n,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 s=i(0),n=i(8),r=i(72),o=i(62),a=new s({Extends:n,initialize:function(t){n.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},add:function(t){return this.queue(r(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],s=parseFloat(t.substr(2)),n=e;switch(i){case"+":n+=s;break;case"-":n-=s}return Math.max(0,n)},calcDuration:function(){for(var t=0,e=0,i=0,s=0;s0?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=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;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 o.ACTIVE:for(var s=this.totalData,n=0;n0?Math.floor(m/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 v=0;v0){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 s=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},,function(t,e,i){var s=i(0),n=i(19),r=i(1),o=i(109),a=i(7),h=new s({Extends:n,initialize:function(t,e,i,s){if(a(e)){var o=e;e=r(o,"key"),s=r(o,"config",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};n.call(this,t,h),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=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=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",e,this,t),this.pad.emit("down",i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit("up",e,this,t),this.pad.emit("up",i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=s},function(t,e,i){var s=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+v+","+y+","+x+","+d+")",c.lineWidth=m,w+=3;break;case s.FILL_STYLE:g=u[w+1],f=u[w+2],v=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+v+","+y+","+x+","+f+")",w+=2;break;case s.BEGIN_PATH:c.beginPath();break;case s.CLOSE_PATH:c.closePath();break;case s.FILL_PATH:h||c.fill();break;case s.STROKE_PATH:h||c.stroke();break;case s.FILL_RECT:h?c.rect(u[w+1],u[w+2],u[w+3],u[w+4]):c.fillRect(u[w+1],u[w+2],u[w+3],u[w+4]),w+=4;break;case s.FILL_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.fill(),w+=6;break;case s.STROKE_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.stroke(),w+=6;break;case s.LINE_TO:c.lineTo(u[w+1],u[w+2]),w+=2;break;case s.MOVE_TO:c.moveTo(u[w+1],u[w+2]),w+=2;break;case s.LINE_FX_TO:c.lineTo(u[w+1],u[w+2]),w+=5;break;case s.MOVE_FX_TO:c.moveTo(u[w+1],u[w+2]),w+=5;break;case s.SAVE:c.save();break;case s.RESTORE:c.restore();break;case s.TRANSLATE:c.translate(u[w+1],u[w+2]),w+=2;break;case s.SCALE:c.scale(u[w+1],u[w+2]),w+=2;break;case s.ROTATE:c.rotate(u[w+1]),w+=1;break;case s.GRADIENT_FILL_STYLE:w+=5;break;case s.GRADIENT_LINE_STYLE:w+=6;break;case s.SET_TEXTURE:w+=2}c.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},function(t,e,i){var s=i(184),n=i(114),r=i(65),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=s(t)/i);for(var h=0;hr;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],m=r,v=o;for(s(t,r,e),a(t[o],g)>0&&s(t,r,o);m0;)v--}0===a(t[r],g)?s(t,r,v):s(t,++v,o),v<=e&&(r=v+1),e<=v&&(o=v-1)}};function s(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function n(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},function(t,e,i){t.exports={AtlasXML:i(486),Canvas:i(485),Image:i(484),JSONArray:i(483),JSONHash:i(482),SpriteSheet:i(481),SpriteSheetFromAtlas:i(480),UnityYAML:i(479)}},function(t,e,i){var s=i(24),n=i(0),r=i(84),o=i(60),a=new n({initialize:function(t,e,i,s){var n=t.manager.game;this.renderer=n.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=s||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isRenderTexture="RenderTexture"===e.type,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(n)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&this.renderer.canvasToTexture(this.image,this.glTexture)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){var s=i(24),n=i(487),r=i(0),o=i(30),a=i(22),h=i(8),u=i(268),l=i(3),c=i(189),d=i(120),f=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once("boot",this.boot,this)},boot:function(){this._pending=2,this.on("onload",this.updatePending,this),this.on("onerror",this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once("destroy",this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off("onload"),this.off("onerror"),this.game.events.emit("texturesready"))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit("removetexture",t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit("onerror",t)},s.onload=function(){var e=i.create(t,s);c.Image(e,0),i.emit("addtexture",t,e),i.emit("onload",t,e)},s.src=e}},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",o=this.getFrame(t,e);if(o){var a=o.canvasData,h=s.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),c.Image(s,0),i&&s.setDataSource(i),this.emit("addtexture",t,s)),s},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit("addtexture",t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=s.create(this,1,1);return e.canvas=i,u(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var n=s.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,n)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var s=null;return i?s=new n(this,t,e,e.width,e.height):this.checkKey(t)&&(s=new n(this,t,e,e.width,e.height),this.list[t]=s,this.emit("addtexture",t,s)),s},addAtlas:function(t,e,i,s){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,s):this.addAtlasJSONHash(t,e,i,s)},addAtlasJSONArray:function(t,e,i,s){var n=null;if(this.checkKey(t)){if(n=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o=0&&t<=r.width&&e>=0&&e<=r.height){t+=n.cutX,e+=n.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,s){var n=this.getFrame(i,s);if(n){var r=n.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=n.cutX,e+=n.cutY;var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],s=1;s0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("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=s-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,n-s),n=this.audio.currentTime):n=s)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=n}},destroy:function(){s.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(){s.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.emit("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.emit("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,"rate",t)||(this.calculateRate(),this.emit("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,"detune",t)||(this.calculateRate(),this.emit("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("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("loop",this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=n},function(t,e,i){var s=i(79),n=i(0),r=i(196),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var s=0;s-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit("transitioninit",s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(s.status=n.LOADING,e.once("complete",this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;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 s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e)}},resize:function(t,e){for(var i=0;i=n.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,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}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=0;){var a=e[o];-1!==(r=t.indexOf(a))?(s(t,r),i&&i.call(n,a)):e.pop(),o--}return e}},function(t,e,i){var s=i(0),n=i(8),r=i(6),o=i(13),a=i(9),h=i(1),u=i(10),l=i(202),c=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once("boot",this.boot,this)},boot:function(){var t,e,i,s,n,r,o,a=this.game.config,u=a.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t10&&(t=10-this.pointersTotal);for(var i=0;i0},queueTouchStart:function(t){if(this.queue.push(n.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueTouchMove:function(t){if(this.queue.push(n.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueTouchEnd:function(t){if(this.queue.push(n.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},queueMouseDown:function(t){if(this.queue.push(n.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueMouseMove:function(t){if(this.queue.push(n.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueMouseUp:function(t){if(this.queue.push(n.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t){var e=t.input;if(!e||!e.enabled||!t.willRender())return!1;var i=!0,s=t.parentContainer;if(s)do{if(!s.visible){i=!1;break}s=s.parentContainer}while(s);return i},hitTest:function(t,e,i,s){void 0===s&&(s=this._tempHitTest);var n=this._tempPoint,r=i._cx,o=i._cy,a=i._cw,h=i._ch,u=i.scrollX,l=i.scrollY;s.length=0;var d=t.x,f=t.y;if(!(d>=r&&f>=o&&d<=r+a&&f<=o+h))return s;i.getWorldPoint(d,f,n),t.worldX=n.x,t.worldY=n.y;for(var p={x:0,y:0},g=this._tempMatrix,m=0;me.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},function(t,e,i){var s=i(20),n=i(0),r=i(215),o=i(214),a=i(3),h=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,a(i,"frames",[]),a(i,"defaultTextureKey",null)),this.frameRate=a(i,"frameRate",null),this.duration=a(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=a(i,"skipMissedFrames",!0),this.delay=a(i,"delay",0),this.repeat=a(i,"repeat",0),this.repeatDelay=a(i,"repeatDelay",0),this.yoyo=a(i,"yoyo",!1),this.showOnStart=a(i,"showOnStart",!1),this.hideOnComplete=a(i,"hideOnComplete",!1),this.paused=!1,this.manager.on("pauseall",this.pause,this),this.manager.on("resumeall",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 s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){n.isLast=!0,n.nextFrame=u[0],u[0].prevFrame=n;var m=1/(u.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._timeScale=1,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=s(t,0,1),r(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?(t.forward=!1,this._updateAndGetNextTick(t,e.prevFrame)):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this._updateAndGetNextTick(t,e.nextFrame)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?(t.forward=!0,this._updateAndGetNextTick(t,e.nextFrame)):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this._updateAndGetNextTick(t,t.currentFrame)):(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);t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,t.parent.emit("animationrepeat",this,t.currentFrame,t.repeatCounter)))},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=this.frames.length,e=1/(t-1),i=0;i1&&(s.prevFrame=this.frames[i-1],s.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off("pauseall",this.pause,this),this.manager.off("resumeall",this.resume,this),this.manager.remove(this.key);for(var t=0;t=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 m(t,e,i,n,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(o=e+Math.ceil((i-e)/n/2)*n,s(t,o,e,i,r),a.push(e,o,o,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!p(t,e))return i;for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),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 s,n,r,o,h,u,l,d,f,p,g,m,v,y;for(u=l=1/0,s=e;s<=i-e;s++)n=a(t,0,s,this.toBBox),r=a(t,s,i,this.toBBox),f=n,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),m=Math.max(f.minY,p.minY),v=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,v-g)*Math.max(0,y-m),h=c(n)+c(r),o=e;n--)r=t.children[n],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],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=n},function(t,e,i){var s=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;tu+l?(g=(p-=u+l)/c,m.x=h.x1+(h.x2-h.x1)*g,m.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,m.x=a.x1+(a.x2-a.x1)*g,m.y=a.y1+(a.y2-a.y1)*g),r.push(m)}return r}},function(t,e,i){var s=i(5),n=i(71);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),u=n(o),l=n(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},,,,,,,,,,function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var s=i(115);s.Area=i(443),s.Circumference=i(184),s.CircumferencePoint=i(114),s.Clone=i(442),s.Contains=i(55),s.ContainsPoint=i(441),s.ContainsRect=i(440),s.CopyFrom=i(439),s.Equals=i(438),s.GetBounds=i(437),s.GetPoint=i(186),s.GetPoints=i(185),s.Offset=i(436),s.OffsetPoint=i(435),s.Random=i(136),t.exports=s},,,,function(t,e,i){var s=i(3),n=i(96),r=function(t,e,i){for(var s=[],n=0;n0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var s=i(4);t.exports=function(t,e,i,n,r,o,a,h){void 0===h&&(h=new s);var u=Math.sin(-r),l=Math.cos(-r),c=l*o,d=-u*o,f=u*a,p=l*a,g=c*p-d*f,m=p/g,v=-d/g,y=-f/g,x=c/g,w=(f*n-p*i)/g,T=-(c*n-d*i)/g;return h.x=t*m+e*y+w,h.y=t*v+e*x+T,h}},function(t,e,i){var s=i(159);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},function(t,e,i){"use strict";function s(t,e,i){i=i||2;var s,a,h,u,l,f,g,m=e&&e.length,v=m?e[0]*i:t.length,y=n(t,0,v,i,!0),x=[];if(!y)return x;if(m&&(y=function(t,e,i,s){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){s=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-s,u-a)}return o(y,x,i,s,a,g),x}function n(t,e,i,s,n){var r,o;if(n===A(t,e,i,s)>0)for(r=e;r=e;r-=s)o=_(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!y(s,s.next)&&0!==v(s.prev,s,s.next))s=s.next;else{if(S(s),(s=e=s.prev)===s.next)return null;i=!0}}while(i||s!==e);return e}function o(t,e,i,s,n,c,d){if(t){!d&&c&&function(t,e,i,s){var n=t;do{null===n.z&&(n.z=f(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,s=i,a=0,e=0;e0||h>0&&s;)0!==a&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,a--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,u*=2}while(o>1)}(n)}(t,s,n,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,s,n,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?o(t=u(t,e,i),e,i,s,n,c,2):2===d&&l(t,e,i,s,n,c):o(r(t),e,i,s,n,c,1);break}}}function a(t){var e=t.prev,i=t,s=t.next;if(v(e,i,s)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(g(e.x,e.y,i.x,i.y,s.x,s.y,n.x,n.y)&&v(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,i,s){var n=t.prev,r=t,o=t.next;if(v(n,r,o)>=0)return!1;for(var a=n.xr.x?n.x>o.x?n.x:o.x:r.x>o.x?r.x:o.x,l=n.y>r.y?n.y>o.y?n.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,s),d=f(u,l,e,i,s),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(n.x,n.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(n.x,n.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var s=t;do{var n=s.prev,r=s.next.next;!y(n,r)&&x(n,s,s.next,r)&&w(n,r)&&w(r,n)&&(e.push(n.i/i),e.push(s.i/i),e.push(r.i/i),S(s),S(s.next),s=t=r),s=s.next}while(s!==t);return s}function l(t,e,i,s,n,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&m(h,u)){var l=T(h,u);return h=r(h,h.next),l=r(l,l.next),o(h,e,i,s,n,a),void o(l,e,i,s,n,a)}u=u.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,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&a>o){if(o=a,a===n){if(r===s.y)return s;if(r===s.next.y)return s.next}i=s.x=s.x&&s.x>=l&&n!==s.x&&g(ri.x)&&w(s,t)&&(i=s,d=h),s=s.next;return i}(t,e)){var i=T(e,t);r(i,i.next)}}function f(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-s)/n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(s-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(n-o)*(s-a)>=0}function m(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)&&w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)}function v(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,s){return!!(y(t,e)&&y(i,s)||y(t,s)&&y(i,e))||v(t,e,i)>0!=v(t,e,s)>0&&v(i,s,t)>0!=v(i,s,e)>0}function w(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function T(t,e){var i=new b(t.i,t.x,t.y),s=new b(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function _(t,e,i,s){var n=new b(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function 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,s){for(var n=0,r=e,o=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i}},function(t,e,i){var s=i(0),n=i(502),r=i(501),o=i(132),a=new s({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:n,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var s=t.bitmapMask,n=this.renderer,r=this.gl,o=s.visible;s&&r&&(n.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),s.visible=!0,s.renderWebGL(n,s,0,i),s.visible=o,n.flush(),n.setFramebuffer(t.mainFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT))},endMask:function(t){var e=t.bitmapMask,i=this.renderer,s=this.gl;e&&(i.setFramebuffer(null),i.setPipeline(this),i.setTexture2D(t.maskTexture,1),i.setTexture2D(t.mainTexture,0),i.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var s=t.getContext("experimental-webgl"),n=new Uint8Array(s.drawingBufferWidth*s.drawingBufferHeight*4);s.readPixels(0,0,s.drawingBufferWidth,s.drawingBufferHeight,s.RGBA,s.UNSIGNED_BYTE,n);var r,o=document.createElement("canvas"),a=o.getContext("2d");o.width=s.drawingBufferWidth,o.height=s.drawingBufferHeight;for(var h=(r=a.getImageData(0,0,o.width,o.height)).data,u=0;u2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.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>16&&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){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl,i=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture&&(i=t.renderTexture.width,s=t.renderTexture.height),e.bindFramebuffer(e.FRAMEBUFFER,t),e.viewport(0,0,i,s),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,s){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),s===n.ScaleModes.LINEAR&&this.config.antialias&&(a=o.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,n),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,s),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,s){var n,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),s){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),(n=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"}[n])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,s=i.createProgram(),n=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(n,t),i.shaderSource(r,e),i.compileShader(n),i.compileShader(r),!i.getShaderParameter(n,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(n));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(s,n),i.attachShader(s,r),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(s));return s},createVertexBuffer:function(t,e){var i=this.gl,s=i.createBuffer();return this.setVertexBuffer(s),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),s},createIndexBuffer:function(t,e){var i=this.gl,s=i.createBuffer();return this.setIndexBuffer(s),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),s},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&o(this.nativeTextures,e),this.gl.deleteTexture(t),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,s=t._cw,n=t._ch;if(this.pushScissor(e,i,s,n),t.backgroundColor.alphaGL>0){var r=t.backgroundColor;this.pipelines.TextureTintPipeline.drawFillRect(e,i,s,n,a.getTintFromFloats(r.redGL,r.greenGL,r.blueGL,1),r.alphaGL)}},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;t.flashEffect.postRenderWebGL(e,a.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,a.getTintFromFloats),t.dirty=!1,this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var s in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[s].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&(t.enable(t.SCISSOR_TEST),t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height)),this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,s){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,s);this.preRenderCamera(s);for(var u=0;u=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===y&&(m>=0?m=-(m+f):m<0&&(m=Math.abs(m)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),o.copyFrom(i.matrix),s?(o.multiplyWithOffset(s,-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.scale(v,y),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.drawImage(e.source.image,l,c,d,f,g,m,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=l},function(t,e,i){var s=i(0),n=i(2),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),s=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,s)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,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=n}});t.exports=r},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},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 s=i(57);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?s.cordova&&!s.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","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={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(t,e,i){var s=i(267),n=i(24),r=i(3);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",s),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=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=n.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var m=0;m16777215?{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 s=i(30),n=i(285);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},function(t,e,i){var s=i(30);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,s){return e+e+i+i+s+s});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(n,r,o)}return e}},function(t,e,i){var s=i(0),n=i(39),r=i(8),o=i(11),a=i(32),h=i(134),u=i(4),l=new s({Extends:r,initialize:function(t,e,i,s){r.call(this),this.scene,this.sceneManager,this.config,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.visible=!0,this.useBounds=!1,this.worldView=new o,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=s,this._bounds=new o,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new a,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.alpha=1,this.disableCull=!1,this.culledObjects=[],this.midPoint=new u(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},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 u);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOn:function(t,e){var i=.5*this.width,s=.5*this.height;return this.midPoint.set(t,e),this.scrollX=t-i,this.scrollY=e-s,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),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],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(!o)return t;var a=e[4],h=e[5],u=this.scrollX,l=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;g-v&&_>-y&&T-v&&b>-y&&Sn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),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=n(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=h(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},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=t,this.config=t.sys.game.config,this.sceneManager=t.sys.game.scene;var e=this.config.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,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,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setVisible:function(t){return this.visible=t,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(){var t=!1;if(0!==this._x||0!==this._y)t=!0;else{var e=this.config.width,i=this.config.height;e===this._width&&i===this._height||(t=!0)}var s=this.sceneManager;t&&!this._customViewport?s.customViewports++:!t&&this._customViewport&&s.customViewports--,this.dirty=!0,this._customViewport=t},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.config=null,this.sceneManager=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=l},,,function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s>>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;i--){var s=Math.floor(this.frac()*(e+1)),n=t[s];t[s]=t[i],t[i]=n}return t}});t.exports=s},function(t,e,i){var s=i(138),n=i(65),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},,,,function(t,e,i){var s=i(0),n=i(59),r=i(8),o=(i(3),i(507),new s({Extends:r,initialize:function(t,e){r.call(this),this.game=t,this.data=new n(this),this.on("setdata",this.setDataHandler,this),this.on("changedata",this.changeDataHandler,this),this.hasLoaded=!1,this.dataLocked=!1,this.apis=[],this.entryPoint="",this.entryPointData=null,this.contextID=0,this.contextType="",this.locale="",this.platform="",this.version="",this.playerID="",this.playerName="",this.playerPhotoURL=""},setDataHandler:function(t,e,i){if(!this.dataLocked){console.log("set data:",e,i);var s={};s[e]=i;var n=this;FBInstant.player.setDataAsync(s).then(function(){console.log("sdh saved",s),n.emit("savedata",s)})}},changeDataHandler:function(t,e,i){if(!this.dataLocked){console.log("change data:",e,i);var s={};s[e]=i;var n=this;FBInstant.player.setDataAsync(s).then(function(){console.log("cdh saved",s),n.emit("savedata",s)})}},showLoadProgress:function(t){return t.load.on("progress",function(t){this.hasLoaded||(console.log(t),FBInstant.setLoadingProgress(100*t))},this),t.load.on("complete",function(){this.hasLoaded=!0,console.log("loaded"),FBInstant.startGameAsync().then(this.gameStarted.bind(this))},this),this},gameStarted:function(){console.log("FBP gameStarted"),this.apis=FBInstant.getSupportedAPIs(),this.contextID=FBInstant.context.getID(),this.contextType=FBInstant.context.getType(),this.locale=FBInstant.getLocale(),this.platform=FBInstant.getPlatform(),this.version=FBInstant.getSDKVersion(),this.playerID=FBInstant.player.getID(),this.playerName=FBInstant.player.getName(),this.playerPhotoURL=FBInstant.player.getPhoto();var t=this;FBInstant.onPause(function(){t.emit("pause")}),FBInstant.getEntryPointAsync().then(function(e){t.entryPoint=e,t.entryPointData=FBInstant.getEntryPointData(),t.emit("startgame")})},loadPlayerPhoto:function(t,e){return console.log("load"),t.load.setCORS("anonymous"),t.load.image(e,this.playerPhotoURL),t.load.on("complete",function(){this.emit("photocomplete",e)},this),t.load.start(),this},getData:function(t){Array.isArray(t)||(t=[t]),console.log("getdata",t);var e=this;return FBInstant.player.getDataAsync(t).then(function(t){for(var i in console.log("getdata req",t),e.dataLocked=!0,t)e.data.set(i,t[i]);e.dataLocked=!1,e.emit("getdata",t)}),this},saveData:function(t){var e=this;return FBInstant.player.setDataAsync(t).then(function(){console.log("data saved to fb"),e.emit("savedata",t)}),this},getStats:function(t){var e=this;return FBInstant.player.getStatsAsync(t).then(function(t){console.log("stats got from fb"),e.emit("getstats",t)}),this},saveStats:function(t){var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var s=this;return FBInstant.player.setStatsAsync(e).then(function(){console.log("stats saved to fb"),s.emit("savestats",e)}),this},incStats:function(t){var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var s=this;return FBInstant.player.incrementStatsAsync(e).then(function(t){console.log("stats modified"),s.emit("incstats",t)}),this},saveSession:function(t){return JSON.stringify(t).length<=1e3?FBInstant.setSessionData(t):console.warn("Session data too long. Max 1000 chars."),this},openShare:function(t,e,i,s){return this._share("SHARE",t,e,i,s)},openInvite:function(t,e,i,s){return this._share("INVITE",t,e,i,s)},openRequest:function(t,e,i,s){return this._share("REQUEST",t,e,i,s)},openChallenge:function(t,e,i,s){return this._share("CHALLENGE",t,e,i,s)},createShortcut:function(){var t=this;FBInstant.canCreateShortcutAsync().then(function(e){e&&FBInstant.createShortcutAsync().then(function(){t.emit("shortcutcreated")}).catch(function(){t.emit("shortcutfailed")})})},_share:function(t,e,i,s,n){if(void 0===n&&(n={}),i)var r=this.game.textures.getBase64(i,s);var o={intent:t,image:r,text:e,data:n},a=this;return FBInstant.shareAsync(o).then(function(){a.emit("resume")}),this},log:function(t,e,i){return void 0===i&&(i={}),t.length>=2&&t.length<=40&&FBInstant.logEvent(t,parseFloat(e),i),this},destroy:function(){FBInstant.quit(),this.game=null}}));t.exports=o},function(t,e,i){var s=new(i(0))({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once("remove",this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,this._timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this._delay=0,this._repeat=0,this._repeatDelay=0,this._yoyo=!1,this.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,i){return this.play(e,!0,i),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._startAnimation(t,i))},playReverse:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,i))},_startAnimation:function(t,e){this.load(t,e);var i=this.currentAnim,s=this.parent;return this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,i.showOnStart&&(s.visible=!0),s.emit("animationstart",this.currentAnim,this.currentFrame),s},reverse:function(t){return this.isPlaying&&this.currentAnim.key===t?(this._reverse=!this._reverse,this.forward=!this.forward,this.parent):this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=0,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){return void 0===t&&(t=!1),this.currentAnim.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(this.currentAnim.frames[0]),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t=this.parent;return t.emit("animationcomplete",this.currentAnim,this.currentFrame),t},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=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.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("animationupdate",i,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=s},function(t,e,i){var s=i(0),n=i(168),r=i(10),o=i(167),a=i(62),h=i(72),u=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.timeScale=1},createTimeline:function(t){return o(this,t)},timeline:function(t){var e=o(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return h(this,t)},add:function(t){var e=h(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=n(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,s=this._active;for(t=0;t-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0?(s.repeatCount--,s.elapsed=n,s.hasDispatched=!1):this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off("update",this.step,this),t.events.emit("transitioncomplete",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){return this.manager.add(t,e,i),this},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){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.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)},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("shutdown",this.shutdown,this),t.off("postupdate",this.step,this),t.off("transitionout")},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),t.exports=a},function(t,e,i){var s=i(80),n=i(17),r={SceneManager:i(201),ScenePlugin:i(331),Settings:i(199),Systems:i(121)};r=n(!1,r,s),t.exports=r},function(t,e,i){var s=i(172),n=new(i(0))({Extends:s,initialize:function(t,e){s.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this)},boot:function(){}});t.exports=n},function(t,e,i){t.exports={BasePlugin:i(172),DefaultPlugins:i(123),PluginCache:i(10),PluginManager:i(203),ScenePlugin:i(333)}},,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){var s=i(0),n=i(18),r=i(70),o=i(8),a=i(6),h=i(1),u=i(10),l=i(75),c=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=l(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this.systems.events.once("shutdown",this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit("start",this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on("update",this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit("progress",this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&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,i){var s=i(0),n=i(8),r=i(3),o=i(76),a=i(178),h=i(110),u=i(177),l=i(374),c=i(373),d=i(372),f=i(146),p=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.keys=[],this.combos=[],this.queue=[],this.onKeyHandler,this.time=0,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.settings.input,e=this.scene.sys.game.config;this.enabled=r(t,"keyboard",e.inputKeyboard),this.target=r(t,"keyboard.target",e.inputKeyboardEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=function(e){if(!e.defaultPrevented&&t.isActive()){t.queue.push(e);var i=t.keys[e.keyCode];i&&i.preventDefault&&e.preventDefault()}};this.onKeyHandler=e,this.target.addEventListener("keydown",e,!1),this.target.addEventListener("keyup",e,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("keydown",this.onKeyHandler),this.target.removeEventListener("keyup",this.onKeyHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},createCursorKeys:function(){return this.addKeys({up:h.UP,down:h.DOWN,left:h.LEFT,right:h.RIGHT,space:h.SPACE,shift:h.SHIFT})},addKeys:function(t){var e={};if("string"==typeof t){t=t.split(",");for(var i=0;i-1?e[i]=t:e[t.keyCode]=t,t}return"string"==typeof t&&(t=h[t.toUpperCase()]),e[t]||(e[t]=new a(t)),e[t]},removeKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=h[t.toUpperCase()]);e[t]&&(e[t]=void 0)},createCombo:function(t,e){return new u(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=f(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.queue.length;if(this.enabled&&0!==e)for(var i=this.queue.splice(0,e),s=this.keys,n=0;n=e}}},function(t,e,i){var s=i(88),n=i(33),r=i(0),o=i(182),a=i(380),h=i(58),u=i(115),l=i(55),c=i(8),d=i(1),f=i(76),p=i(7),g=i(10),m=i(11),v=i(31),y=i(68),x=i(61),w=new r({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,f.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once("destroy",this.destroy,this),this.pluginEvents.emit("boot")},start:function(){var t=this.systems.events;t.on("transitionstart",this.transitionIn,this),t.on("transitionout",this.transitionOut,this),t.on("transitioncomplete",this.transitionComplete,this),t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.enabled=!0,this.pluginEvents.emit("start")},preUpdate:function(){this.pluginEvents.emit("preUpdate");var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){this.pluginEvents.emit("update",t,e);var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var s=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s)for(var n=this.manager.pointers,r=0;r0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,s=0;s0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var a=[];for(i=0;i1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3===t.dragState){for(n=this._drag[t.id],i=0;i0?(s.emit("dragleave",t,r.target),this.emit("dragleave",t,s,r.target),r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target)):(s.emit("dragleave",t,r.target),this.emit("dragleave",t,s,r.target),u[0]?(r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target)):r.target=null)}else!r.target&&u[0]&&(r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target));var c=t.x-s.input.dragX,d=t.y-s.input.dragY;s.emit("drag",t,c,d),this.emit("drag",t,s,c,d)}return n.length}if(5===t.dragState){for(n=this._drag[t.id],i=0;i0)for(this.sortGameObjects(n),this.emit("pointerout",t,n),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return a(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,a=!1;if(p(e)){var h=e;e=d(h,"hitArea",null),i=d(h,"hitAreaCallback",null),s=d(h,"draggable",!1),n=d(h,"dropZone",!1),r=d(h,"cursor",!1),a=d(h,"useHandCursor",!1);var u=d(h,"pixelPerfect",!1),l=d(h,"alphaTolerance",1);u&&(e={},i=this.makePixelPerfect(l)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;cr;h--){for(u=0;u0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},,,,,,,,,,function(t,e){t.exports=function(t,e,i,s,n){t.batchSprite(e,e.frame,s,n)}},function(t,e){t.exports=function(t,e,i,s,n){this.pipeline.batchSprite(e,s,n)}},function(t,e,i){var s=i(2),n=i(2);s=i(431),n=i(430),t.exports={renderWebGL:s,renderCanvas:n}},function(t,e,i){var s=i(116),n=i(21),r=function(t,e,i){this.x=t,this.y=e,this.width=i},o=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new r(t,e,i)},a=[];t.exports=function(t,e,i,h,u){if(0!==e.commandBuffer.length){var l=this.pipeline,c=l._tempMatrix1,d=l._tempMatrix2,f=l._tempMatrix4;t.setPipeline(l),f.loadIdentity(),d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),c.copyFrom(h.matrix),u?(c.multiplyWithOffset(u,-h.scrollX*e.scrollFactorX,-h.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,c.multiply(d)):(d.e-=h.scrollX*e.scrollFactorX,d.f-=h.scrollY*e.scrollFactorY,c.multiply(d));for(var p=e.commandBuffer,g=h.alpha*e.alpha,m=1,v=l.fillTint,y=l.strokeTint,x=0,w=0,T=0,_=[],S=0,b=!1,A=null,E=n.getTintAppendFloatAlphaAndSwap,C=0;C-1&&this._list.splice(n,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},function(t,e,i){var s=i(56);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var o=i-e,a=t.splice(e,o);if(n)for(var h=0;ht.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},function(t,e,i){var s=i(249);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),o=0;o=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},function(t,e,i){var s=i(29);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o0){var o=s-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.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;s>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var u=e[h];t.splice(i,0,u),n&&n.call(r,u)}return e}},function(t,e){t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=s[i],r=Math.min(r,this._min)),s[i]=r,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t},tick:function(){this.step(window.performance.now())},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(window.performance.now())},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){var i=0,s=function(t,e,s,n){var r=i-n.y-n.height;t.add(s,e,n.x,r,n.width,n.height)};t.exports=function(t,e,n){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=n.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;cx||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var E=u,C=u,k=0,P=e.sourceIndex,M=0;Mg||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var m=f,v=f,y=0,x=0,w=0;wr&&(y=T-r),_>o&&(x=_-o),t.add(w,e,i+m,n+v,h-y,u-x),(m+=h+p)+h>r&&(m=f,v+=u+p)}return t}},function(t,e,i){var s=i(34);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=s(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var s=i(34);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a=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)&&(n.dolby=!0)}}catch(t){}return n}()},function(t,e,i){var s=i(57),n=i(81),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),s.cocoonJS||("onwheel"in window||n.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(57),browser:i(81),features:i(122),input:i(494),audio:i(493),video:i(492),fullscreen:i(491),canvasFeatures:i(209)}},function(t,e,i){var s=i(22);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,o=t.device.audio;if(n=!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"+s.VERSION+" / https://phaser.io");else{var a,h="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),a=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),u.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),u.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"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),u[0]=h,console.log.apply(console,u)}}}},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){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 tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid texture-based tint"," color.rgb = mix(texture.rgb, outTint.rgb, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},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 s=this.modelMatrix;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var s=this.modelMatrix;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=n*s+h*i,e[5]=r*s+u*i,e[6]=o*s+l*i,e[7]=a*s+c*i,e[8]=h*s-n*i,e[9]=u*s-r*i,e[10]=l*s-o*i,e[11]=c*s-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=n*s-h*i,e[1]=r*s-u*i,e[2]=o*s-l*i,e[3]=a*s-c*i,e[8]=n*i+h*s,e[9]=r*i+u*s,e[10]=o*i+l*s,e[11]=a*i+c*s,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=n*s+h*i,e[1]=r*s+u*i,e[2]=o*s+l*i,e[3]=a*s+c*i,e[4]=h*s-n*i,e[5]=u*s-r*i,e[6]=l*s-o*i,e[7]=c*s-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 s=this.viewMatrix;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var s=this.viewMatrix;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=n*s+h*i,e[5]=r*s+u*i,e[6]=o*s+l*i,e[7]=a*s+c*i,e[8]=h*s-n*i,e[9]=u*s-r*i,e[10]=l*s-o*i,e[11]=c*s-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=n*s-h*i,e[1]=r*s-u*i,e[2]=o*s-l*i,e[3]=a*s-c*i,e[8]=n*i+h*s,e[9]=r*i+u*s,e[10]=o*i+l*s,e[11]=a*i+c*s,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=n*s+h*i,e[1]=r*s+u*i,e[2]=o*s+l*i,e[3]=a*s+c*i,e[4]=h*s-n*i,e[5]=u*s-r*i,e[6]=l*s-o*i,e[7]=c*s-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,s,n,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-s),u=1/(n-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*u,o[11]=0,o[12]=(t+e)*a,o[13]=(s+i)*h,o[14]=(r+n)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,s){var n=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-s);return n[0]=r/e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=r,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=(s+i)*o,n[11]=-1,n[12]=0,n[13]=0,n[14]=2*s*i*o,n[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},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];","","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(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_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_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,i){var s=i(264),n=i(24),r=i(22),o=i(122);t.exports=function(t){var e,a,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.antialias||n.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=n.create(t,h.width*h.resolution,h.height*h.resolution,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||s.setCrisp(t.canvas),t.canvas.style.width=(h.width*h.zoom).toString()+"px",t.canvas.style.height=(h.height*h.zoom).toString()+"px",h.renderType!==r.HEADLESS&&(e=i(259),a=i(256),h.renderType===r.WEBGL?(t.renderer=new a(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var s=i(85);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style=["display: block;","width: "+t.canvas.width+"px;","height: "+t.canvas.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;"].join(" "),t.domContainer=i,s(i,e.parent)}}},function(t,e,i){var s=i(0),n=i(22),r=i(1),o=i(3),a=i(7),h=i(16),u=i(2),l=i(123),c=i(134),d=new s({initialize:function(t){void 0===t&&(t={});this.width=o(t,"width",1024),this.height=o(t,"height",768),this.zoom=o(t,"zoom",1),this.resolution=o(t,"resolution",1),this.renderType=o(t,"type",n.AUTO),this.parent=o(t,"parent",null),this.canvas=o(t,"canvas",null),this.context=o(t,"context",null),this.canvasStyle=o(t,"canvasStyle",null),this.sceneConfig=o(t,"scene",null),this.seed=o(t,"seed",[(Date.now()*Math.random()).toString()]),h.RND.init(this.seed),this.gameTitle=o(t,"title",""),this.gameURL=o(t,"url","https://phaser.io"),this.gameVersion=o(t,"version",""),this.autoFocus=o(t,"autoFocus",!0),this.domCreateContainer=o(t,"dom.createContainer",!1),this.domBehindCanvas=o(t,"dom.behindCanvas",!1),this.inputKeyboard=o(t,"input.keyboard",!0),this.inputKeyboardEventTarget=o(t,"input.keyboard.target",window),this.inputMouse=o(t,"input.mouse",!0),this.inputMouseEventTarget=o(t,"input.mouse.target",null),this.inputMouseCapture=o(t,"input.mouse.capture",!0),this.inputTouch=o(t,"input.touch",!0),this.inputTouchEventTarget=o(t,"input.touch.target",null),this.inputTouchCapture=o(t,"input.touch.capture",!0),this.inputActivePointers=o(t,"input.activePointers",1),this.inputGamepad=o(t,"input.gamepad",!1),this.inputGamepadEventTarget=o(t,"input.gamepad.target",window),this.disableContextMenu=o(t,"disableContextMenu",!1),this.audio=o(t,"audio"),this.hideBanner=!1===o(t,"banner",null),this.hidePhaser=o(t,"banner.hidePhaser",!1),this.bannerTextColor=o(t,"banner.text","#ffffff"),this.bannerBackgroundColor=o(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(t,"fps",null);var e=o(t,"render",t);this.autoResize=o(e,"autoResize",!1),this.antialias=o(e,"antialias",!0),this.roundPixels=o(e,"roundPixels",!1),this.pixelArt=o(e,"pixelArt",!1),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(e,"transparent",!1),this.clearBeforeRender=o(e,"clearBeforeRender",!0),this.premultipliedAlpha=o(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=o(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=o(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(e,"powerPreference","default"),this.batchSize=o(e,"batchSize",2e3);var i=o(t,"backgroundColor",0);this.backgroundColor=c(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(t,"callbacks.preBoot",u),this.postBoot=o(t,"callbacks.postBoot",u),this.physics=o(t,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(t,"loader.baseURL",""),this.loaderPath=o(t,"loader.path",""),this.loaderMaxParallelDownloads=o(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(t,"loader.crossOrigin",void 0),this.loaderResponseType=o(t,"loader.responseType",""),this.loaderAsync=o(t,"loader.async",!0),this.loaderUser=o(t,"loader.user",""),this.loaderPassword=o(t,"loader.password",""),this.loaderTimeout=o(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=o(t,"plugins",null),d=l.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:a(s)&&(this.installGlobalPlugins=r(s,"global",[]),this.installScenePlugins=r(s,"scene",[]),Array.isArray(s.default)?d=s.default:Array.isArray(s.defaultMerge)&&(d=d.concat(s.defaultMerge)))),this.defaultPlugins=d;var f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(t,"images.default",f+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(t,"images.missing",f+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=d},function(t,e,i){var s=i(85),n=i(213),r=i(211),o=i(24),a=i(0),h=i(505),u=i(504),l=i(503),c=i(59),d=i(496),f=i(495),p=i(263),g=i(8),m=i(305),v=i(208),y=i(10),x=i(203),w=i(201),T=i(198),_=i(191),S=i(478),b=i(477),A=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 n(this),this.textures=new _(this),this.cache=new r(this),this.registry=new c(this),this.input=new v(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.sound=T.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new m(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isOver=!0,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),l(this),u(this),d(this),s(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("texturesready",this.texturesReady,this)):console.warn("Core Phaser Plugins missing. Cannot start.")},texturesReady:function(){this.events.emit("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)),b(this);var t=this.events;t.on("hidden",this.onHidden,this),t.on("visible",this.onVisible,this),t.on("blur",this.onBlur,this),t.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e);var s=this.renderer;s.preRender(),i.emit("prerender",s,t,e),this.scene.render(s),s.postRender(),i.emit("postrender",s,t,e)},headlessStep:function(t,e){var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e),i.emit("prerender"),i.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.domContainer&&(this.domContainer.style.width=t+"px",this.domContainer.style.height=e+"px"),this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=A},function(t,e,i){var s=new(i(0))({initialize:function(){this.value,this.valueFormatted,this.timestamp,this.rank,this.data}});t.exports=s},function(t,e,i){var s=i(0),n=i(8),r=i(10),o=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){t.exports={EventEmitter:i(508)}},function(t,e){var i,s,n=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{s="function"==typeof clearTimeout?clearTimeout:o}catch(t){s=o}}();var h,u=[],l=!1,c=-1;function d(){l&&h&&(l=!1,h.length?u=h.concat(u):c=-1,u.length&&f())}function f(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c1)for(var i=1;i0&&(h.preRender(r,o),t.render(s,e,i,h))}},resetAll:function(){for(var t=0;t=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var s=i(20),n=i(0),r=i(4),o=i(125),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,r,a){void 0===i&&(i=1e3),void 0===s&&(s=o.Linear),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning?h:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(h.scrollX,h.scrollY),this.destination.set(t,e),h.getScroll(t,e,this.current),"string"==typeof s&&o.hasOwnProperty(s)?this.ease=o[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("camerapanstart",this.camera,this,i,t,e),h)},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed>16)+(65280&t)+((255&t)<<16)},s={_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,s,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,s=t,n=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(s),this._tintBR=i(n),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),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=s},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var s=i(60),n={_scaleMode:s.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==s.LINEAR&&t!==s.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=n},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var s=i(220),n=i(219),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new s(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new n(this.scene,t)}};t.exports=r},function(t,e,i){var s=i(11),n=i(295),r=i(4),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,n,r,o,a,h,u;if(void 0===t&&(t=new s),this.parentContainer){var l=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t),h=t.x,u=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,n,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,n,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e,i){var s=i(52),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},function(t,e,i){var s=i(20),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},,,,,,,,,,,,,function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e>>0;if("function"!=typeof t)throw new TypeError;for(var s=arguments.length>=2?arguments[1]:void 0,n=0;n0&&(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,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this}});s.ZERO=new s,t.exports=s},function(t,e,i){var s=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),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=s},function(t,e){var i={},s={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=s},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){"use strict";var s=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,i,s,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,s||t,r),a=n?n+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)s.call(t,e)&&i.push(n?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,r=i.length,o=new Array(r);s=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){var s=i(16),n=i(3);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){t.exports={Alpha:i(600),Animation:i(306),BlendMode:i(599),ComputedSize:i(598),Crop:i(597),Depth:i(596),Flip:i(595),GetBounds:i(594),Mask:i(593),Origin:i(592),Pipeline:i(294),ScaleMode:i(591),ScrollFactor:i(590),Size:i(589),Texture:i(588),TextureCrop:i(587),Tint:i(586),ToJSON:i(585),Transform:i(584),TransformMatrix:i(27),Visible:i(583)}},function(t,e,i){var s=i(0),n=i(10),r=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},n.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){var s=i(0),n=i(13),r=i(59),o=i(8),a=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,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(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=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 n.ToJSON(this)},willRender:function(t){return!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter>0&&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(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,t.exports=a},function(t,e,i){var s=i(300),n={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:new s};t.exports=n},function(t,e,i){var s=i(7),n=function(){var t,e,i,r,o,a,h=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},u=2),l===u&&(h=this,--u);u=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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("fileprogress",this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=n.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("filecomplete",e,i,t),this.loader.emit("filecomplete-"+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}});l.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},l.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=l},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>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,s=0;sn||e>=i||i>n||e+i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var s=i(0),n=i(159),r=i(288),o=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,s){return void 0===s&&(s=255),this.red=t,this.green=e,this.blue=i,this.alpha=s,this.update()},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this.update()},setFromRGB:function(t){return this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this.update()},update:function(){return this._color=n(this.r,this.g,this.b),this._color32=r(this.r,this.g,this.b,this.a),this._rgba="rgba("+this.r+","+this.g+","+this.b+","+this.a/255+")",this},clone:function(){return new o(this.r,this.g,this.b,this.a)},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()}},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()}},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()}},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()}},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()}},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()}},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()}}});t.exports=o},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){return t.radius>0&&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){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,i){var s=i(0),n=i(13),r=i(15),o=i(534),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScaleMode,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n.Animation(this),this.setTexture(s,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")},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 n.ToJSON(this)}});t.exports=a},,function(t,e,i){var s=new(i(0))({initialize:function(t,e,i,s){this.loader=t,this.type=e,this.key=i,this.files=s,this.complete=!1,this.pending=s.length,this.failed=0,this.config={};for(var n=0;n=t.length)){for(var i=t.length-1,s=t[e],n=e;n=0&&v>=0&&m+v<1}},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){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e,i){var s=i(126);t.exports=function(t,e){if("string"==typeof t&&s.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,s[t].apply(this,i)}}return s[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,s.Power0)}},function(t,e,i){var s=i(20);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))}},,,function(t,e,i){var s=i(0),n=i(61),r=i(235),o=i(234),a=i(98),h=i(161),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(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,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=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}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=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 s=i(0),n=i(13),r=i(15),o=i(432),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScaleMode,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=a},function(t,e,i){var s=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=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 s;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new s;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new s;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=s},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,i){var s=i(102),n=i(12),r=i(63),o=i(64),a=i(73),h=i(171),u=i(104),l=i(3),c=i(103),d=i(101),f=i(100);t.exports=function(t,e,i){void 0===i&&(i=s);for(var p=i.targets?i.targets:u(e),g=h(e),m=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=o(l(e,"ease",i.ease),y),w=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),_=a(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),b=r(e,"flipX",i.flipX),A=r(e,"flipY",i.flipY),E=[],C=0;C=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:o,onBlur:o,onFocus:o,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("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(s,n){s.pendingRemove||t.call(e||i,s,n,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("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("detune",this,t)}}});t.exports=a},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 s,n=i(57),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=(s=navigator.userAgent,/Edge\/\d+/.test(s)?r.edge=!0:/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(s)?r.opera=!0:/Safari/.test(s)&&!n.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},,function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var n=new Array(i),r=1;ru&&(r=u),o>u&&(o=u),a=n,h=r;;)if(a0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var s;if(void 0===i&&(i=!0),e)"string"==typeof e?s=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(s=e);else if(t.parentElement)return t;return s||(s=document.body),i&&s.style&&(s.style.overflow="hidden"),s.appendChild(t),t}},,,function(t,e,i){var s=i(0),n=i(13),r=i(39),o=i(8),a=i(11),h=i(27),u=i(134),l=i(4),c=new s({Extends:o,Mixins:[n.Alpha,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),o.call(this),this.scene,this.sceneManager,this.config,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new a,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=s,this._bounds=new a,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new h,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new l(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1},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 l);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOn:function(t,e){var i=.5*this.width,s=.5*this.height;return this.midPoint.set(t,e),this.scrollX=t-i,this.scrollY=e-s,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),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],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(!o)return t;var a=e[4],h=e[5],u=this.scrollX,l=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;g-v&&_>-y&&T-v&&b>-y&&Sn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),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,s,n){return this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},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=t,this.config=t.sys.game.config,this.sceneManager=t.sys.game.scene;var e=this.config.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,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,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,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.config){var t=!1;if(0!==this._x||0!==this._y)t=!0;else{var e=this.config.width,i=this.config.height;e===this._width&&i===this._height||(t=!0)}var s=this.sceneManager;t&&!this._customViewport?s.customViewports++:!t&&this._customViewport&&s.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.config=null,this.sceneManager=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=c},function(t,e,i){var s=i(0),n=i(33),r=i(301),o=i(299),a=i(165),h=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(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 a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},,,,,function(t,e,i){var s=i(151),n=i(0),r=i(2),o=i(83),a=new n({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?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.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){return t&&(this._sortKey=t,o.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirstElement(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.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 s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?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 s=i(0),n=i(20),r=i(17),o=new s({initialize:function(t,e,i,s,n,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,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,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 n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var o=n.drawImage;return o.x=i,o.y=s,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,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=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,o,a){var h=this.cutX,u=this.cutY,l=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=n(e,0,d)),g=u+(i=n(i,0,f)),m=s=n(s,0,d-e),v=r=n(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,w=e+s,T=i+r;if(!(x.rw||x.y>T)){var _=Math.max(x.x,e),S=Math.max(x.y,i),b=Math.min(x.r,w)-_,A=Math.min(x.b,T)-S;m=b,v=A,p=o?h+(l-(_-x.x)-b):h+(_-x.x),g=a?u+(c-(S-x.y)-A):u+(S-x.y),e=_,i=S,s=b,r=A}else p=0,g=0,m=0,v=0}else o&&(p=h+(l-e-s)),a&&(g=u+(c-i-r));var E=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/E),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+m)/E),t.v1=Math.min(1,(g+v)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=m,t.ch=v,t.width=s,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,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;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+s)/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.texture=null,this.source=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 s=i(34);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},function(t,e){t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},function(t,e,i){var s=i(0),n=i(296),r=i(164),o=i(163),a=i(4),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),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=h},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t,e,i,s,n,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:s,ease:n,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var s=i(0),n=i(14),r=i(9),o=i(62),a=new s({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var s=0;s0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(s.elapsed=s.delay,s.state=o.DELAY):s.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i=n.totalDuration?(r=1,o=n.duration):s>n.delay&&s<=n.t1?(r=(s=Math.max(0,s-n.delay))/n.t1,o=n.duration*r):s>n.t1&&sn.repeatDelay&&(r=s/n.t1,o=n.duration*r)),n.progress=r,n.elapsed=o;var a=n.ease(n.progress);n.current=n.start+(n.end-n.start)*a,n.target[n.key]=n.current}},setCallback:function(t,e,i,s){return this.callbacks[t]={func:e,scope:s,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},stop:function(t){this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state=o.PENDING_REMOVE)},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.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 o.ACTIVE:for(var i=!1,s=0;s0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var s=e.elapsed,n=e.duration,r=0;(s+=i)>n&&(r=s-n,s=n);var a,h=e.state===o.PLAYING_FORWARD,u=s/n;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=s,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),n.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function s(t){return!!t.getEnd&&"function"==typeof t.getEnd}var n=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)a=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===u?a=e:"object"===u&&(i(o=e)||s(o))?(s(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=n(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=n},function(t,e,i){var s=i(3);t.exports=function(t){var e=s(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},,,,,function(t,e,i){var s=i(17),n=i(75);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},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={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,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}},function(t,e,i){var s=i(85),n=i(22),r=i(0),o=i(13),a=i(23),h=i(15),u=i(420),l=i(3),c=i(153),d=i(419),f=i(416),p=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,d],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.renderer=t.sys.game.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new f(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this.text="",this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=t.sys.game.config.resolution),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&(this._lineSpacing=r.lineSpacing),this.setText(s),t.sys.game.config.renderType===a.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;ou){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var m=d.substr(g.length);l[c]=m,h+=g}var v=l[c].length?c:c+1,y=l.slice(v).join(" ").replace(/[ \n]*$/gi,"");n[o+1]=y+" "+(n[o+1]||""),r=n.length;break}h+=f,u-=p}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=0;ro?(h>0&&(s+="\n"),s+=a[h]+" ",o=i-u):(o-=l,s+=a[h],h0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},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),n.remove(this.canvas),this.texture.destroy()}});t.exports=p},,,function(t,e,i){var s=i(5);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var s=i(0),n=i(55),r=i(187),o=i(186),a=i(136),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(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 a(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,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=h},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,LINE_FX_TO:12,MOVE_FX_TO:13,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 s=i(88),n=i(0),r=i(117),o=i(13),a=i(246),h=i(15),u=i(1),l=i(3),c=i(16),d=i(434),f=new n({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,d],initialize:function(t,e){var i=l(e,"x",0),s=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline("TextureTintPipeline"),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.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(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,s,n){return void 0===n&&(n=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,s,n),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var s=this.scene.sys.textures.getFrame(t,e);s&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,s,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},strokePath: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,c.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.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,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,o=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(o+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=u(n,"tl",20),o=u(n,"tr",20),a=u(n,"bl",20),h=u(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-c.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,c.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,c.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-c.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=u(n,"tl",20),o=u(n,"tr",20),a=u(n,"bl",20),h=u(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-c.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,c.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,c.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-c.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,s,n,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,o),this},strokeTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),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},lineFxTo:function(t,e,i,s){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,s,1),this},moveFxTo:function(t,e,i,s){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,s,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s=0&&(n=n%h-h-a):(n-=s,(n+=a)>h+a?n=h+a:n<-a&&(n=h+n%h-a)),this.commandBuffer.push(r.ARC,t,e,i,s,n,o),this},slice:function(t,e,i,s,n,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?n<-h?n=-h-a:n>=0&&(n=n%h-h-a):(n-=s,(n+=a)>h+a?n=h+a:n<=-a&&(n=h+n%h-a)),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,s,n,o),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-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 s,n,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(s=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(n=a.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(o,this,0,f.TargetCamera,null,n,!1),o.gl&&s&&(s.source[0].glTexture=o.canvasToTexture(n.canvas,s.source[0].glTexture))),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new s,t.exports=f},function(t,e){t.exports=function(t,e,i,s,n){var r=s.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(s.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return n?(o.multiplyWithOffset(n,-s.scrollX*i.scrollFactorX,-s.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=s.scrollX*i.scrollFactorX,a.f-=s.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),!0}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i0},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=n.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this),this.events.emit("ready",this,t)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(t){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=n.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this,t)},destroy:function(){this.settings.status=n.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("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?n.delayedPlay(d,r,o):n.load(r)}return t}},function(t,e,i){var s=i(0),n=i(255),r=i(1),o=i(500),a=i(499),h=i(498),u=i(27),l=i(21),c=i(132),d=new s({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._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this._tempMatrix4=new u,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=null,this.firstQuad=[0,0,0,0],this.prevQuad=[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 this.renderer.setTexture2D(t,e),this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,s=this.vertexSize,n=this.renderer;if(0!==e)return n.setBlankTexture(),t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*s)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.width,m=o.height,v=-t.displayOriginX+f,y=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,u=x.v0,c=x.u1,d=x.v1,g=x.width,m=x.height,f=x.x,p=x.y,v=-t.displayOriginX+f,y=-t.displayOriginY+p}t.flipX&&(v+=g,g*=-1),t.flipY&&(y+=m,m*=-1);var w=v+g,T=y+m;n.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=t.x,n.f=t.y,s.multiply(n,r)):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY,s.multiply(n,r));var _=r.getX(v,y),S=r.getY(v,y),b=r.getX(v,T),A=r.getY(v,T),E=r.getX(w,T),C=r.getY(w,T),P=r.getX(w,y),k=r.getY(w,y),M=l.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),L=l.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),R=l.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),F=l.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(_|=0,S|=0,b|=0,A|=0,E|=0,C|=0,P|=0,k|=0),this.setTexture2D(a,0);var O=t._isTinted&&t.tintFill;this.batchQuad(_,S,b,A,E,C,P,k,h,u,c,d,M,L,R,F,O)},batchQuad:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m){var v=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),v=!0);var y=this.vertexViewF32,x=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount-1;return y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=m,x[++w]=d,y[++w]=i,y[++w]=s,y[++w]=h,y[++w]=c,y[++w]=m,x[++w]=p,y[++w]=n,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=m,x[++w]=g,y[++w]=t,y[++w]=e,y[++w]=h,y[++w]=u,y[++w]=m,x[++w]=d,y[++w]=n,y[++w]=r,y[++w]=l,y[++w]=c,y[++w]=m,x[++w]=g,y[++w]=o,y[++w]=a,y[++w]=l,y[++w]=u,y[++w]=m,x[++w]=f,this.vertexCount+=6,v},batchTri:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f){var p=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),p=!0);var g=this.vertexViewF32,m=this.vertexViewU32,v=this.vertexCount*this.vertexComponentCount-1;return g[++v]=t,g[++v]=e,g[++v]=o,g[++v]=a,g[++v]=f,m[++v]=l,g[++v]=i,g[++v]=s,g[++v]=o,g[++v]=u,g[++v]=f,m[++v]=c,g[++v]=n,g[++v]=r,g[++v]=h,g[++v]=u,g[++v]=f,m[++v]=d,this.vertexCount+=3,p},batchTexture:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,_,S,b,A,E,C,P,k){this.renderer.setPipeline(this,t);var M=this._tempMatrix1,L=this._tempMatrix2,R=this._tempMatrix3,F=v/i+E,O=y/s+C,D=(v+x)/i+E,I=(y+w)/s+C,B=o,U=a,N=-g,Y=-m;if(t.isCropped){var X=t._crop;B=X.width,U=X.height,o=X.width,a=X.height;var z=v=X.x,G=y=X.y;c&&(z=x-X.x-X.width),d&&!e.isRenderTexture&&(G=w-X.y-X.height),F=z/i+E,O=G/s+C,D=(z+X.width)/i+E,I=(G+X.height)/s+C,N=-g+v,Y=-m+y}d^=e.isRenderTexture?1:0,c&&(B*=-1,N+=o),d&&(U*=-1,Y+=a);var V=N+B,H=Y+U;L.applyITRS(n,r,l,h,u),M.copyFrom(P.matrix),k?(M.multiplyWithOffset(k,-P.scrollX*f,-P.scrollY*p),L.e=n,L.f=r,M.multiply(L,R)):(L.e-=P.scrollX*f,L.f-=P.scrollY*p,M.multiply(L,R));var W=R.getX(N,Y),j=R.getY(N,Y),q=R.getX(N,H),K=R.getY(N,H),J=R.getX(V,H),Z=R.getY(V,H),Q=R.getX(V,Y),$=R.getY(V,Y);P.roundPixels&&(W|=0,j|=0,q|=0,K|=0,J|=0,Z|=0,Q|=0,$|=0),this.setTexture2D(e,0),this.batchQuad(W,j,q,K,J,Z,Q,$,F,O,D,I,T,_,S,b,A)},batchTextureFrame:function(t,e,i,s,n,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=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),m=h.getX(u,c),v=h.getY(u,c),y=h.getX(u,i),x=h.getY(u,i);this.setTexture2D(t.glTexture,0),s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(d,f,p,g,m,v,y,x,t.u0,t.v0,t.u1,t.v1,s,s,s,s,0)},drawFillRect:function(t,e,i,s,n,r){var o=t+i,a=e+s,h=l.getTintAppendFloatAlphaAndSwap(n,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,s,n,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r.multiply(n,o);var a=t+i,h=e+s,u=o.getX(t,e),l=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),m=o.getY(a,e),v=this.currentFrame,y=v.u0,x=v.v0,w=v.u1,T=v.v1;this.batchQuad(u,l,c,d,f,p,g,m,y,x,w,T,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,s,n,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),f=h.getX(n,r),p=h.getY(n,r),g=this.currentFrame,m=g.u0,v=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,m,v,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=s,u[1].width=o,u[2].x=n,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var s=this._tempMatrix3;i.multiply(e,s);for(var r,o,a=t.length,h=this.polygonCache,u=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;fthis.vertexCapacity&&this.flush();var d=i-t,f=s-e,p=Math.sqrt(d*d+f*f),g=n*(s-e)/p,m=n*(t-i)/p,v=r*(s-e)/p,y=r*(t-i)/p,x=i-v,w=s-y,T=t-g,_=e-m,S=i+v,b=s+y,A=t+g,E=e+m,C=c.getX(x,w),P=c.getY(x,w),k=c.getX(T,_),M=c.getY(T,_),L=c.getX(S,b),R=c.getY(S,b),F=c.getX(A,E),O=c.getY(A,E),D=this.strokeTint,I=this.tintEffect,B=D.TL,U=D.TR,N=D.BL,Y=D.BR,X=this.currentFrame,z=X.u0,G=X.v0,V=X.u1,H=X.v1;if(this.batchQuad(F,O,k,M,C,P,L,R,z,G,V,H,B,U,N,Y,I),!(o<=1)){var W=this.prevQuad,j=this.firstQuad;a>0?this.batchQuad(F,O,k,M,W[0],W[1],W[2],W[3],z,G,V,H,B,U,N,Y,I):(j[0]=k,j[1]=M,j[2]=F,j[3]=O),h?this.batchQuad(j[0],j[1],j[2],j[3],C,P,L,R,z,G,V,H,B,U,N,Y,I):(W[0]=C,W[1]=P,W[2]=L,W[3]=R)}}});t.exports=d},function(t,e,i){var s=i(0),n=i(21),r=new s({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,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=n.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,s,n){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:s,offset:n}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,s=this.program,n=this.renderer,r=this.vertexSize;n.setProgram(s),n.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):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,s=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*s)),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,s){return this.renderer.setFloat3(this.program,t,e,i,s),this},setFloat4:function(t,e,i,s,n){return this.renderer.setFloat4(this.program,t,e,i,s,n),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,s){return this.renderer.setInt3(this.program,t,e,i,s),this},setInt4:function(t,e,i,s,n){return this.renderer.setInt4(this.program,t,e,i,s,n),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){var i,s="";t.exports={disable:function(t){return""===s&&(s=i(t)),s&&(t[s]=!1),t},enable:function(t){return""===s&&(s=i(t)),s&&(t[s]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-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 s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},function(t,e,i){var s=i(99),n=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(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 s=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},,,,,,,function(t,e,i){var s=i(0),n=i(18),r=i(19),o=i(6),a=i(1),h=i(7),u=i(263),l=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=u(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 s=0;s0?(s.textures[e-1]&&s.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==s.texture&&s.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var s=i.cull(e),n=Math.min(s.length,10);if(0===n)return this;this.active=!0;var r,o=this.renderer,a=this.program,h=e.matrix,u={x:0,y:0},l=o.height;for(r=0;r<10;++r)o.setFloat1(a,"uLights["+r+"].radius",0);for(o.setFloat4(a,"uCamera",e.x,e.y,e.rotation,e.zoom),o.setFloat3(a,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r0){for(e=0;e0){for(e=0;e0&&(n.setTexture2D(l.texture,0),s.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},batchTexture:function(t,e,i,s,n,r,o,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,_,S,b,A,E,C,P,k){if(this.active){var M;this.renderer.setPipeline(this),t.texture?M=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(M=t.tileset.image.dataSource[0]),M||(M=this.defaultNormalMap),this.setTexture2D(M.glTexture,1);var L=this._tempMatrix1,R=this._tempMatrix2,F=this._tempMatrix3,O=o,D=a,I=-g,B=-m;d^=e.isRenderTexture?1:0,c&&(O*=-1,I+=o),d&&(D*=-1,B+=a),P.roundPixels&&(I|=0,B|=0);var U=I+O,N=B+D;R.applyITRS(n,r,l,h,u),L.copyFrom(P.matrix),k?(L.multiplyWithOffset(k,-P.scrollX*f,-P.scrollY*p),R.e=n,R.f=r,L.multiply(R,F)):(R.e-=P.scrollX*f,R.f-=P.scrollY*p,L.multiply(R,F));var Y=I*F.a+B*F.c+F.e,X=I*F.b+B*F.d+F.f,z=I*F.a+N*F.c+F.e,G=I*F.b+N*F.d+F.f,V=U*F.a+N*F.c+F.e,H=U*F.b+N*F.d+F.f,W=U*F.a+B*F.c+F.e,j=U*F.b+B*F.d+F.f;P.roundPixels&&(Y|=0,X|=0,z|=0,G|=0,V|=0,H|=0,W|=0,j|=0);var q=v/i+E,K=y/s+C,J=(v+x)/i+E,Z=(y+w)/s+C;this.setTexture2D(e,0),this.batchVertices(Y,X,z,G,V,H,W,j,q,K,J,Z,T,_,S,b,A)}},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},batchSprite:function(t,e,i){if(this.active){var s=t.texture.dataSource[t.frame.sourceIndex];s&&(this.renderer.setPipeline(this),this.setTexture2D(s.glTexture,1),r.prototype.batchSprite.call(this,t,e,i))}}});o.LIGHT_COUNT=10,t.exports=o},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var s=i(16);t.exports=function(t){return t*s.RAD_TO_DEG}},,,function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},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 s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(n*a+o*h),e}},function(t,e,i){var s=i(5);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var s=i(5);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var s=i(71),n=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l1?2-n:n,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 s=i(0),n=i(8),r=i(72),o=i(62),a=new s({Extends:n,initialize:function(t){n.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},add:function(t){return this.queue(r(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],s=parseFloat(t.substr(2)),n=e;switch(i){case"+":n+=s;break;case"-":n-=s}return Math.max(0,n)},calcDuration:function(){for(var t=0,e=0,i=0,s=0;s0?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=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;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 o.ACTIVE:for(var s=this.totalData,n=0;n0?Math.floor(m/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 v=0;v0){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 s=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},,function(t,e,i){var s=i(0),n=i(19),r=i(1),o=i(110),a=i(7),h=new s({Extends:n,initialize:function(t,e,i,s){if(a(e)){var o=e;e=r(o,"key"),s=r(o,"config",s)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};n.call(this,t,h),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=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=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",e,this,t),this.pad.emit("down",i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit("up",e,this,t),this.pad.emit("up",i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=s},function(t,e,i){var s=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+v+","+y+","+x+","+d+")",c.lineWidth=m,w+=3;break;case s.FILL_STYLE:g=u[w+1],f=u[w+2],v=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+v+","+y+","+x+","+f+")",w+=2;break;case s.BEGIN_PATH:c.beginPath();break;case s.CLOSE_PATH:c.closePath();break;case s.FILL_PATH:h||c.fill();break;case s.STROKE_PATH:h||c.stroke();break;case s.FILL_RECT:h?c.rect(u[w+1],u[w+2],u[w+3],u[w+4]):c.fillRect(u[w+1],u[w+2],u[w+3],u[w+4]),w+=4;break;case s.FILL_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.fill(),w+=6;break;case s.STROKE_TRIANGLE:c.beginPath(),c.moveTo(u[w+1],u[w+2]),c.lineTo(u[w+3],u[w+4]),c.lineTo(u[w+5],u[w+6]),c.closePath(),h||c.stroke(),w+=6;break;case s.LINE_TO:c.lineTo(u[w+1],u[w+2]),w+=2;break;case s.MOVE_TO:c.moveTo(u[w+1],u[w+2]),w+=2;break;case s.LINE_FX_TO:c.lineTo(u[w+1],u[w+2]),w+=5;break;case s.MOVE_FX_TO:c.moveTo(u[w+1],u[w+2]),w+=5;break;case s.SAVE:c.save();break;case s.RESTORE:c.restore();break;case s.TRANSLATE:c.translate(u[w+1],u[w+2]),w+=2;break;case s.SCALE:c.scale(u[w+1],u[w+2]),w+=2;break;case s.ROTATE:c.rotate(u[w+1]),w+=1;break;case s.GRADIENT_FILL_STYLE:w+=5;break;case s.GRADIENT_LINE_STYLE:w+=6;break;case s.SET_TEXTURE:w+=2}c.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},function(t,e,i){var s=i(185),n=i(115),r=i(65),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=s(t)/i);for(var h=0;hr;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],m=r,v=o;for(s(t,r,e),a(t[o],g)>0&&s(t,r,o);m0;)v--}0===a(t[r],g)?s(t,r,v):s(t,++v,o),v<=e&&(r=v+1),e<=v&&(o=v-1)}};function s(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function n(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},function(t,e,i){t.exports={AtlasXML:i(486),Canvas:i(485),Image:i(484),JSONArray:i(483),JSONHash:i(482),SpriteSheet:i(481),SpriteSheetFromAtlas:i(480),UnityYAML:i(479)}},function(t,e,i){var s=i(22),n=i(0),r=i(84),o=i(60),a=new n({initialize:function(t,e,i,s){var n=t.manager.game;this.renderer=n.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=s||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isRenderTexture="RenderTexture"===e.type,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(n)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&this.renderer.canvasToTexture(this.image,this.glTexture)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){var s=i(22),n=i(487),r=i(0),o=i(31),a=i(23),h=i(8),u=i(269),l=i(3),c=i(190),d=i(121),f=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once("boot",this.boot,this)},boot:function(){this._pending=2,this.on("onload",this.updatePending,this),this.on("onerror",this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once("destroy",this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off("onload"),this.off("onerror"),this.game.events.emit("texturesready"))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit("removetexture",t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit("onerror",t)},s.onload=function(){var e=i.create(t,s);c.Image(e,0),i.emit("addtexture",t,e),i.emit("onload",t,e)},s.src=e}return this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",o=this.getFrame(t,e);if(o){var a=o.canvasData,h=s.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),c.Image(s,0),i&&s.setDataSource(i),this.emit("addtexture",t,s)),s},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit("addtexture",t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=s.create(this,1,1);return e.canvas=i,u(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var n=s.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,n)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var s=null;return i?s=new n(this,t,e,e.width,e.height):this.checkKey(t)&&(s=new n(this,t,e,e.width,e.height),this.list[t]=s,this.emit("addtexture",t,s)),s},addAtlas:function(t,e,i,s){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,s):this.addAtlasJSONHash(t,e,i,s)},addAtlasJSONArray:function(t,e,i,s){var n=null;if(this.checkKey(t)){if(n=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o=0&&t<=r.width&&e>=0&&e<=r.height){t+=n.cutX,e+=n.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,s){var n=this.getFrame(i,s);if(n){var r=n.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=n.cutX,e+=n.cutY;var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],s=1;s0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("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=s-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,n-s),n=this.audio.currentTime):n=s)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=n}},destroy:function(){s.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(){s.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.emit("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.emit("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,"rate",t)||(this.calculateRate(),this.emit("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,"detune",t)||(this.calculateRate(),this.emit("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("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("loop",this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=n},function(t,e,i){var s=i(79),n=i(0),r=i(197),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var s=0;s-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit("transitioninit",s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(s.status=n.LOADING,e.once("complete",this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;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 s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e)}},resize:function(t,e){for(var i=0;i=n.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,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}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=0;){var a=e[o];-1!==(r=t.indexOf(a))?(s(t,r),i&&i.call(n,a)):e.pop(),o--}return e}},function(t,e,i){var s=i(0),n=i(8),r=i(6),o=i(14),a=i(9),h=i(1),u=i(10),l=i(203),c=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once("boot",this.boot,this)},boot:function(){var t,e,i,s,n,r,o,a=this.game.config,u=a.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t10&&(t=10-this.pointersTotal);for(var i=0;i0},queueTouchStart:function(t){if(this.queue.push(n.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueTouchMove:function(t){if(this.queue.push(n.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueTouchEnd:function(t){if(this.queue.push(n.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},queueMouseDown:function(t){if(this.queue.push(n.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueMouseMove:function(t){if(this.queue.push(n.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueMouseUp:function(t){if(this.queue.push(n.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t){var e=t.input;if(!e||!e.enabled||!t.willRender())return!1;var i=!0,s=t.parentContainer;if(s)do{if(!s.visible){i=!1;break}s=s.parentContainer}while(s);return i},hitTest:function(t,e,i,s){void 0===s&&(s=this._tempHitTest);var n=this._tempPoint,r=i._cx,o=i._cy,a=i._cw,h=i._ch,u=i.scrollX,l=i.scrollY;s.length=0;var d=t.x,f=t.y;if(!(d>=r&&f>=o&&d<=r+a&&f<=o+h))return s;i.getWorldPoint(d,f,n),t.worldX=n.x,t.worldY=n.y;for(var p={x:0,y:0},g=this._tempMatrix,m=0;mf.right&&(p=l(p,p+(m-f.right),this.lerp.x)),vf.bottom&&(g=l(g,g+(v-f.bottom),this.lerp.y))):(p=l(p,m-u,this.lerp.x),g=l(g,v-c,this.lerp.y))}this.useBounds&&(p=this.clampX(p),g=this.clampY(g)),this.roundPixels&&(u=Math.round(u),c=Math.round(c)),this.scrollX=p,this.scrollY=g;var y=p+n,x=g+o;this.midPoint.set(y,x);var w=i/a,T=s/a;this.worldView.setTo(y-w/2,x-T/2,w,T),h.loadIdentity(),h.scale(e,e),h.translate(this.x+u,this.y+c),h.rotate(this.rotation),h.scale(a,a),h.translate(-u,-c),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,s,n,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===r&&(r=n),this._follow=t,this.roundPixels=e,i=o(i,0,1),s=o(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,r);var a=this.width/2,h=this.height/2,u=t.x-n,l=t.y-r;return this.midPoint.set(u,l),this.scrollX=u-a,this.scrollY=l-h,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(){s.prototype.destroy.call(this),this.resetFX(),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var s=i(214),n=new(i(0))({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","html","obj","tilemap","xml"],e=0;ee.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},function(t,e,i){var s=i(20),n=i(0),r=i(217),o=i(216),a=i(3),h=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,a(i,"frames",[]),a(i,"defaultTextureKey",null)),this.frameRate=a(i,"frameRate",null),this.duration=a(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=a(i,"skipMissedFrames",!0),this.delay=a(i,"delay",0),this.repeat=a(i,"repeat",0),this.repeatDelay=a(i,"repeatDelay",0),this.yoyo=a(i,"yoyo",!1),this.showOnStart=a(i,"showOnStart",!1),this.hideOnComplete=a(i,"hideOnComplete",!1),this.paused=!1,this.manager.on("pauseall",this.pause,this),this.manager.on("resumeall",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 s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){n.isLast=!0,n.nextFrame=u[0],u[0].prevFrame=n;var m=1/(u.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._timeScale=1,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=s(t,0,1),r(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?(t.forward=!1,this._updateAndGetNextTick(t,e.prevFrame)):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this._updateAndGetNextTick(t,e.nextFrame)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?(t.forward=!0,this._updateAndGetNextTick(t,e.nextFrame)):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this._updateAndGetNextTick(t,t.currentFrame)):(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);t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,t.parent.emit("animationrepeat",this,t.currentFrame,t.repeatCounter)))},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=this.frames.length,e=1/(t-1),i=0;i1&&(s.prevFrame=this.frames[i-1],s.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off("pauseall",this.pause,this),this.manager.off("resumeall",this.resume,this),this.manager.remove(this.key);for(var t=0;t=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 m(t,e,i,n,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(o=e+Math.ceil((i-e)/n/2)*n,s(t,o,e,i,r),a.push(e,o,o,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!p(t,e))return i;for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),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 s,n,r,o,h,u,l,d,f,p,g,m,v,y;for(u=l=1/0,s=e;s<=i-e;s++)n=a(t,0,s,this.toBBox),r=a(t,s,i,this.toBBox),f=n,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),m=Math.max(f.minY,p.minY),v=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,v-g)*Math.max(0,y-m),h=c(n)+c(r),o=e;n--)r=t.children[n],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],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=n},function(t,e,i){var s=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;tu+l?(g=(p-=u+l)/c,m.x=h.x1+(h.x2-h.x1)*g,m.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,m.x=a.x1+(a.x2-a.x1)*g,m.y=a.y1+(a.y2-a.y1)*g),r.push(m)}return r}},function(t,e,i){var s=i(5),n=i(71);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),u=n(o),l=n(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},,,,,,,,,,function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var s=i(116);s.Area=i(443),s.Circumference=i(185),s.CircumferencePoint=i(115),s.Clone=i(442),s.Contains=i(55),s.ContainsPoint=i(441),s.ContainsRect=i(440),s.CopyFrom=i(439),s.Equals=i(438),s.GetBounds=i(437),s.GetPoint=i(187),s.GetPoints=i(186),s.Offset=i(436),s.OffsetPoint=i(435),s.Random=i(136),t.exports=s},,,,function(t,e,i){var s=i(3),n=i(97),r=function(t,e,i){for(var s=[],n=0;n0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var s=i(4);t.exports=function(t,e,i,n,r,o,a,h){void 0===h&&(h=new s);var u=Math.sin(-r),l=Math.cos(-r),c=l*o,d=-u*o,f=u*a,p=l*a,g=c*p-d*f,m=p/g,v=-d/g,y=-f/g,x=c/g,w=(f*n-p*i)/g,T=-(c*n-d*i)/g;return h.x=t*m+e*y+w,h.y=t*v+e*x+T,h}},function(t,e,i){var s=i(160);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},function(t,e,i){"use strict";function s(t,e,i){i=i||2;var s,a,h,u,l,f,g,m=e&&e.length,v=m?e[0]*i:t.length,y=n(t,0,v,i,!0),x=[];if(!y)return x;if(m&&(y=function(t,e,i,s){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){s=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-s,u-a)}return o(y,x,i,s,a,g),x}function n(t,e,i,s,n){var r,o;if(n===A(t,e,i,s)>0)for(r=e;r=e;r-=s)o=_(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!y(s,s.next)&&0!==v(s.prev,s,s.next))s=s.next;else{if(S(s),(s=e=s.prev)===s.next)return null;i=!0}}while(i||s!==e);return e}function o(t,e,i,s,n,c,d){if(t){!d&&c&&function(t,e,i,s){var n=t;do{null===n.z&&(n.z=f(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,s=i,a=0,e=0;e0||h>0&&s;)0!==a&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,a--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,u*=2}while(o>1)}(n)}(t,s,n,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,s,n,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?o(t=u(t,e,i),e,i,s,n,c,2):2===d&&l(t,e,i,s,n,c):o(r(t),e,i,s,n,c,1);break}}}function a(t){var e=t.prev,i=t,s=t.next;if(v(e,i,s)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(g(e.x,e.y,i.x,i.y,s.x,s.y,n.x,n.y)&&v(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,i,s){var n=t.prev,r=t,o=t.next;if(v(n,r,o)>=0)return!1;for(var a=n.xr.x?n.x>o.x?n.x:o.x:r.x>o.x?r.x:o.x,l=n.y>r.y?n.y>o.y?n.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,s),d=f(u,l,e,i,s),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(n.x,n.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(n.x,n.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var s=t;do{var n=s.prev,r=s.next.next;!y(n,r)&&x(n,s,s.next,r)&&w(n,r)&&w(r,n)&&(e.push(n.i/i),e.push(s.i/i),e.push(r.i/i),S(s),S(s.next),s=t=r),s=s.next}while(s!==t);return s}function l(t,e,i,s,n,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&m(h,u)){var l=T(h,u);return h=r(h,h.next),l=r(l,l.next),o(h,e,i,s,n,a),void o(l,e,i,s,n,a)}u=u.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,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&a>o){if(o=a,a===n){if(r===s.y)return s;if(r===s.next.y)return s.next}i=s.x=s.x&&s.x>=l&&n!==s.x&&g(ri.x)&&w(s,t)&&(i=s,d=h),s=s.next;return i}(t,e)){var i=T(e,t);r(i,i.next)}}function f(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-s)/n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(s-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(n-o)*(s-a)>=0}function m(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)&&w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)}function v(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,s){return!!(y(t,e)&&y(i,s)||y(t,s)&&y(i,e))||v(t,e,i)>0!=v(t,e,s)>0&&v(i,s,t)>0!=v(i,s,e)>0}function w(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function T(t,e){var i=new b(t.i,t.x,t.y),s=new b(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function _(t,e,i,s){var n=new b(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function 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,s){for(var n=0,r=e,o=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i}},function(t,e,i){var s=i(0),n=i(503),r=i(502),o=i(132),a=new s({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:n,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var s=t.bitmapMask,n=this.renderer,r=this.gl,o=s.visible;s&&r&&(n.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),s.visible=!0,s.renderWebGL(n,s,0,i),s.visible=o,n.flush(),n.setFramebuffer(t.mainFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT))},endMask:function(t){var e=t.bitmapMask,i=this.renderer,s=this.gl;e&&(i.setFramebuffer(null),i.setPipeline(this),i.setTexture2D(t.maskTexture,1),i.setTexture2D(t.mainTexture,0),i.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var s=t.getContext("experimental-webgl"),n=new Uint8Array(s.drawingBufferWidth*s.drawingBufferHeight*4);s.readPixels(0,0,s.drawingBufferWidth,s.drawingBufferHeight,s.RGBA,s.UNSIGNED_BYTE,n);var r,o=document.createElement("canvas"),a=o.getContext("2d");o.width=s.drawingBufferWidth,o.height=s.drawingBufferHeight;for(var h=(r=a.getImageData(0,0,o.width,o.height)).data,u=0;u2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.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>16&&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){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl,i=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture&&(i=t.renderTexture.width,s=t.renderTexture.height),e.bindFramebuffer(e.FRAMEBUFFER,t),e.viewport(0,0,i,s),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,s){var n=this.gl,a=n.NEAREST,h=n.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,o(e,i)&&(h=n.REPEAT),s===r.ScaleModes.LINEAR&&this.config.antialias&&(a=n.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,n.RGBA,t):this.createTexture2D(0,a,a,h,h,n.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,n),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,s),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,s){var n,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),s){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),(n=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"}[n])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,s=i.createProgram(),n=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(n,t),i.shaderSource(r,e),i.compileShader(n),i.compileShader(r),!i.getShaderParameter(n,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(n));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(s,n),i.attachShader(s,r),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(s));return s},createVertexBuffer:function(t,e){var i=this.gl,s=i.createBuffer();return this.setVertexBuffer(s),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),s},createIndexBuffer:function(t,e){var i=this.gl,s=i.createBuffer();return this.setIndexBuffer(s),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),s},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&a(this.nativeTextures,e),this.gl.deleteTexture(t),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,s=t._cw,n=t._ch;this.pushScissor(e,i,s,n);var r=this.pipelines.TextureTintPipeline,o=t.backgroundColor;if(t.renderToTexture){this.setFramebuffer(t.framebuffer);var a=this.gl;a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),r.projOrtho(0,t.width,0,t.height,-1e3,1e3),o.alphaGL>0&&r.drawFillRect(e,i,s,n,u.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL)}else o.alphaGL>0&&r.drawFillRect(e,i,s,n,u.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL)},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,u.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,u.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=u.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)}},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var s in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[s].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&(t.enable(t.SCISSOR_TEST),t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height)),this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,s){if(!this.contextLost){var n=e.list,o=n.length,a=this.pipelines;for(var h in a)a[h].onRender(t,s);this.preRenderCamera(s);for(var u=0;u=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===y&&(m>=0?m=-(m+f):m<0&&(m=Math.abs(m)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),o.copyFrom(i.matrix),s?(o.multiplyWithOffset(s,-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.scale(v,y),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.drawImage(e.source.image,l,c,d,f,g,m,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=l},function(t,e,i){var s=i(0),n=i(2),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),s=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,s)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,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=n}});t.exports=r},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 s=i(57);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?s.cordova&&!s.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","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={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(t,e,i){var s=i(268),n=i(22),r=i(3);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",s),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=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=n.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var m=0;m16777215?{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 s=i(31),n=i(286);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},function(t,e,i){var s=i(31);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,s){return e+e+i+i+s+s});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(n,r,o)}return e}},,,function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s>>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;i--){var s=Math.floor(this.frac()*(e+1)),n=t[s];t[s]=t[i],t[i]=n}return t}});t.exports=s},function(t,e,i){var s=i(138),n=i(65),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},,,,function(t,e,i){var s=i(512),n=i(0),r=i(59),o=i(8),a=i(511),h=i(509),u=i(508),l=new n({Extends:o,initialize:function(t){o.call(this),this.game=t,this.data=new r(this),this.on("setdata",this.setDataHandler,this),this.on("changedata",this.changeDataHandler,this),this.hasLoaded=!1,this.dataLocked=!1,this.supportedAPIs=[],this.entryPoint="",this.entryPointData=null,this.contextID=null,this.contextType=null,this.locale=null,this.platform=null,this.version=null,this.playerID=null,this.playerName=null,this.playerPhotoURL=null,this.playerCanSubscribeBot=!1,this.paymentsReady=!1,this.catalog=[],this.purchases=[],this.leaderboards={},this.ads=[]},setDataHandler:function(t,e,i){if(!this.dataLocked){console.log("set data:",e,i);var s={};s[e]=i;var n=this;FBInstant.player.setDataAsync(s).then(function(){console.log("sdh saved",s),n.emit("savedata",s)})}},changeDataHandler:function(t,e,i){if(!this.dataLocked){console.log("change data:",e,i);var s={};s[e]=i;var n=this;FBInstant.player.setDataAsync(s).then(function(){console.log("cdh saved",s),n.emit("savedata",s)})}},showLoadProgress:function(t){return t.load.on("progress",function(t){this.hasLoaded||(console.log(t),FBInstant.setLoadingProgress(100*t))},this),t.load.on("complete",function(){this.hasLoaded=!0,console.log("loaded"),FBInstant.startGameAsync().then(this.gameStarted.bind(this))},this),this},gameStarted:function(){console.log("FBP gameStarted");var t={},e=function(t){return t[1].toUpperCase()};FBInstant.getSupportedAPIs().forEach(function(i){i=i.replace(/\../g,e),t[i]=!0}),this.supportedAPIs=t,console.log(this.supportedAPIs),this.getID(),this.getType(),this.getLocale(),this.getPlatform(),this.getSDKVersion(),this.getPlayerID(),this.getPlayerName(),this.getPlayerPhotoURL();var i=this;FBInstant.onPause(function(){i.emit("pause")}),FBInstant.getEntryPointAsync().then(function(t){i.entryPoint=t,i.entryPointData=FBInstant.getEntryPointData(),i.emit("startgame")}).catch(function(t){console.warn(t)}),this.supportedAPIs.paymentsPurchaseAsync&&FBInstant.payments.onReady(function(){console.log("payments ready"),i.paymentsReady=!0}).catch(function(t){console.warn(t)})},checkAPI:function(t){return!!this.supportedAPIs[t]||(console.warn(t+" not supported"),!1)},getID:function(){return!this.contextID&&this.supportedAPIs.contextGetID&&(this.contextID=FBInstant.context.getID()),this.contextID},getType:function(){return!this.contextType&&this.supportedAPIs.contextGetType&&(this.contextType=FBInstant.context.getType()),this.contextType},getLocale:function(){return!this.locale&&this.supportedAPIs.getLocale&&(this.locale=FBInstant.getLocale()),this.locale},getPlatform:function(){return!this.platform&&this.supportedAPIs.getPlatform&&(this.platform=FBInstant.getPlatform()),this.platform},getSDKVersion:function(){return!this.version&&this.supportedAPIs.getSDKVersion&&(this.version=FBInstant.getSDKVersion()),this.version},getPlayerID:function(){return!this.playerID&&this.supportedAPIs.playerGetID&&(this.playerID=FBInstant.player.getID()),this.playerID},getPlayerName:function(){return!this.playerName&&this.supportedAPIs.playerGetName&&(this.playerName=FBInstant.player.getName()),this.playerName},getPlayerPhotoURL:function(){return!this.playerPhotoURL&&this.supportedAPIs.playerGetPhoto&&(this.playerPhotoURL=FBInstant.player.getPhoto()),this.playerPhotoURL},loadPlayerPhoto:function(t,e){return this.playerPhotoURL&&(console.log("load"),t.load.setCORS("anonymous"),t.load.image(e,this.playerPhotoURL),t.load.on("complete",function(){this.emit("photocomplete",e)},this),t.load.start()),this},canSubscribeBot:function(){if(this.supportedAPIs.playerCanSubscribeBotAsync){var t=this;FBInstant.player.canSubscribeBotAsync().then(function(){t.playerCanSubscribeBot=!0,t.emit("cansubscribebot")})}return this},subscribeBot:function(){if(this.playerCanSubscribeBot){var t=this;FBInstant.player.subscribeBotAsync().then(function(){t.emit("subscribebot")}).catch(function(){t.emit("subscribebotfailed")})}return this},getData:function(t){if(!this.checkAPI("playerGetDataAsync"))return this;Array.isArray(t)||(t=[t]),console.log("getdata",t);var e=this;return FBInstant.player.getDataAsync(t).then(function(t){for(var i in console.log("getdata req",t),e.dataLocked=!0,t)e.data.set(i,t[i]);e.dataLocked=!1,e.emit("getdata",t)}),this},saveData:function(t){if(!this.checkAPI("playerSetDataAsync"))return this;var e=this;return FBInstant.player.setDataAsync(t).then(function(){console.log("data saved to fb"),e.emit("savedata",t)}),this},flushData:function(){if(!this.checkAPI("playerFlushDataAsync"))return this;var t=this;return FBInstant.player.flushDataAsync().then(function(){console.log("data flushed"),t.emit("flushdata")}),this},getStats:function(t){if(!this.checkAPI("playerGetStatsAsync"))return this;var e=this;return FBInstant.player.getStatsAsync(t).then(function(t){console.log("stats got from fb"),e.emit("getstats",t)}),this},saveStats:function(t){if(!this.checkAPI("playerSetStatsAsync"))return this;var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var s=this;return FBInstant.player.setStatsAsync(e).then(function(){console.log("stats saved to fb"),s.emit("savestats",e)}),this},incStats:function(t){if(!this.checkAPI("playerIncrementStatsAsync"))return this;var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var s=this;return FBInstant.player.incrementStatsAsync(e).then(function(t){console.log("stats modified"),s.emit("incstats",t)}),this},saveSession:function(t){return this.checkAPI("setSessionData")?(JSON.stringify(t).length<=1e3?FBInstant.setSessionData(t):console.warn("Session data too long. Max 1000 chars."),this):this},openShare:function(t,e,i,s){return this._share("SHARE",t,e,i,s)},openInvite:function(t,e,i,s){return this._share("INVITE",t,e,i,s)},openRequest:function(t,e,i,s){return this._share("REQUEST",t,e,i,s)},openChallenge:function(t,e,i,s){return this._share("CHALLENGE",t,e,i,s)},_share:function(t,e,i,s,n){if(!this.checkAPI("shareAsync"))return this;if(void 0===n&&(n={}),i)var r=this.game.textures.getBase64(i,s);var o={intent:t,image:r,text:e,data:n},a=this;return FBInstant.shareAsync(o).then(function(){a.emit("resume")}),this},isSizeBetween:function(t,e){return this.checkAPI("contextIsSizeBetween")?FBInstant.context.isSizeBetween(t,e):this},switchContext:function(t){if(!this.checkAPI("contextSwitchAsync"))return this;if(t!==this.contextID){var e=this;FBInstant.context.switchAsync(t).then(function(){e.contextID=FBInstant.context.getID(),e.emit("switch",e.contextID)})}return this},chooseContext:function(t){if(!this.checkAPI("contextChoseAsync"))return this;var e=this;return FBInstant.context.chooseAsync(t).then(function(){e.contextID=FBInstant.context.getID(),e.emit("choose",e.contextID)}),this},createContext:function(t){if(!this.checkAPI("contextCreateAsync"))return this;var e=this;return FBInstant.context.createAsync(t).then(function(){e.contextID=FBInstant.context.getID(),e.emit("create",e.contextID)}),this},getPlayers:function(){if(!this.checkAPI("playerGetConnectedPlayersAsync"))return this;var t=this;return FBInstant.player.getConnectedPlayersAsync().then(function(e){console.log("got player data"),console.log(e),t.emit("players",e)}),this},getCatalog:function(){if(!this.paymentsReady)return this;var t=this,e=this.catalog;return FBInstant.payments.getCatalogAsync().then(function(i){console.log("got catalog"),e=[],i.forEach(function(t){e.push(h(t))}),t.emit("getcatalog",e)}),this},purchase:function(t,e){if(!this.paymentsReady)return this;var i={productID:t};e&&(i.developerPayload=e);var s=this;return FBInstant.payments.purchaseAsync(i).then(function(t){var e=u(t);console.log("product purchase",e),s.emit("purchase",e)}),this},getPurchases:function(){if(!this.paymentsReady)return this;var t=this,e=this.purchases;return FBInstant.payments.getPurchasesAsync().then(function(i){console.log("got purchases"),e=[],i.forEach(function(t){e.push(u(t))}),t.emit("getpurchases",e)}),this},consumePurchases:function(t){if(!this.paymentsReady)return this;var e=this;return FBInstant.payments.consumePurchaseAsync(t).then(function(){console.log("purchase consumed"),e.emit("consumepurchase",t)}),this},update:function(t,e,i,s,n,r){return this._update("CUSTOM",t,e,i,s,n,r)},updateLeaderboard:function(t,e,i,s,n,r){return this._update("LEADERBOARD",t,e,i,s,n,r)},_update:function(t,e,i,s,n,r,o){if(!this.checkAPI("shareAsync"))return this;if(void 0===e&&(e=""),"string"==typeof i&&(i={default:i}),void 0===o&&(o={}),s)var a=this.game.textures.getBase64(s,n);var h={action:t,cta:e,image:a,text:i,template:r,data:o,strategy:"IMMEDIATE",notification:"NO_PUSH"},u=this;return FBInstant.updateAsync(h).then(function(){u.emit("update")}),this},switchGame:function(t,e){if(!this.checkAPI("switchGameAsync"))return this;if(e&&JSON.stringify(e).length>1e3)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)}),this},createShortcut:function(){var t=this;FBInstant.canCreateShortcutAsync().then(function(e){e&&FBInstant.createShortcutAsync().then(function(){t.emit("shortcutcreated")}).catch(function(){t.emit("shortcutfailed")})})},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,n=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=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.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("animationupdate",i,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=s},function(t,e,i){var s=i(0),n=i(169),r=i(10),o=i(168),a=i(62),h=i(72),u=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.timeScale=1},createTimeline:function(t){return o(this,t)},timeline:function(t){var e=o(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return h(this,t)},add:function(t){var e=h(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=n(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,s=this._active;for(t=0;t-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0?(s.repeatCount--,s.elapsed=n,s.hasDispatched=!1):this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off("update",this.step,this),t.events.emit("transitioncomplete",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){return this.manager.add(t,e,i),this},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){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.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)},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("shutdown",this.shutdown,this),t.off("postupdate",this.step,this),t.off("transitionout")},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),t.exports=a},function(t,e,i){var s=i(80),n=i(17),r={SceneManager:i(202),ScenePlugin:i(331),Settings:i(200),Systems:i(122)};r=n(!1,r,s),t.exports=r},function(t,e,i){var s=i(173),n=new(i(0))({Extends:s,initialize:function(t,e){s.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this)},boot:function(){}});t.exports=n},function(t,e,i){t.exports={BasePlugin:i(173),DefaultPlugins:i(124),PluginCache:i(10),PluginManager:i(204),ScenePlugin:i(333)}},,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){var s=i(0),n=i(18),r=i(70),o=i(8),a=i(6),h=i(1),u=i(10),l=i(75),c=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=l(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this.systems.events.once("shutdown",this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit("start",this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on("update",this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit("progress",this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&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,i){var s=i(0),n=i(8),r=i(3),o=i(76),a=i(179),h=i(111),u=i(178),l=i(374),c=i(373),d=i(372),f=i(146),p=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.keys=[],this.combos=[],this.queue=[],this.onKeyHandler,this.time=0,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.settings.input,e=this.scene.sys.game.config;this.enabled=r(t,"keyboard",e.inputKeyboard),this.target=r(t,"keyboard.target",e.inputKeyboardEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=function(e){if(!e.defaultPrevented&&t.isActive()){t.queue.push(e);var i=t.keys[e.keyCode];i&&i.preventDefault&&e.preventDefault()}};this.onKeyHandler=e,this.target.addEventListener("keydown",e,!1),this.target.addEventListener("keyup",e,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("keydown",this.onKeyHandler),this.target.removeEventListener("keyup",this.onKeyHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},createCursorKeys:function(){return this.addKeys({up:h.UP,down:h.DOWN,left:h.LEFT,right:h.RIGHT,space:h.SPACE,shift:h.SHIFT})},addKeys:function(t){var e={};if("string"==typeof t){t=t.split(",");for(var i=0;i-1?e[i]=t:e[t.keyCode]=t,t}return"string"==typeof t&&(t=h[t.toUpperCase()]),e[t]||(e[t]=new a(t)),e[t]},removeKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=h[t.toUpperCase()]);e[t]&&(e[t]=void 0)},createCombo:function(t,e){return new u(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=f(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.queue.length;if(this.enabled&&0!==e)for(var i=this.queue.splice(0,e),s=this.keys,n=0;n=e}}},function(t,e,i){var s=i(89),n=i(33),r=i(0),o=i(183),a=i(380),h=i(58),u=i(116),l=i(55),c=i(8),d=i(1),f=i(76),p=i(7),g=i(10),m=i(11),v=i(32),y=i(68),x=i(61),w=new r({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,f.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once("destroy",this.destroy,this),this.pluginEvents.emit("boot")},start:function(){var t=this.systems.events;t.on("transitionstart",this.transitionIn,this),t.on("transitionout",this.transitionOut,this),t.on("transitioncomplete",this.transitionComplete,this),t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.enabled=!0,this.pluginEvents.emit("start")},preUpdate:function(){this.pluginEvents.emit("preUpdate");var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){this.pluginEvents.emit("update",t,e);var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var s=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s)for(var n=this.manager.pointers,r=0;r0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,s=0;s0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var a=[];for(i=0;i1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3===t.dragState){for(n=this._drag[t.id],i=0;i0?(s.emit("dragleave",t,r.target),this.emit("dragleave",t,s,r.target),r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target)):(s.emit("dragleave",t,r.target),this.emit("dragleave",t,s,r.target),u[0]?(r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target)):r.target=null)}else!r.target&&u[0]&&(r.target=u[0],s.emit("dragenter",t,r.target),this.emit("dragenter",t,s,r.target));var c=t.x-s.input.dragX,d=t.y-s.input.dragY;s.emit("drag",t,c,d),this.emit("drag",t,s,c,d)}return n.length}if(5===t.dragState){for(n=this._drag[t.id],i=0;i0)for(this.sortGameObjects(n),this.emit("pointerout",t,n),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return a(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,a=!1;if(p(e)){var h=e;e=d(h,"hitArea",null),i=d(h,"hitAreaCallback",null),s=d(h,"draggable",!1),n=d(h,"dropZone",!1),r=d(h,"cursor",!1),a=d(h,"useHandCursor",!1);var u=d(h,"pixelPerfect",!1),l=d(h,"alphaTolerance",1);u&&(e={},i=this.makePixelPerfect(l)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;cr;h--){for(u=0;u0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},,,,,,,,,,function(t,e){t.exports=function(t,e,i,s,n){t.batchSprite(e,e.frame,s,n)}},function(t,e){t.exports=function(t,e,i,s,n){this.pipeline.batchSprite(e,s,n)}},function(t,e,i){var s=i(2),n=i(2);s=i(431),n=i(430),t.exports={renderWebGL:s,renderCanvas:n}},function(t,e,i){var s=i(117),n=i(21),r=function(t,e,i){this.x=t,this.y=e,this.width=i},o=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new r(t,e,i)},a=[];t.exports=function(t,e,i,h,u){if(0!==e.commandBuffer.length){var l=this.pipeline,c=l._tempMatrix1,d=l._tempMatrix2,f=l._tempMatrix4;t.setPipeline(l),f.loadIdentity(),d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),c.copyFrom(h.matrix),u?(c.multiplyWithOffset(u,-h.scrollX*e.scrollFactorX,-h.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,c.multiply(d)):(d.e-=h.scrollX*e.scrollFactorX,d.f-=h.scrollY*e.scrollFactorY,c.multiply(d));for(var p=e.commandBuffer,g=h.alpha*e.alpha,m=1,v=l.fillTint,y=l.strokeTint,x=0,w=0,T=0,_=[],S=0,b=!1,A=null,E=n.getTintAppendFloatAlphaAndSwap,C=0;C-1&&this._list.splice(n,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},function(t,e,i){var s=i(56);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},function(t,e,i){var s=i(30);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var o=i-e,a=t.splice(e,o);if(n)for(var h=0;ht.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},function(t,e,i){var s=i(251);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),o=0;o=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},function(t,e,i){var s=i(30);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o0){var o=s-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.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;s>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var u=e[h];t.splice(i,0,u),n&&n.call(r,u)}return e}},function(t,e){t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=s[i],r=Math.min(r,this._min)),s[i]=r,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t},tick:function(){this.step(window.performance.now())},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(window.performance.now())},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){var i=0,s=function(t,e,s,n){var r=i-n.y-n.height;t.add(s,e,n.x,r,n.width,n.height)};t.exports=function(t,e,n){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=n.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;cx||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var E=u,C=u,P=0,k=e.sourceIndex,M=0;Mg||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var m=f,v=f,y=0,x=0,w=0;wr&&(y=T-r),_>o&&(x=_-o),t.add(w,e,i+m,n+v,h-y,u-x),(m+=h+p)+h>r&&(m=f,v+=u+p)}return t}},function(t,e,i){var s=i(34);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=s(h)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var s=i(34);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a=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)&&(n.dolby=!0)}}catch(t){}return n}()},function(t,e,i){var s=i(57),n=i(81),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),s.cocoonJS||("onwheel"in window||n.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(57),browser:i(81),features:i(123),input:i(495),audio:i(494),video:i(493),fullscreen:i(492),canvasFeatures:i(210)}},function(t,e,i){var s=i(23);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,o=t.device.audio;if(n=!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"+s.VERSION+" / https://phaser.io");else{var a,h="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),a=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),u.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),u.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"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),u[0]=h,console.log.apply(console,u)}}}},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){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 tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid texture-based tint"," color.rgb = mix(texture.rgb, outTint.rgb, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},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 s=this.modelMatrix;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var s=this.modelMatrix;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=n*s+h*i,e[5]=r*s+u*i,e[6]=o*s+l*i,e[7]=a*s+c*i,e[8]=h*s-n*i,e[9]=u*s-r*i,e[10]=l*s-o*i,e[11]=c*s-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=n*s-h*i,e[1]=r*s-u*i,e[2]=o*s-l*i,e[3]=a*s-c*i,e[8]=n*i+h*s,e[9]=r*i+u*s,e[10]=o*i+l*s,e[11]=a*i+c*s,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=n*s+h*i,e[1]=r*s+u*i,e[2]=o*s+l*i,e[3]=a*s+c*i,e[4]=h*s-n*i,e[5]=u*s-r*i,e[6]=l*s-o*i,e[7]=c*s-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 s=this.viewMatrix;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var s=this.viewMatrix;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=n*s+h*i,e[5]=r*s+u*i,e[6]=o*s+l*i,e[7]=a*s+c*i,e[8]=h*s-n*i,e[9]=u*s-r*i,e[10]=l*s-o*i,e[11]=c*s-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=n*s-h*i,e[1]=r*s-u*i,e[2]=o*s-l*i,e[3]=a*s-c*i,e[8]=n*i+h*s,e[9]=r*i+u*s,e[10]=o*i+l*s,e[11]=a*i+c*s,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),s=Math.cos(t),n=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=n*s+h*i,e[1]=r*s+u*i,e[2]=o*s+l*i,e[3]=a*s+c*i,e[4]=h*s-n*i,e[5]=u*s-r*i,e[6]=l*s-o*i,e[7]=c*s-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,s,n,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-s),u=1/(n-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*u,o[11]=0,o[12]=(t+e)*a,o[13]=(s+i)*h,o[14]=(r+n)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,s){var n=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-s);return n[0]=r/e,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=r,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=(s+i)*o,n[11]=-1,n[12]=0,n[13]=0,n[14]=2*s*i*o,n[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},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];","","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(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_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_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,i){var s=i(265),n=i(22),r=i(23),o=i(123);t.exports=function(t){var e,a,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.antialias||n.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=n.create(t,h.width*h.resolution,h.height*h.resolution,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||s.setCrisp(t.canvas),t.canvas.style.width=(h.width*h.zoom).toString()+"px",t.canvas.style.height=(h.height*h.zoom).toString()+"px",h.renderType!==r.HEADLESS&&(e=i(261),a=i(258),h.renderType===r.WEBGL?(t.renderer=new a(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var s=i(85);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style=["display: block;","width: "+t.canvas.width+"px;","height: "+t.canvas.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;"].join(" "),t.domContainer=i,s(i,e.parent)}}},function(t,e,i){var s=i(0),n=i(23),r=i(1),o=i(3),a=i(7),h=i(16),u=i(2),l=i(124),c=i(134),d=new s({initialize:function(t){void 0===t&&(t={});this.width=o(t,"width",1024),this.height=o(t,"height",768),this.zoom=o(t,"zoom",1),this.resolution=o(t,"resolution",1),this.parent=o(t,"parent",null),this.scaleMode=o(t,"scaleMode",0);var e=o(t,"scale",null);e&&(this.width=o(e,"width",this.width),this.height=o(e,"height",this.height),this.zoom=o(e,"zoom",this.zoom),this.resolution=o(e,"resolution",this.resolution),this.parent=o(e,"parent",this.parent),this.scaleMode=o(e,"mode",this.scaleMode)),this.renderType=o(t,"type",n.AUTO),this.canvas=o(t,"canvas",null),this.context=o(t,"context",null),this.canvasStyle=o(t,"canvasStyle",null),this.sceneConfig=o(t,"scene",null),this.seed=o(t,"seed",[(Date.now()*Math.random()).toString()]),h.RND.init(this.seed),this.gameTitle=o(t,"title",""),this.gameURL=o(t,"url","https://phaser.io"),this.gameVersion=o(t,"version",""),this.autoFocus=o(t,"autoFocus",!0),this.domCreateContainer=o(t,"dom.createContainer",!1),this.domBehindCanvas=o(t,"dom.behindCanvas",!1),this.inputKeyboard=o(t,"input.keyboard",!0),this.inputKeyboardEventTarget=o(t,"input.keyboard.target",window),this.inputMouse=o(t,"input.mouse",!0),this.inputMouseEventTarget=o(t,"input.mouse.target",null),this.inputMouseCapture=o(t,"input.mouse.capture",!0),this.inputTouch=o(t,"input.touch",!0),this.inputTouchEventTarget=o(t,"input.touch.target",null),this.inputTouchCapture=o(t,"input.touch.capture",!0),this.inputActivePointers=o(t,"input.activePointers",1),this.inputGamepad=o(t,"input.gamepad",!1),this.inputGamepadEventTarget=o(t,"input.gamepad.target",window),this.disableContextMenu=o(t,"disableContextMenu",!1),this.audio=o(t,"audio"),this.hideBanner=!1===o(t,"banner",null),this.hidePhaser=o(t,"banner.hidePhaser",!1),this.bannerTextColor=o(t,"banner.text","#ffffff"),this.bannerBackgroundColor=o(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(t,"fps",null);var i=o(t,"render",t);this.autoResize=o(i,"autoResize",!1),this.antialias=o(i,"antialias",!0),this.roundPixels=o(i,"roundPixels",!1),this.pixelArt=o(i,"pixelArt",!1),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(i,"transparent",!1),this.clearBeforeRender=o(i,"clearBeforeRender",!0),this.premultipliedAlpha=o(i,"premultipliedAlpha",!0),this.preserveDrawingBuffer=o(i,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=o(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(i,"powerPreference","default"),this.batchSize=o(i,"batchSize",2e3);var s=o(t,"backgroundColor",0);this.backgroundColor=c(s),0===s&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(t,"callbacks.preBoot",u),this.postBoot=o(t,"callbacks.postBoot",u),this.physics=o(t,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(t,"loader.baseURL",""),this.loaderPath=o(t,"loader.path",""),this.loaderMaxParallelDownloads=o(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(t,"loader.crossOrigin",void 0),this.loaderResponseType=o(t,"loader.responseType",""),this.loaderAsync=o(t,"loader.async",!0),this.loaderUser=o(t,"loader.user",""),this.loaderPassword=o(t,"loader.password",""),this.loaderTimeout=o(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var d=o(t,"plugins",null),f=l.DefaultScene;d&&(Array.isArray(d)?this.defaultPlugins=d:a(d)&&(this.installGlobalPlugins=r(d,"global",[]),this.installScenePlugins=r(d,"scene",[]),Array.isArray(d.default)?f=d.default:Array.isArray(d.defaultMerge)&&(f=f.concat(d.defaultMerge)))),this.defaultPlugins=f;var p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(t,"images.default",p+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(t,"images.missing",p+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=d},function(t,e,i){var s=i(85),n=i(215),r=i(213),o=i(22),a=i(0),h=i(506),u=i(505),l=i(504),c=i(59),d=i(497),f=i(496),p=i(264),g=i(8),m=i(305),v=i(209),y=i(10),x=i(204),w=i(491),T=i(202),_=i(199),S=i(192),b=i(478),A=i(477),E=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 n(this),this.textures=new S(this),this.cache=new r(this),this.registry=new c(this),this.input=new v(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=f,this.scaleManager=new w(this,this.config),this.sound=_.create(this),this.loop=new b(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new m(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isOver=!0,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),l(this),u(this),d(this),s(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("texturesready",this.texturesReady,this)):console.warn("Core Phaser Plugins missing. Cannot start.")},texturesReady:function(){this.events.emit("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("hidden",this.onHidden,this),t.on("visible",this.onVisible,this),t.on("blur",this.onBlur,this),t.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e);var s=this.renderer;s.preRender(),i.emit("prerender",s,t,e),this.scene.render(s),s.postRender(),i.emit("postrender",s,t,e)},headlessStep:function(t,e){var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e),i.emit("prerender"),i.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.domContainer&&(this.domContainer.style.width=t+"px",this.domContainer.style.height=e+"px"),this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=E},function(t,e,i){var s=i(1);t.exports=function(t){return{developerPayload:s(t,"developerPayload",""),paymentID:s(t,"paymentID",""),productID:s(t,"productID",""),purchaseTime:s(t,"purchaseTime",""),purchaseToken:s(t,"purchaseToken",""),signedRequest:s(t,"signedRequest","")}}},function(t,e,i){var s=i(1);t.exports=function(t){return{title:s(t,"title",""),productID:s(t,"productID",""),description:s(t,"description",""),imageURI:s(t,"imageURI",""),price:s(t,"price",""),priceCurrencyCode:s(t,"priceCurrencyCode","")}}},function(t,e){t.exports=function(t){return{score:t.getScore(),scoreFormatted:t.getFormattedScore(),timestamp:t.getTimestamp(),rank:t.getRank(),data:t.getExtraData(),playerName:t.getPlayer().getName(),playerPhotoURL:t.getPlayer().getPhoto(),playerID:t.getPlayer().getID()}}},function(t,e,i){var s=i(0),n=i(8),r=i(510),o=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.ref=e,this.name=e.getName(),this.contextID=e.getContextID(),this.entryCount=0,this.playerScore=null,this.scores=[],this.getEntryCount()},getEntryCount:function(){var t=this;this.ref.getEntryCountAsync().then(function(e){console.log("entry count",e),t.entryCount=e,t.emit("getentrycount",e,t.name)}).catch(function(t){console.warn(t)})},setScore:function(t,e){void 0===e&&(e="");var i=this;this.ref.setScoreAsync(t,e).then(function(t){console.log("set score",t),i.emit("setscore",t.getScore(),t.getExtraData(),i.name)}).catch(function(t){console.warn(t)})},getPlayerScore:function(){var t=this;this.ref.getPlayerEntryAsync().then(function(e){console.log("get player score");var i=r(e);console.log(i),t.playerScore=i,t.emit("getplayerscore",i,t.name)}).catch(function(t){console.warn(t)})},getScores:function(t,e){void 0===t&&(t=10),void 0===e&&(e=0);var i=this;this.ref.getEntriesAsync().then(function(t){console.log("get scores",t),i.scores=[],t.forEach(function(t){i.scores.push(r(t))}),i.emit("getscores",i.scores,i.name)}).catch(function(t){console.warn(t)})}});t.exports=o},function(t,e){t.exports=function(t,e){return{instance:t,placementID:t.getPlacementID(),shown:!1,video:e}}},function(t,e,i){var s=i(0),n=i(8),r=i(10),o=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){t.exports={EventEmitter:i(513)}},function(t,e){var i,s,n=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{s="function"==typeof clearTimeout?clearTimeout:o}catch(t){s=o}}();var h,u=[],l=!1,c=-1;function d(){l&&h&&(l=!1,h.length?u=h.concat(u):c=-1,u.length&&f())}function f(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c1)for(var i=1;i0&&(h.preRender(r,o),t.render(s,e,i,h))}},resetAll:function(){for(var t=0;t=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var s=i(20),n=i(0),r=i(4),o=i(126),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,r,a){void 0===i&&(i=1e3),void 0===s&&(s=o.Linear),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning?h:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(h.scrollX,h.scrollY),this.destination.set(t,e),h.getScroll(t,e,this.current),"string"==typeof s&&o.hasOwnProperty(s)?this.ease=o[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("camerapanstart",this.camera,this,i,t,e),h)},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed>16)+(65280&t)+((255&t)<<16)},s={_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,s,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,s=t,n=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(s),this._tintBR=i(n),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),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=s},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var s=i(60),n={_scaleMode:s.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==s.LINEAR&&t!==s.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=n},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var s=i(222),n=i(221),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new s(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new n(this.scene,t)}};t.exports=r},function(t,e,i){var s=i(11),n=i(295),r=i(4),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,n,r,o,a,h,u;if(void 0===t&&(t=new s),this.parentContainer){var l=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t),h=t.x,u=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,n,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,n,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e,i){var s=i(52),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},function(t,e,i){var s=i(20),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},,,,,,,,,,,,,function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e>>0;if("function"!=typeof t)throw new TypeError;for(var s=arguments.length>=2?arguments[1]:void 0,n=0;n + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(600), + Animation: __webpack_require__(306), + BlendMode: __webpack_require__(599), + ComputedSize: __webpack_require__(598), + Crop: __webpack_require__(597), + Depth: __webpack_require__(596), + Flip: __webpack_require__(595), + GetBounds: __webpack_require__(594), + Mask: __webpack_require__(593), + Origin: __webpack_require__(592), + Pipeline: __webpack_require__(294), + ScaleMode: __webpack_require__(591), + ScrollFactor: __webpack_require__(590), + Size: __webpack_require__(589), + Texture: __webpack_require__(588), + TextureCrop: __webpack_require__(587), + Tint: __webpack_require__(586), + ToJSON: __webpack_require__(585), + Transform: __webpack_require__(584), + TransformMatrix: __webpack_require__(27), + Visible: __webpack_require__(583) + +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -2729,47 +2785,6 @@ PluginCache.register('GameObjectCreator', GameObjectCreator, 'make'); module.exports = GameObjectCreator; -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Components - */ - -module.exports = { - - Alpha: __webpack_require__(595), - Animation: __webpack_require__(306), - BlendMode: __webpack_require__(594), - ComputedSize: __webpack_require__(593), - Crop: __webpack_require__(592), - Depth: __webpack_require__(591), - Flip: __webpack_require__(590), - GetBounds: __webpack_require__(589), - Mask: __webpack_require__(588), - Origin: __webpack_require__(587), - Pipeline: __webpack_require__(294), - ScaleMode: __webpack_require__(586), - ScrollFactor: __webpack_require__(585), - Size: __webpack_require__(584), - Texture: __webpack_require__(583), - TextureCrop: __webpack_require__(582), - Tint: __webpack_require__(581), - ToJSON: __webpack_require__(580), - Transform: __webpack_require__(579), - TransformMatrix: __webpack_require__(32), - Visible: __webpack_require__(578) - -}; - - /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { @@ -2781,7 +2796,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var DataManager = __webpack_require__(59); var EventEmitter = __webpack_require__(8); @@ -3691,9 +3706,9 @@ module.exports = FILE_CONST; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(109); -var MergeXHRSettings = __webpack_require__(108); -var XHRLoader = __webpack_require__(176); +var GetURL = __webpack_require__(110); +var MergeXHRSettings = __webpack_require__(109); +var XHRLoader = __webpack_require__(177); var XHRSettings = __webpack_require__(75); /** @@ -4450,237 +4465,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -/** - * Global consts. - * - * @ignore - */ - -var CONST = { - - /** - * Phaser Release Version - * - * @name Phaser.VERSION - * @readOnly - * @type {string} - * @since 3.0.0 - */ - VERSION: '3.12.0-beta1', - - BlendModes: __webpack_require__(52), - - ScaleModes: __webpack_require__(60), - - /** - * AUTO Detect Renderer. - * - * @name Phaser.AUTO - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - AUTO: 0, - - /** - * Canvas Renderer. - * - * @name Phaser.CANVAS - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - CANVAS: 1, - - /** - * WebGL Renderer. - * - * @name Phaser.WEBGL - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - WEBGL: 2, - - /** - * Headless Renderer. - * - * @name Phaser.HEADLESS - * @readOnly - * @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 - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - FOREVER: -1, - - /** - * Direction constant. - * - * @name Phaser.NONE - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - NONE: 4, - - /** - * Direction constant. - * - * @name Phaser.UP - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - UP: 5, - - /** - * Direction constant. - * - * @name Phaser.DOWN - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - DOWN: 6, - - /** - * Direction constant. - * - * @name Phaser.LEFT - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - LEFT: 7, - - /** - * Direction constant. - * - * @name Phaser.RIGHT - * @readOnly - * @type {integer} - * @since 3.0.0 - */ - RIGHT: 8 - -}; - -module.exports = CONST; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var GetFastValue = __webpack_require__(1); - -/** - * @typedef {object} GetTilesWithinFilteringOptions - * - * @property {boolean} [isNotEmpty=false] - If true, only return tiles that don't have -1 for an index. - * @property {boolean} [isColliding=false] - If true, only return tiles that collide on at least one side. - * @property {boolean} [hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. - */ - -/** - * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. - * - * @function Phaser.Tilemaps.Components.GetTilesWithin - * @private - * @since 3.0.0 - * - * @param {integer} tileX - [description] - * @param {integer} tileY - [description] - * @param {integer} width - [description] - * @param {integer} height - [description] - * @param {object} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles. - * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * - * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. - */ -var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer) -{ - if (tileX === undefined) { tileX = 0; } - if (tileY === undefined) { tileY = 0; } - if (width === undefined) { width = layer.width; } - if (height === undefined) { height = layer.height; } - - var isNotEmpty = GetFastValue(filteringOptions, 'isNotEmpty', false); - var isColliding = GetFastValue(filteringOptions, 'isColliding', false); - var hasInterestingFace = GetFastValue(filteringOptions, 'hasInterestingFace', false); - - // Clip x, y to top left of map, while shrinking width/height to match. - if (tileX < 0) - { - width += tileX; - tileX = 0; - } - if (tileY < 0) - { - height += tileY; - tileY = 0; - } - - // Clip width and height to bottom right of map. - if (tileX + width > layer.width) - { - width = Math.max(layer.width - tileX, 0); - } - if (tileY + height > layer.height) - { - height = Math.max(layer.height - tileY, 0); - } - - var results = []; - - for (var ty = tileY; ty < tileY + height; ty++) - { - for (var tx = tileX; tx < tileX + width; tx++) - { - var tile = layer.data[ty][tx]; - if (tile !== null) - { - if (isNotEmpty && tile.index === -1) { continue; } - if (isColliding && !tile.collides) { continue; } - if (hasInterestingFace && !tile.hasInterestingFace) { continue; } - results.push(tile); - } - } - } - - return results; -}; - -module.exports = GetTilesWithin; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var Smoothing = __webpack_require__(133); // The pool into which the canvas elements are placed. @@ -4931,6 +4716,236 @@ var CanvasPool = function () module.exports = CanvasPool(); +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Global consts. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @readOnly + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.12.0-beta2', + + BlendModes: __webpack_require__(52), + + ScaleModes: __webpack_require__(60), + + /** + * AUTO Detect Renderer. + * + * @name Phaser.AUTO + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Canvas Renderer. + * + * @name Phaser.CANVAS + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * WebGL Renderer. + * + * @name Phaser.WEBGL + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * Headless Renderer. + * + * @name Phaser.HEADLESS + * @readOnly + * @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 + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @readOnly + * @type {integer} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var GetFastValue = __webpack_require__(1); + +/** + * @typedef {object} GetTilesWithinFilteringOptions + * + * @property {boolean} [isNotEmpty=false] - If true, only return tiles that don't have -1 for an index. + * @property {boolean} [isColliding=false] - If true, only return tiles that collide on at least one side. + * @property {boolean} [hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. + */ + +/** + * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. + * + * @function Phaser.Tilemaps.Components.GetTilesWithin + * @private + * @since 3.0.0 + * + * @param {integer} tileX - [description] + * @param {integer} tileY - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] + * @param {object} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles. + * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. + * + * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. + */ +var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer) +{ + if (tileX === undefined) { tileX = 0; } + if (tileY === undefined) { tileY = 0; } + if (width === undefined) { width = layer.width; } + if (height === undefined) { height = layer.height; } + + var isNotEmpty = GetFastValue(filteringOptions, 'isNotEmpty', false); + var isColliding = GetFastValue(filteringOptions, 'isColliding', false); + var hasInterestingFace = GetFastValue(filteringOptions, 'hasInterestingFace', false); + + // Clip x, y to top left of map, while shrinking width/height to match. + if (tileX < 0) + { + width += tileX; + tileX = 0; + } + if (tileY < 0) + { + height += tileY; + tileY = 0; + } + + // Clip width and height to bottom right of map. + if (tileX + width > layer.width) + { + width = Math.max(layer.width - tileX, 0); + } + if (tileY + height > layer.height) + { + height = Math.max(layer.height - tileY, 0); + } + + var results = []; + + for (var ty = tileY; ty < tileY + height; ty++) + { + for (var tx = tileX; tx < tileX + width; tx++) + { + var tile = layer.data[ty][tx]; + if (tile !== null) + { + if (isNotEmpty && tile.index === -1) { continue; } + if (isColliding && !tile.collides) { continue; } + if (hasInterestingFace && !tile.hasInterestingFace) { continue; } + results.push(tile); + } + } + } + + return results; +}; + +module.exports = GetTilesWithin; + + /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { @@ -5153,899 +5168,6 @@ module.exports = PropertyValueSet; /***/ }), /* 27 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|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 - -}; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var CONST = __webpack_require__(18); -var File = __webpack_require__(19); -var FileTypesManager = __webpack_require__(6); -var GetFastValue = __webpack_require__(1); -var GetValue = __webpack_require__(3); -var IsPlainObject = __webpack_require__(7); - -/** - * @typedef {object} Phaser.Loader.FileTypes.JSONFileConfig - * - * @property {string} key - The key of the file. Must be unique within both the Loader and the JSON Cache. - * @property {string|any} [url] - The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. - * @property {string} [extension='json'] - The default file extension to use if no url is provided. - * @property {string} [dataKey] - If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. - * @property {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - */ - -/** - * @classdesc - * A single JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. - * - * @class JSONFile - * @extends Phaser.Loader.File - * @memberOf Phaser.Loader.FileTypes - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @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 {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - */ -var JSONFile = new Class({ - - Extends: File, - - initialize: - - // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object - // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing - - function JSONFile (loader, key, url, xhrSettings, dataKey) - { - var extension = 'json'; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - dataKey = GetFastValue(config, 'dataKey', dataKey); - } - - var fileConfig = { - type: 'json', - cache: loader.cacheManager.json, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings, - config: dataKey - }; - - File.call(this, loader, fileConfig); - - if (IsPlainObject(url)) - { - // Object provided instead of a URL, so no need to actually load it (populate data with value) - if (dataKey) - { - this.data = GetValue(url, dataKey); - } - else - { - this.data = url; - } - - this.state = CONST.FILE_POPULATED; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.JSONFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - if (this.state !== CONST.FILE_POPULATED) - { - this.state = CONST.FILE_PROCESSING; - - var json = JSON.parse(this.xhrLoader.responseText); - - var key = this.config; - - if (typeof key === 'string') - { - this.data = GetValue(json, key, json); - } - else - { - this.data = json; - } - } - - this.onProcessComplete(); - } - -}); - -/** - * 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 () - * { - * this.load.json('wavedata', 'files/AlienWaveData.json'); - * } - * ``` - * - * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, - * or if it's already running, when the next free load slot becomes available. This happens automatically if you - * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued - * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. - * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the - * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been - * loaded. - * - * The key must be a unique String. It is used to add the file to the global 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', - * url: 'files/AlienWaveData.json' - * }); - * ``` - * - * See the documentation for `Phaser.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 ... - * var data = this.cache.json.get('wavedata'); - * ``` - * - * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files - * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and - * this is what you would use to retrieve the text from the JSON Cache. - * - * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. - * - * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" - * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` 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 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": { - * "baddies": { - * "aliens": {}, - * "boss": {} - * } - * }, - * "level2": {}, - * "level3": {} - * } - * ``` - * - * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. - * - * Note: The ability to load this type of file will only be available if the JSON 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#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent - * @since 3.0.0 - * - * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig|Phaser.Loader.FileTypes.JSONFileConfig[])} 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 {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - * @param {XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. - * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. - */ -FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) -{ - if (Array.isArray(key)) - { - for (var i = 0; i < key.length; i++) - { - // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object - this.addFile(new JSONFile(this, key[i])); - } - } - else - { - this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); - } - - return this; -}); - -module.exports = JSONFile; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Tests if the start and end indexes are a safe range for the given array. - * - * @function Phaser.Utils.Array.SafeRange - * @since 3.4.0 - * - * @param {array} array - The array to check. - * @param {integer} startIndex - The start index. - * @param {integer} endIndex - The end index. - * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. - * - * @return {boolean} True if the range is safe, otherwise false. - */ -var SafeRange = function (array, startIndex, endIndex, throwError) -{ - var len = array.length; - - if (startIndex < 0 || - startIndex > len || - startIndex >= endIndex || - endIndex > len || - startIndex + endIndex > len) - { - if (throwError) - { - throw new Error('Range Error: Values outside acceptable range'); - } - - return false; - } - else - { - return true; - } -}; - -module.exports = SafeRange; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var GetColor = __webpack_require__(158); -var GetColor32 = __webpack_require__(287); - -/** - * @classdesc - * The Color class holds a single color value and allows for easy modification and reading of it. - * - * @class Color - * @memberOf Phaser.Display - * @constructor - * @since 3.0.0 - * - * @param {integer} [red=0] - The red color value. A number between 0 and 255. - * @param {integer} [green=0] - The green color value. A number between 0 and 255. - * @param {integer} [blue=0] - The blue color value. A number between 0 and 255. - * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. - */ -var Color = new Class({ - - initialize: - - function Color (red, green, blue, alpha) - { - if (red === undefined) { red = 0; } - if (green === undefined) { green = 0; } - if (blue === undefined) { blue = 0; } - if (alpha === undefined) { alpha = 255; } - - /** - * The internal red color value. - * - * @name Phaser.Display.Color#r - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.r = 0; - - /** - * The internal green color value. - * - * @name Phaser.Display.Color#g - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.g = 0; - - /** - * The internal blue color value. - * - * @name Phaser.Display.Color#b - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this.b = 0; - - /** - * The internal alpha color value. - * - * @name Phaser.Display.Color#a - * @type {number} - * @private - * @default 255 - * @since 3.0.0 - */ - this.a = 255; - - /** - * An array containing the calculated color values for WebGL use. - * - * @name Phaser.Display.Color#gl - * @type {number[]} - * @since 3.0.0 - */ - this.gl = [ 0, 0, 0, 1 ]; - - /** - * Pre-calculated internal color value. - * - * @name Phaser.Display.Color#_color - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._color = 0; - - /** - * Pre-calculated internal color32 value. - * - * @name Phaser.Display.Color#_color32 - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._color32 = 0; - - /** - * Pre-calculated internal color rgb string value. - * - * @name Phaser.Display.Color#_rgba - * @type {string} - * @private - * @default '' - * @since 3.0.0 - */ - this._rgba = ''; - - this.setTo(red, green, blue, alpha); - }, - - /** - * Sets this color to be transparent. Sets all values to zero. - * - * @method Phaser.Display.Color#transparent - * @since 3.0.0 - * - * @return {Phaser.Display.Color} This Color object. - */ - transparent: function () - { - this.red = 0; - this.green = 0; - this.blue = 0; - this.alpha = 0; - - return this.update(); - }, - - /** - * Sets the color of this Color component. - * - * @method Phaser.Display.Color#setTo - * @since 3.0.0 - * - * @param {integer} red - The red color value. A number between 0 and 255. - * @param {integer} green - The green color value. A number between 0 and 255. - * @param {integer} blue - The blue color value. A number between 0 and 255. - * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. - * - * @return {Phaser.Display.Color} This Color object. - */ - setTo: function (red, green, blue, alpha) - { - if (alpha === undefined) { alpha = 255; } - - this.red = red; - this.green = green; - this.blue = blue; - this.alpha = alpha; - - return this.update(); - }, - - /** - * Sets the red, green, blue and alpha GL values of this Color component. - * - * @method Phaser.Display.Color#setGLTo - * @since 3.0.0 - * - * @param {number} red - The red color value. A number between 0 and 1. - * @param {number} green - The green color value. A number between 0 and 1. - * @param {number} blue - The blue color value. A number between 0 and 1. - * @param {number} [alpha=1] - The alpha value. A number between 0 and 1. - * - * @return {Phaser.Display.Color} This Color object. - */ - setGLTo: function (red, green, blue, alpha) - { - if (alpha === undefined) { alpha = 1; } - - this.redGL = red; - this.greenGL = green; - this.blueGL = blue; - this.alphaGL = alpha; - - return this.update(); - }, - - /** - * Sets the color based on the color object given. - * - * @method Phaser.Display.Color#setFromRGB - * @since 3.0.0 - * - * @param {InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255. - * - * @return {Phaser.Display.Color} This Color object. - */ - setFromRGB: function (color) - { - this.red = color.r; - this.green = color.g; - this.blue = color.b; - - if (color.hasOwnProperty('a')) - { - this.alpha = color.a; - } - - return this.update(); - }, - - /** - * Updates the internal cache values. - * - * @method Phaser.Display.Color#update - * @since 3.0.0 - * - * @return {Phaser.Display.Color} This Color object. - */ - update: function () - { - this._color = GetColor(this.r, this.g, this.b); - this._color32 = GetColor32(this.r, this.g, this.b, this.a); - this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (this.a / 255) + ')'; - - return this; - }, - - /** - * Returns a new Color component using the values from this one. - * - * @method Phaser.Display.Color#clone - * @since 3.0.0 - * - * @return {Phaser.Display.Color} A new Color object. - */ - clone: function () - { - return new Color(this.r, this.g, this.b, this.a); - }, - - /** - * The color of this Color component, not including the alpha channel. - * - * @name Phaser.Display.Color#color - * @type {number} - * @readOnly - * @since 3.0.0 - */ - color: { - - get: function () - { - return this._color; - } - - }, - - /** - * The color of this Color component, including the alpha channel. - * - * @name Phaser.Display.Color#color32 - * @type {number} - * @readOnly - * @since 3.0.0 - */ - color32: { - - get: function () - { - return this._color32; - } - - }, - - /** - * The color of this Color component as a string which can be used in CSS color values. - * - * @name Phaser.Display.Color#rgba - * @type {string} - * @readOnly - * @since 3.0.0 - */ - rgba: { - - get: function () - { - return this._rgba; - } - - }, - - /** - * The red color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#redGL - * @type {number} - * @since 3.0.0 - */ - redGL: { - - get: function () - { - return this.gl[0]; - }, - - set: function (value) - { - this.gl[0] = Math.min(Math.abs(value), 1); - - this.r = Math.floor(this.gl[0] * 255); - - this.update(); - } - - }, - - /** - * The green color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#greenGL - * @type {number} - * @since 3.0.0 - */ - greenGL: { - - get: function () - { - return this.gl[1]; - }, - - set: function (value) - { - this.gl[1] = Math.min(Math.abs(value), 1); - - this.g = Math.floor(this.gl[1] * 255); - - this.update(); - } - - }, - - /** - * The blue color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#blueGL - * @type {number} - * @since 3.0.0 - */ - blueGL: { - - get: function () - { - return this.gl[2]; - }, - - set: function (value) - { - this.gl[2] = Math.min(Math.abs(value), 1); - - this.b = Math.floor(this.gl[2] * 255); - - this.update(); - } - - }, - - /** - * The alpha color value, normalized to the range 0 to 1. - * - * @name Phaser.Display.Color#alphaGL - * @type {number} - * @since 3.0.0 - */ - alphaGL: { - - get: function () - { - return this.gl[3]; - }, - - set: function (value) - { - this.gl[3] = Math.min(Math.abs(value), 1); - - this.a = Math.floor(this.gl[3] * 255); - - this.update(); - } - - }, - - /** - * The red color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#red - * @type {number} - * @since 3.0.0 - */ - red: { - - get: function () - { - return this.r; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.r = Math.min(value, 255); - - this.gl[0] = value / 255; - - this.update(); - } - - }, - - /** - * The green color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#green - * @type {number} - * @since 3.0.0 - */ - green: { - - get: function () - { - return this.g; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.g = Math.min(value, 255); - - this.gl[1] = value / 255; - - this.update(); - } - - }, - - /** - * The blue color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#blue - * @type {number} - * @since 3.0.0 - */ - blue: { - - get: function () - { - return this.b; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.b = Math.min(value, 255); - - this.gl[2] = value / 255; - - this.update(); - } - - }, - - /** - * The alpha color value, normalized to the range 0 to 255. - * - * @name Phaser.Display.Color#alpha - * @type {number} - * @since 3.0.0 - */ - alpha: { - - get: function () - { - return this.a; - }, - - set: function (value) - { - value = Math.floor(Math.abs(value)); - - this.a = Math.min(value, 255); - - this.gl[3] = value / 255; - - this.update(); - } - - } - -}); - -module.exports = Color; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Geom.Rectangle.Contains - * @since 3.0.0 - * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {boolean} [description] - */ -var Contains = function (rect, x, y) -{ - if (rect.width <= 0 || rect.height <= 0) - { - return false; - } - - return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); -}; - -module.exports = Contains; - - -/***/ }), -/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6916,6 +6038,899 @@ var TransformMatrix = new Class({ module.exports = TransformMatrix; +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|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 + +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(18); +var File = __webpack_require__(19); +var FileTypesManager = __webpack_require__(6); +var GetFastValue = __webpack_require__(1); +var GetValue = __webpack_require__(3); +var IsPlainObject = __webpack_require__(7); + +/** + * @typedef {object} Phaser.Loader.FileTypes.JSONFileConfig + * + * @property {string} key - The key of the file. Must be unique within both the Loader and the JSON Cache. + * @property {string|any} [url] - The absolute or relative URL to load the file from. Or can be a ready formed JSON object, in which case it will be directly added to the Cache. + * @property {string} [extension='json'] - The default file extension to use if no url is provided. + * @property {string} [dataKey] - If specified instead of the whole JSON file being parsed and added to the Cache, only the section corresponding to this property key will be added. If the property you want to extract is nested, use periods to divide it. + * @property {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + */ + +/** + * @classdesc + * A single JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. + * + * @class JSONFile + * @extends Phaser.Loader.File + * @memberOf Phaser.Loader.FileTypes + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. + * @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 {XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + */ +var JSONFile = new Class({ + + Extends: File, + + initialize: + + // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object + // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing + + function JSONFile (loader, key, url, xhrSettings, dataKey) + { + var extension = 'json'; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + dataKey = GetFastValue(config, 'dataKey', dataKey); + } + + var fileConfig = { + type: 'json', + cache: loader.cacheManager.json, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings, + config: dataKey + }; + + File.call(this, loader, fileConfig); + + if (IsPlainObject(url)) + { + // Object provided instead of a URL, so no need to actually load it (populate data with value) + if (dataKey) + { + this.data = GetValue(url, dataKey); + } + else + { + this.data = url; + } + + this.state = CONST.FILE_POPULATED; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.JSONFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + if (this.state !== CONST.FILE_POPULATED) + { + this.state = CONST.FILE_PROCESSING; + + var json = JSON.parse(this.xhrLoader.responseText); + + var key = this.config; + + if (typeof key === 'string') + { + this.data = GetValue(json, key, json); + } + else + { + this.data = json; + } + } + + this.onProcessComplete(); + } + +}); + +/** + * 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 () + * { + * this.load.json('wavedata', 'files/AlienWaveData.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global 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', + * url: 'files/AlienWaveData.json' + * }); + * ``` + * + * See the documentation for `Phaser.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 ... + * var data = this.cache.json.get('wavedata'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the JSON Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` 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 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": { + * "baddies": { + * "aliens": {}, + * "boss": {} + * } + * }, + * "level2": {}, + * "level3": {} + * } + * ``` + * + * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. + * + * Note: The ability to load this type of file will only be available if the JSON 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#json + * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Loader.FileTypes.JSONFileConfig|Phaser.Loader.FileTypes.JSONFileConfig[])} 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 {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + * @param {XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + * + * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + */ +FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) +{ + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object + this.addFile(new JSONFile(this, key[i])); + } + } + else + { + this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); + } + + return this; +}); + +module.exports = JSONFile; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Tests if the start and end indexes are a safe range for the given array. + * + * @function Phaser.Utils.Array.SafeRange + * @since 3.4.0 + * + * @param {array} array - The array to check. + * @param {integer} startIndex - The start index. + * @param {integer} endIndex - The end index. + * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. + * + * @return {boolean} True if the range is safe, otherwise false. + */ +var SafeRange = function (array, startIndex, endIndex, throwError) +{ + var len = array.length; + + if (startIndex < 0 || + startIndex > len || + startIndex >= endIndex || + endIndex > len || + startIndex + endIndex > len) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var GetColor = __webpack_require__(159); +var GetColor32 = __webpack_require__(288); + +/** + * @classdesc + * The Color class holds a single color value and allows for easy modification and reading of it. + * + * @class Color + * @memberOf Phaser.Display + * @constructor + * @since 3.0.0 + * + * @param {integer} [red=0] - The red color value. A number between 0 and 255. + * @param {integer} [green=0] - The green color value. A number between 0 and 255. + * @param {integer} [blue=0] - The blue color value. A number between 0 and 255. + * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. + */ +var Color = new Class({ + + initialize: + + function Color (red, green, blue, alpha) + { + if (red === undefined) { red = 0; } + if (green === undefined) { green = 0; } + if (blue === undefined) { blue = 0; } + if (alpha === undefined) { alpha = 255; } + + /** + * The internal red color value. + * + * @name Phaser.Display.Color#r + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.r = 0; + + /** + * The internal green color value. + * + * @name Phaser.Display.Color#g + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.g = 0; + + /** + * The internal blue color value. + * + * @name Phaser.Display.Color#b + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this.b = 0; + + /** + * The internal alpha color value. + * + * @name Phaser.Display.Color#a + * @type {number} + * @private + * @default 255 + * @since 3.0.0 + */ + this.a = 255; + + /** + * An array containing the calculated color values for WebGL use. + * + * @name Phaser.Display.Color#gl + * @type {number[]} + * @since 3.0.0 + */ + this.gl = [ 0, 0, 0, 1 ]; + + /** + * Pre-calculated internal color value. + * + * @name Phaser.Display.Color#_color + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._color = 0; + + /** + * Pre-calculated internal color32 value. + * + * @name Phaser.Display.Color#_color32 + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._color32 = 0; + + /** + * Pre-calculated internal color rgb string value. + * + * @name Phaser.Display.Color#_rgba + * @type {string} + * @private + * @default '' + * @since 3.0.0 + */ + this._rgba = ''; + + this.setTo(red, green, blue, alpha); + }, + + /** + * Sets this color to be transparent. Sets all values to zero. + * + * @method Phaser.Display.Color#transparent + * @since 3.0.0 + * + * @return {Phaser.Display.Color} This Color object. + */ + transparent: function () + { + this.red = 0; + this.green = 0; + this.blue = 0; + this.alpha = 0; + + return this.update(); + }, + + /** + * Sets the color of this Color component. + * + * @method Phaser.Display.Color#setTo + * @since 3.0.0 + * + * @param {integer} red - The red color value. A number between 0 and 255. + * @param {integer} green - The green color value. A number between 0 and 255. + * @param {integer} blue - The blue color value. A number between 0 and 255. + * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255. + * + * @return {Phaser.Display.Color} This Color object. + */ + setTo: function (red, green, blue, alpha) + { + if (alpha === undefined) { alpha = 255; } + + this.red = red; + this.green = green; + this.blue = blue; + this.alpha = alpha; + + return this.update(); + }, + + /** + * Sets the red, green, blue and alpha GL values of this Color component. + * + * @method Phaser.Display.Color#setGLTo + * @since 3.0.0 + * + * @param {number} red - The red color value. A number between 0 and 1. + * @param {number} green - The green color value. A number between 0 and 1. + * @param {number} blue - The blue color value. A number between 0 and 1. + * @param {number} [alpha=1] - The alpha value. A number between 0 and 1. + * + * @return {Phaser.Display.Color} This Color object. + */ + setGLTo: function (red, green, blue, alpha) + { + if (alpha === undefined) { alpha = 1; } + + this.redGL = red; + this.greenGL = green; + this.blueGL = blue; + this.alphaGL = alpha; + + return this.update(); + }, + + /** + * Sets the color based on the color object given. + * + * @method Phaser.Display.Color#setFromRGB + * @since 3.0.0 + * + * @param {InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255. + * + * @return {Phaser.Display.Color} This Color object. + */ + setFromRGB: function (color) + { + this.red = color.r; + this.green = color.g; + this.blue = color.b; + + if (color.hasOwnProperty('a')) + { + this.alpha = color.a; + } + + return this.update(); + }, + + /** + * Updates the internal cache values. + * + * @method Phaser.Display.Color#update + * @since 3.0.0 + * + * @return {Phaser.Display.Color} This Color object. + */ + update: function () + { + this._color = GetColor(this.r, this.g, this.b); + this._color32 = GetColor32(this.r, this.g, this.b, this.a); + this._rgba = 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (this.a / 255) + ')'; + + return this; + }, + + /** + * Returns a new Color component using the values from this one. + * + * @method Phaser.Display.Color#clone + * @since 3.0.0 + * + * @return {Phaser.Display.Color} A new Color object. + */ + clone: function () + { + return new Color(this.r, this.g, this.b, this.a); + }, + + /** + * The color of this Color component, not including the alpha channel. + * + * @name Phaser.Display.Color#color + * @type {number} + * @readOnly + * @since 3.0.0 + */ + color: { + + get: function () + { + return this._color; + } + + }, + + /** + * The color of this Color component, including the alpha channel. + * + * @name Phaser.Display.Color#color32 + * @type {number} + * @readOnly + * @since 3.0.0 + */ + color32: { + + get: function () + { + return this._color32; + } + + }, + + /** + * The color of this Color component as a string which can be used in CSS color values. + * + * @name Phaser.Display.Color#rgba + * @type {string} + * @readOnly + * @since 3.0.0 + */ + rgba: { + + get: function () + { + return this._rgba; + } + + }, + + /** + * The red color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#redGL + * @type {number} + * @since 3.0.0 + */ + redGL: { + + get: function () + { + return this.gl[0]; + }, + + set: function (value) + { + this.gl[0] = Math.min(Math.abs(value), 1); + + this.r = Math.floor(this.gl[0] * 255); + + this.update(); + } + + }, + + /** + * The green color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#greenGL + * @type {number} + * @since 3.0.0 + */ + greenGL: { + + get: function () + { + return this.gl[1]; + }, + + set: function (value) + { + this.gl[1] = Math.min(Math.abs(value), 1); + + this.g = Math.floor(this.gl[1] * 255); + + this.update(); + } + + }, + + /** + * The blue color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#blueGL + * @type {number} + * @since 3.0.0 + */ + blueGL: { + + get: function () + { + return this.gl[2]; + }, + + set: function (value) + { + this.gl[2] = Math.min(Math.abs(value), 1); + + this.b = Math.floor(this.gl[2] * 255); + + this.update(); + } + + }, + + /** + * The alpha color value, normalized to the range 0 to 1. + * + * @name Phaser.Display.Color#alphaGL + * @type {number} + * @since 3.0.0 + */ + alphaGL: { + + get: function () + { + return this.gl[3]; + }, + + set: function (value) + { + this.gl[3] = Math.min(Math.abs(value), 1); + + this.a = Math.floor(this.gl[3] * 255); + + this.update(); + } + + }, + + /** + * The red color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#red + * @type {number} + * @since 3.0.0 + */ + red: { + + get: function () + { + return this.r; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.r = Math.min(value, 255); + + this.gl[0] = value / 255; + + this.update(); + } + + }, + + /** + * The green color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#green + * @type {number} + * @since 3.0.0 + */ + green: { + + get: function () + { + return this.g; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.g = Math.min(value, 255); + + this.gl[1] = value / 255; + + this.update(); + } + + }, + + /** + * The blue color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#blue + * @type {number} + * @since 3.0.0 + */ + blue: { + + get: function () + { + return this.b; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.b = Math.min(value, 255); + + this.gl[2] = value / 255; + + this.update(); + } + + }, + + /** + * The alpha color value, normalized to the range 0 to 255. + * + * @name Phaser.Display.Color#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this.a; + }, + + set: function (value) + { + value = Math.floor(Math.abs(value)); + + this.a = Math.min(value, 255); + + this.gl[3] = value / 255; + + this.update(); + } + + } + +}); + +module.exports = Color; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {boolean} [description] + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + /***/ }), /* 33 */ /***/ (function(module, exports) { @@ -7010,9 +7025,9 @@ module.exports = Clone; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); -var SpriteRender = __webpack_require__(529); +var SpriteRender = __webpack_require__(534); /** * @classdesc @@ -7795,7 +7810,7 @@ module.exports = Wrap; */ var GetTileAt = __webpack_require__(142); -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the @@ -9277,7 +9292,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(510))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(515))) /***/ }), /* 58 */ @@ -10259,7 +10274,7 @@ module.exports = GetBoolean; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * [description] @@ -10356,7 +10371,7 @@ module.exports = FromPercent; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var Rectangle = __webpack_require__(393); /** @@ -11215,10 +11230,10 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Contains = __webpack_require__(61); -var GetPoint = __webpack_require__(233); -var GetPoints = __webpack_require__(232); -var Line = __webpack_require__(97); -var Random = __webpack_require__(160); +var GetPoint = __webpack_require__(235); +var GetPoints = __webpack_require__(234); +var Line = __webpack_require__(98); +var Random = __webpack_require__(161); /** * @classdesc @@ -11649,7 +11664,7 @@ module.exports = Triangle; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var ImageRender = __webpack_require__(432); @@ -12217,17 +12232,17 @@ module.exports = Length; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); -var GetProps = __webpack_require__(170); -var GetTargets = __webpack_require__(103); +var GetProps = __webpack_require__(171); +var GetTargets = __webpack_require__(104); var GetValue = __webpack_require__(3); -var GetValueOp = __webpack_require__(102); -var Tween = __webpack_require__(100); -var TweenData = __webpack_require__(99); +var GetValueOp = __webpack_require__(103); +var Tween = __webpack_require__(101); +var TweenData = __webpack_require__(100); /** * [description] @@ -12420,11 +12435,11 @@ var Body = {}; module.exports = Body; var Vertices = __webpack_require__(129); -var Vector = __webpack_require__(107); +var Vector = __webpack_require__(108); var Sleeping = __webpack_require__(335); var Common = __webpack_require__(42); var Bounds = __webpack_require__(128); -var Axes = __webpack_require__(687); +var Axes = __webpack_require__(692); (function() { @@ -13807,8 +13822,8 @@ module.exports = InputPluginCache; // Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. -var CheckMatrix = __webpack_require__(119); -var TransposeMatrix = __webpack_require__(188); +var CheckMatrix = __webpack_require__(120); +var TransposeMatrix = __webpack_require__(189); /** * [description] @@ -15514,7 +15529,7 @@ module.exports = AddToDOM; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(266); +var FromPoints = __webpack_require__(267); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(4); @@ -16868,6 +16883,1817 @@ module.exports = Vector3; /* 88 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Components = __webpack_require__(13); +var DegToRad = __webpack_require__(39); +var EventEmitter = __webpack_require__(8); +var Rectangle = __webpack_require__(11); +var TransformMatrix = __webpack_require__(27); +var ValueToColor = __webpack_require__(134); +var Vector2 = __webpack_require__(4); + +/** + * @typedef {object} JSONCameraBounds + * @property {number} x - The horizontal position of camera + * @property {number} y - The vertical position of camera + * @property {number} width - The width size of camera + * @property {number} height - The height size of camera + */ + +/** + * @typedef {object} JSONCamera + * + * @property {string} name - The name of the camera + * @property {number} x - The horizontal position of camera + * @property {number} y - The vertical position of camera + * @property {number} width - The width size of camera + * @property {number} height - The height size of camera + * @property {number} zoom - The zoom of camera + * @property {number} rotation - The rotation of camera + * @property {boolean} roundPixels - The round pixels st status of camera + * @property {number} scrollX - The horizontal scroll of camera + * @property {number} scrollY - The vertical scroll of camera + * @property {string} backgroundColor - The background color of camera + * @property {(JSONCameraBounds|undefined)} [bounds] - The bounds of camera + */ + +/** + * @classdesc + * A Base Camera class. + * + * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, + * and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. + * + * The Base Camera is extended by the Camera class, which adds in special effects including Fade, + * Flash and Camera Shake, as well as the ability to follow Game Objects. + * + * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow + * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate + * to when they were added to the Camera class. + * + * @class BaseCamera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.12.0 + * + * @extends Phaser.Events.EventEmitter + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.Visible + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var BaseCamera = new Class({ + + Extends: EventEmitter, + + Mixins: [ + Components.Alpha, + Components.Visible + ], + + initialize: + + function BaseCamera (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + EventEmitter.call(this); + + /** + * A reference to the Scene this camera belongs to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene; + + /** + * A reference to the Game Scene Manager. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager + * @type {Phaser.Scenes.SceneManager} + * @since 3.12.0 + */ + this.sceneManager; + + /** + * A reference to the Game Config. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#config + * @type {object} + * @readOnly + * @since 3.12.0 + */ + this.config; + + /** + * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion. + * This value is a bitmask. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#id + * @type {integer} + * @readOnly + * @since 3.11.0 + */ + this.id = 0; + + /** + * The name of the Camera. This is left empty for your own use. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The resolution of the Game, used in most Camera calculations. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#resolution + * @type {number} + * @readOnly + * @since 3.12.0 + */ + this.resolution = 1; + + /** + * Should this camera round its pixel values to integers? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.roundPixels = false; + + /** + * Is this Camera visible or not? + * + * A visible camera will render and perform input tests. + * An invisible camera will not render anything and will skip input tests. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#visible + * @type {boolean} + * @default true + * @since 3.10.0 + this.visible = true; + */ + + /** + * Is this Camera using a bounds to restrict scrolling movement? + * + * Set this property along with the bounds via `Camera.setBounds`. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.useBounds = false; + + /** + * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at. + * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. + * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. + * You can use it for culling or intersection checks. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#worldView + * @type {Phaser.Geom.Rectangle} + * @readOnly + * @since 3.11.0 + */ + this.worldView = new Rectangle(); + + /** + * Is this Camera dirty? + * + * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. + * + * This flag is cleared during the `postRenderCamera` method of the renderer. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#dirty + * @type {boolean} + * @default true + * @since 3.11.0 + */ + this.dirty = true; + + /** + * The x position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollX` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#x + * @type {number} + * @private + * @since 3.0.0 + */ + this._x = x; + + /** + * The y position of the Camera, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollY` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#y + * @type {number} + * @private + * @since 3.0.0 + */ + this._y = y; + + /** + * Internal Camera X value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cx + * @type {number} + * @private + * @since 3.12.0 + */ + this._cx = 0; + + /** + * Internal Camera Y value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cy + * @type {number} + * @private + * @since 3.12.0 + */ + this._cy = 0; + + /** + * Internal Camera Width value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_cw + * @type {number} + * @private + * @since 3.12.0 + */ + this._cw = 0; + + /** + * Internal Camera Height value multiplied by the resolution. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_ch + * @type {number} + * @private + * @since 3.12.0 + */ + this._ch = 0; + + /** + * The width of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_width + * @type {number} + * @private + * @since 3.11.0 + */ + this._width = width; + + /** + * The height of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_height + * @type {number} + * @private + * @since 3.11.0 + */ + this._height = height; + + /** + * The bounds the camera is restrained to during scrolling. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds + * @type {Phaser.Geom.Rectangle} + * @private + * @since 3.0.0 + */ + this._bounds = new Rectangle(); + + /** + * The horizontal scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._scrollX = 0; + + /** + * The vertical scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._scrollY = 0; + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * + * A value of 0.5 would zoom the Camera out, so you can now see twice as much + * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel + * now takes up 2 pixels when rendered. + * + * Set to 1 to return to the default zoom level. + * + * Be careful to never set this value to zero. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom + * @type {number} + * @private + * @default 1 + * @since 3.11.0 + */ + this._zoom = 1; + + /** + * The rotation of the Camera in radians. + * + * 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. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + this._rotation = 0; + + /** + * A local transform matrix used for internal calculations. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#matrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @private + * @since 3.0.0 + */ + this.matrix = new TransformMatrix(); + + /** + * Does this Camera have a transparent background? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#transparent + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.transparent = true; + + /** + * The background color of this Camera. Only used if `transparent` is `false`. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor + * @type {Phaser.Display.Color} + * @since 3.0.0 + */ + this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); + + /** + * The Camera alpha value. Setting this property impacts every single object that this Camera + * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out, + * or via the chainable `setAlpha` method instead. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#alpha + * @type {number} + * @default 1 + * @since 3.11.0 + this.alpha = 1; + */ + + /** + * Should the camera cull Game Objects before checking them for input hit tests? + * In some special cases it may be beneficial to disable this. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.disableCull = false; + + /** + * A temporary array of culled objects. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects + * @type {Phaser.GameObjects.GameObject[]} + * @default [] + * @private + * @since 3.0.0 + */ + this.culledObjects = []; + + /** + * The mid-point of the Camera in 'world' coordinates. + * + * Use it to obtain exactly where in the world the center of the camera is currently looking. + * + * This value is updated in the preRender method, after the scroll values and follower + * have been processed. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint + * @type {Phaser.Math.Vector2} + * @readOnly + * @since 3.11.0 + */ + this.midPoint = new Vector2(width / 2, height / 2); + + /** + * The horizontal origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#originX + * @type {number} + * @default 0.5 + * @since 3.11.0 + */ + this.originX = 0.5; + + /** + * The vertical origin of rotation for this Camera. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * See `setOrigin` to set both origins in a single, chainable call. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#originY + * @type {number} + * @default 0.5 + * @since 3.11.0 + */ + this.originY = 0.5; + + /** + * Does this Camera have a custom viewport? + * + * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport + * @type {boolean} + * @private + * @default false + * @since 3.12.0 + */ + this._customViewport = false; + }, + + /** + * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha + * @since 3.11.0 + * + * @param {number} [value=1] - The Camera alpha value. + * + * @return {this} This Camera instance. + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + */ + + /** + * Sets the rotation origin of this Camera. + * + * The values are given in the range 0 to 1 and are only used when calculating Camera rotation. + * + * By default the camera rotates around the center of the viewport. + * + * Changing the origin allows you to adjust the point in the viewport from which rotation happens. + * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin + * @since 3.11.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Camera instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this; + }, + + /** + * Calculates what the Camera.scrollX and scrollY values would need to be in order to move + * the Camera so it is centered on the given x and y coordinates, without actually moving + * the Camera there. The results are clamped based on the Camera bounds, if set. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll + * @since 3.11.0 + * + * @param {number} x - The horizontal coordinate to center on. + * @param {number} y - The vertical coordinate to center on. + * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. + * + * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` abd `y` properties. + */ + getScroll: function (x, y, out) + { + if (out === undefined) { out = new Vector2(); } + + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + out.x = x - originX; + out.y = y - originY; + + if (this.useBounds) + { + out.x = this.clampX(out.x); + out.y = this.clampY(out.y); + } + + return out; + }, + + /** + * Moves the Camera so that it is centered on the given coordinates, bounds allowing. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn + * @since 3.11.0 + * + * @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. + */ + centerOn: function (x, y) + { + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + this.midPoint.set(x, y); + + this.scrollX = x - originX; + this.scrollY = y - originY; + + if (this.useBounds) + { + this.scrollX = this.clampX(this.scrollX); + this.scrollY = this.clampY(this.scrollY); + } + + return this; + }, + + /** + * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + centerToBounds: function () + { + if (this.useBounds) + { + var bounds = this._bounds; + var originX = this.width * 0.5; + var originY = this.height * 0.5; + + this.midPoint.set(bounds.centerX, bounds.centerY); + + this.scrollX = bounds.centerX - originX; + this.scrollY = bounds.centerY - originY; + } + + return this; + }, + + /** + * Moves the Camera so that it is re-centered based on its viewport size. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + centerToSize: function () + { + this.scrollX = this.width * 0.5; + this.scrollY = this.height * 0.5; + + return this; + }, + + /** + * Takes an array of Game Objects and returns a new array featuring only those objects + * visible by this camera. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#cull + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return] + * + * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull. + * + * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera. + */ + cull: function (renderableObjects) + { + if (this.disableCull) + { + return renderableObjects; + } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return renderableObjects; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var culledObjects = this.culledObjects; + var length = renderableObjects.length; + + determinant = 1 / determinant; + + culledObjects.length = 0; + + for (var index = 0; index < length; ++index) + { + var object = renderableObjects[index]; + + if (!object.hasOwnProperty('width') || object.parentContainer) + { + culledObjects.push(object); + continue; + } + + var objectW = object.width; + var objectH = object.height; + var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); + var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); + var tx = (objectX * mva + objectY * mvc + mve); + var ty = (objectX * mvb + objectY * mvd + mvf); + var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); + var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); + var cullW = cameraW + objectW; + var cullH = cameraH + objectH; + + if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && + tw > -objectW && th > -objectH && tw < cullW && th < cullH) + { + culledObjects.push(object); + } + } + + return culledObjects; + }, + + /** + * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform. + * You can optionally provide a Vector2, or similar object, to store the results in. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {number} x - The x position to convert to world space. + * @param {number} y - The y position to convert to world space. + * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties. + */ + getWorldPoint: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + output.x = x; + output.y = y; + + return output; + } + + determinant = 1 / determinant; + + var ima = mvd * determinant; + var imb = -mvb * determinant; + var imc = -mvc * determinant; + var imd = mva * determinant; + var ime = (mvc * mvf - mvd * mve) * determinant; + var imf = (mvb * mve - mva * mvf) * determinant; + + var c = Math.cos(this.rotation); + var s = Math.sin(this.rotation); + + var zoom = this.zoom; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + + var res = this.resolution; + + var sx = x * res + ((scrollX * c - scrollY * s) * zoom); + var sy = y * res + ((scrollX * s + scrollY * c) * zoom); + + /* Apply transform to point */ + output.x = (sx * ima + sy * imc + ime); + output.y = (sx * imb + sy * imd + imf); + + return output; + }, + + /** + * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings + * so that they are ignored by this Camera. This means they will not be rendered by this Camera. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#ignore + * @since 3.0.0 + * + * @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. + */ + ignore: function (entries) + { + var id = this.id; + + if (!Array.isArray(entries)) + { + entries = [ entries ]; + } + + for (var i = 0; i < entries.length; i++) + { + var entry = entries[i]; + + if (Array.isArray(entry)) + { + this.ignore(entry); + } + else if (entry.isParent) + { + this.ignore(entry.getChildren()); + } + else + { + entry.cameraFilter |= id; + } + } + + return this; + }, + + /** + * Internal preRender step. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#preRender + * @protected + * @since 3.0.0 + * + * @param {number} baseScale - The base scale, as set in the Camera Manager. + * @param {number} resolution - The game resolution. + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + + var halfWidth = width * 0.5; + var halfHeight = height * 0.5; + + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + + var originX = width * this.originX; + var originY = height * this.originY; + + var sx = this.scrollX; + var sy = this.scrollY; + + if (this.useBounds) + { + sx = this.clampX(sx); + sy = this.clampY(sy); + } + + if (this.roundPixels) + { + originX = Math.round(originX); + originY = Math.round(originY); + } + + // Values are in pixels and not impacted by zooming the Camera + this.scrollX = sx; + this.scrollY = sy; + + var midX = sx + halfWidth; + var midY = sy + halfHeight; + + // The center of the camera, in world space, so taking zoom into account + // Basically the pixel value of what it's looking at in the middle of the cam + this.midPoint.set(midX, midY); + + var displayWidth = width / zoom; + var displayHeight = height / zoom; + + this.worldView.setTo( + midX - (displayWidth / 2), + midY - (displayHeight / 2), + displayWidth, + displayHeight + ); + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + }, + + /** + * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#clampX + * @since 3.11.0 + * + * @param {number} x - The value to horizontally scroll clamp. + * + * @return {number} The adjusted value to use as scrollX. + */ + clampX: function (x) + { + var bounds = this._bounds; + + var dw = this.displayWidth; + + var bx = bounds.x + ((dw - this.width) / 2); + var bw = Math.max(bx, bx + bounds.width - dw); + + if (x < bx) + { + x = bx; + } + else if (x > bw) + { + x = bw; + } + + return x; + }, + + /** + * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. + * Do not call this method if you are not using camera bounds. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#clampY + * @since 3.11.0 + * + * @param {number} y - The value to vertically scroll clamp. + * + * @return {number} The adjusted value to use as scrollY. + */ + clampY: function (y) + { + var bounds = this._bounds; + + var dh = this.displayHeight; + + var by = bounds.y + ((dh - this.height) / 2); + var bh = Math.max(by, by + bounds.height - dh); + + if (y < by) + { + y = by; + } + else if (y > bh) + { + y = bh; + } + + return y; + }, + + /* + var gap = this._zoomInversed; + return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap); + */ + + /** + * If this Camera has previously had movement bounds set on it, this will remove them. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + removeBounds: function () + { + this.useBounds = false; + + this.dirty = true; + + this._bounds.setEmpty(); + + return this; + }, + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle + * @since 3.0.0 + * + * @param {number} [value=0] - The cameras angle of rotation, given in degrees. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setAngle: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = DegToRad(value); + + return this; + }, + + /** + * Sets the background color for this Camera. + * + * By default a Camera has a transparent background but it can be given a solid color, with any level + * of transparency, via this method. + * + * The color value can be specified using CSS color notation, hex or numbers. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor + * @since 3.0.0 + * + * @param {(string|number|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. + */ + setBackgroundColor: function (color) + { + if (color === undefined) { color = 'rgba(0,0,0,0)'; } + + this.backgroundColor = ValueToColor(color); + + this.transparent = (this.backgroundColor.alpha === 0); + + return this; + }, + + /** + * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. + * + * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the + * edges and into blank space. It does not limit the placement of Game Objects, or where + * the Camera viewport can be positioned. + * + * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. + * + * Clear the bounds entirely by calling `Camera.removeBounds`. + * + * If you set bounds that are smaller than the viewport it will stop the Camera from being + * able to scroll. The bounds can be positioned where-ever you wish. By default they are from + * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of + * the Camera bounds. However, you can position them anywhere. So if you wanted a game world + * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y + * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find + * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds + * @since 3.0.0 + * + * @param {integer} x - The top-left x coordinate of the bounds. + * @param {integer} y - The top-left y coordinate of the bounds. + * @param {integer} width - The width of the bounds, in pixels. + * @param {integer} height - The height of the bounds, in pixels. + * @param {boolean} [centerOn] - If `true` the Camera will automatically be centered on the new bounds. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setBounds: function (x, y, width, height, centerOn) + { + this._bounds.setTo(x, y, width, height); + + this.dirty = true; + this.useBounds = true; + + if (centerOn) + { + this.centerToBounds(); + } + else + { + this.scrollX = this.clampX(this.scrollX); + this.scrollY = this.clampY(this.scrollY); + } + + return this; + }, + + /** + * Sets the name of this Camera. + * This value is for your own use and isn't used internally. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setName + * @since 3.0.0 + * + * @param {string} [value=''] - The name of the Camera. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setName: function (value) + { + if (value === undefined) { value = ''; } + + this.name = value; + + return this; + }, + + /** + * Set the position of the Camera viewport within the game. + * + * This does not change where the camera is 'looking'. See `setScroll` to control that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition + * @since 3.0.0 + * + * @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. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Set the rotation of this Camera. This causes everything it renders to appear rotated. + * + * Rotating a camera does not rotate the viewport itself, it is applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation + * @since 3.0.0 + * + * @param {number} [value=0] - The rotation of the Camera, in radians. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setRotation: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = value; + + return this; + }, + + /** + * Should the Camera round pixel values to whole integers when rendering Game Objects? + * + * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels + * @since 3.0.0 + * + * @param {boolean} value - `true` to round Camera pixels, `false` to not. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setRoundPixels: function (value) + { + this.roundPixels = value; + + return this; + }, + + /** + * Sets the Scene the Camera is bound to. + * + * Also populates the `resolution` property and updates the internal size values. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setScene + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene the camera is bound to. + * + * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + */ + setScene: function (scene) + { + this.scene = scene; + + this.config = scene.sys.game.config; + this.sceneManager = scene.sys.game.scene; + + var res = this.config.resolution; + + this.resolution = res; + + this._cx = this._x * res; + this._cy = this._y * res; + this._cw = this._width * res; + this._ch = this._height * res; + + return this; + }, + + /** + * Set the position of where the Camera is looking within the game. + * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. + * Use this method, or the scroll properties, to move your camera around the game world. + * + * This does not change where the camera viewport is placed. See `setPosition` to control that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll + * @since 3.0.0 + * + * @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. + */ + setScroll: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollX = x; + this.scrollY = y; + + return this; + }, + + /** + * Set the size of the Camera viewport. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setSize + * @since 3.0.0 + * + * @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. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * This method sets the position and size of the Camera viewport in a single call. + * + * If you're trying to change where the Camera is looking at in your game, then see + * the method `Camera.setScroll` instead. This method is for changing the viewport + * itself, not what the camera can see. + * + * By default a Camera is the same size as the game, but can be made smaller via this method, + * allowing you to create mini-cam style effects by creating and positioning a smaller Camera + * viewport within your game. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport + * @since 3.0.0 + * + * @param {number} x - The top-left x coordinate of the Camera viewport. + * @param {number} y - The top-left y coordinate of the Camera viewport. + * @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. + */ + setViewport: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Set the zoom value of the Camera. + * + * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. + * Changing to a larger value, such as 2, will cause the camera to 'zoom in'. + * + * A value of 1 means 'no zoom' and is the default. + * + * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom + * @since 3.0.0 + * + * @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. + */ + setZoom: function (value) + { + if (value === undefined) { value = 1; } + + if (value === 0) + { + value = 0.001; + } + + this.zoom = value; + + return this; + }, + + /** + * Sets the visibility of this Camera. + * + * An invisible Camera will skip rendering and input tests of everything it can see. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible + * @since 3.10.0 + * + * @param {boolean} value - The visible state of the Camera. + * + * @return {this} This Camera instance. + setVisible: function (value) + { + this.visible = value; + + return this; + }, + */ + + /** + * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON + * @since 3.0.0 + * + * @return {JSONCamera} A well-formed object suitable for conversion to JSON. + */ + toJSON: function () + { + var output = { + 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 + }; + + if (this.useBounds) + { + output['bounds'] = { + x: this._bounds.x, + y: this._bounds.y, + width: this._bounds.width, + height: this._bounds.height + }; + } + + return output; + }, + + /** + * Internal method called automatically by the Camera Manager. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#update + * @protected + * @since 3.0.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 () + { + // NOOP + }, + + /** + * Internal method called automatically when the viewport changes. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem + * @private + * @since 3.12.0 + */ + updateSystem: function () + { + if (!this.config) + { + return; + } + + var custom = false; + + if (this._x !== 0 || this._y !== 0) + { + custom = true; + } + else + { + var gameWidth = this.config.width; + var gameHeight = this.config.height; + + if (gameWidth !== this._width || gameHeight !== this._height) + { + custom = true; + } + } + + var sceneManager = this.sceneManager; + + if (custom && !this._customViewport) + { + // We need a custom viewport for this Camera + sceneManager.customViewports++; + } + else if (!custom && this._customViewport) + { + // We're turning off a custom viewport for this Camera + sceneManager.customViewports--; + } + + this.dirty = true; + this._customViewport = custom; + }, + + /** + * This event is fired when a camera is destroyed by the Camera Manager. + * + * @event CameraDestroyEvent + * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed. + */ + + /** + * Destroys this Camera instance. You rarely need to call this directly. + * + * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as + * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. + * + * @method Phaser.Cameras.Scene2D.BaseCamera#destroy + * @fires CameraDestroyEvent + * @since 3.0.0 + */ + destroy: function () + { + this.emit('cameradestroy', this); + + this.removeAllListeners(); + + this.matrix.destroy(); + + this.culledObjects = []; + + if (this._customViewport) + { + // We're turning off a custom viewport for this Camera + this.sceneManager.customViewports--; + } + + this._bounds = null; + + this.scene = null; + this.config = null; + this.sceneManager = null; + }, + + /** + * The x position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollX` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#x + * @type {number} + * @since 3.0.0 + */ + x: { + + get: function () + { + return this._x; + }, + + set: function (value) + { + this._x = value; + this._cx = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The y position of the Camera viewport, relative to the top-left of the game canvas. + * The viewport is the area into which the camera renders. + * To adjust the position the camera is looking at in the game world, see the `scrollY` value. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#y + * @type {number} + * @since 3.0.0 + */ + y: { + + get: function () + { + return this._y; + }, + + set: function (value) + { + this._y = value; + this._cy = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The width of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#width + * @type {number} + * @since 3.0.0 + */ + width: { + + get: function () + { + return this._width; + }, + + set: function (value) + { + this._width = value; + this._cw = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The height of the Camera viewport, in pixels. + * + * The viewport is the area into which the Camera renders. Setting the viewport does + * not restrict where the Camera can scroll to. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#height + * @type {number} + * @since 3.0.0 + */ + height: { + + get: function () + { + return this._height; + }, + + set: function (value) + { + this._height = value; + this._ch = value * this.resolution; + this.updateSystem(); + } + + }, + + /** + * The horizontal scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + scrollX: { + + get: function () + { + return this._scrollX; + }, + + set: function (value) + { + this._scrollX = value; + this.dirty = true; + } + + }, + + /** + * The vertical scroll position of this Camera. + * + * Change this value to cause the Camera to scroll around your Scene. + * + * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, + * will automatically adjust the Camera scroll values accordingly. + * + * You can set the bounds within which the Camera can scroll via the `setBounds` method. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + scrollY: { + + get: function () + { + return this._scrollY; + }, + + set: function (value) + { + this._scrollY = value; + this.dirty = true; + } + + }, + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * + * A value of 0.5 would zoom the Camera out, so you can now see twice as much + * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel + * now takes up 2 pixels when rendered. + * + * Set to 1 to return to the default zoom level. + * + * Be careful to never set this value to zero. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#zoom + * @type {number} + * @default 1 + * @since 3.0.0 + */ + zoom: { + + get: function () + { + return this._zoom; + }, + + set: function (value) + { + this._zoom = value; + this.dirty = true; + } + + }, + + /** + * The rotation of the Camera in radians. + * + * 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. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#rotation + * @type {number} + * @private + * @default 0 + * @since 3.11.0 + */ + rotation: { + + get: function () + { + return this._rotation; + }, + + set: function (value) + { + this._rotation = value; + this.dirty = true; + } + + }, + + /** + * The x position of the center of the Camera's viewport, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#centerX + * @type {number} + * @readOnly + * @since 3.10.0 + */ + centerX: { + + get: function () + { + return this.x + (0.5 * this.width); + } + + }, + + /** + * The y position of the center of the Camera's viewport, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#centerY + * @type {number} + * @readOnly + * @since 3.10.0 + */ + centerY: { + + get: function () + { + return this.y + (0.5 * this.height); + } + + }, + + /** + * The displayed width of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width + * would be 1600, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a width of 800 and zoom of 2 would have a display width + * of 400 pixels. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth + * @type {number} + * @readOnly + * @since 3.11.0 + */ + displayWidth: { + + get: function () + { + return this.width / this.zoom; + } + + }, + + /** + * The displayed height of the camera viewport, factoring in the camera zoom level. + * + * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height + * would be 1200, as it's displaying twice as many pixels as zoom level 1. + * + * Equally, a camera with a height of 600 and zoom of 2 would have a display height + * of 300 pixels. + * + * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight + * @type {number} + * @readOnly + * @since 3.11.0 + */ + displayHeight: { + + get: function () + { + return this.height / this.zoom; + } + + } + +}); + +module.exports = BaseCamera; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -16878,7 +18704,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(33); var GetPoint = __webpack_require__(301); var GetPoints = __webpack_require__(299); -var Random = __webpack_require__(164); +var Random = __webpack_require__(165); /** * @classdesc @@ -17228,7 +19054,7 @@ module.exports = Circle; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -17256,7 +19082,7 @@ module.exports = GetCenterY; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -17291,7 +19117,7 @@ module.exports = SetCenterY; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports) { /** @@ -17326,7 +19152,7 @@ module.exports = SetCenterX; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports) { /** @@ -17354,7 +19180,7 @@ module.exports = GetCenterX; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18173,7 +19999,7 @@ module.exports = List; /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18987,7 +20813,7 @@ module.exports = Frame; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19029,7 +20855,7 @@ module.exports = Merge; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports) { /** @@ -19067,7 +20893,7 @@ module.exports = Shuffle; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19078,8 +20904,8 @@ module.exports = Shuffle; var Class = __webpack_require__(0); var GetPoint = __webpack_require__(296); -var GetPoints = __webpack_require__(163); -var Random = __webpack_require__(162); +var GetPoints = __webpack_require__(164); +var Random = __webpack_require__(163); var Vector2 = __webpack_require__(4); /** @@ -19392,7 +21218,7 @@ module.exports = Line; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -19420,7 +21246,7 @@ module.exports = Perimeter; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports) { /** @@ -19573,7 +21399,7 @@ module.exports = TweenData; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19583,7 +21409,7 @@ module.exports = TweenData; */ var Class = __webpack_require__(0); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); var TWEEN_CONST = __webpack_require__(62); @@ -20968,7 +22794,7 @@ module.exports = Tween; /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -21011,7 +22837,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -21184,7 +23010,7 @@ module.exports = GetValueOp; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21231,7 +23057,7 @@ module.exports = GetTargets; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21433,7 +23259,7 @@ module.exports = MapData; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21653,7 +23479,7 @@ module.exports = LayerData; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -21684,7 +23510,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports) { /** @@ -21928,7 +23754,7 @@ module.exports = Vector; })(); /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21976,7 +23802,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports) { /** @@ -22017,7 +23843,7 @@ module.exports = GetURL; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -22494,7 +24320,7 @@ module.exports = KeyCodes; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22504,14 +24330,14 @@ module.exports = KeyCodes; */ var AddToDOM = __webpack_require__(85); -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); var GameObject = __webpack_require__(15); var GetTextSize = __webpack_require__(420); var GetValue = __webpack_require__(3); -var RemoveFromDOM = __webpack_require__(261); +var RemoveFromDOM = __webpack_require__(153); var TextRender = __webpack_require__(419); var TextStyle = __webpack_require__(416); @@ -23698,7 +25524,7 @@ module.exports = Text; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -23727,7 +25553,7 @@ module.exports = HasValue; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23736,12 +25562,12 @@ module.exports = HasValue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Actions = __webpack_require__(607); +var Actions = __webpack_require__(612); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(248); +var Range = __webpack_require__(250); var Set = __webpack_require__(70); var Sprite = __webpack_require__(35); @@ -24949,7 +26775,7 @@ module.exports = Group; /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24991,7 +26817,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25002,8 +26828,8 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Contains = __webpack_require__(55); -var GetPoint = __webpack_require__(186); -var GetPoints = __webpack_require__(185); +var GetPoint = __webpack_require__(187); +var GetPoints = __webpack_require__(186); var Random = __webpack_require__(136); /** @@ -25359,7 +27185,7 @@ module.exports = Ellipse; /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -25402,7 +27228,7 @@ module.exports = { /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25411,11 +27237,11 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(126); +var BaseCamera = __webpack_require__(88); var Class = __webpack_require__(0); -var Commands = __webpack_require__(116); -var Components = __webpack_require__(14); -var Ellipse = __webpack_require__(244); +var Commands = __webpack_require__(117); +var Components = __webpack_require__(13); +var Ellipse = __webpack_require__(246); var GameObject = __webpack_require__(15); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); @@ -26897,6 +28723,7 @@ var Graphics = new Class({ generateTexture: function (key, width, height) { var sys = this.scene.sys; + var renderer = sys.game.renderer; if (width === undefined) { width = sys.game.config.width; } if (height === undefined) { height = sys.game.config.height; } @@ -26942,11 +28769,12 @@ var Graphics = new Class({ if (ctx) { - this.renderCanvas(sys.game.renderer, this, 0.0, Graphics.TargetCamera, null, ctx); + // var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip) + this.renderCanvas(renderer, this, 0, Graphics.TargetCamera, null, ctx, false); - if (sys.game.renderer.gl && texture) + if (renderer.gl && texture) { - texture.source[0].glTexture = sys.game.renderer.canvasToTexture(ctx.canvas, texture.source[0].glTexture); + texture.source[0].glTexture = renderer.canvasToTexture(ctx.canvas, texture.source[0].glTexture); } } @@ -26974,13 +28802,13 @@ var Graphics = new Class({ * @type {Phaser.Cameras.Scene2D.Camera} * @since 3.1.0 */ -Graphics.TargetCamera = new Camera(0, 0, 0, 0); +Graphics.TargetCamera = new BaseCamera(); module.exports = Graphics; /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -27064,7 +28892,7 @@ module.exports = SetTransform; /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -27122,7 +28950,7 @@ module.exports = CheckMatrix; /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27132,8 +28960,8 @@ module.exports = CheckMatrix; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(94); -var TextureSource = __webpack_require__(190); +var Frame = __webpack_require__(95); +var TextureSource = __webpack_require__(191); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -27594,7 +29422,7 @@ module.exports = Texture; /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27605,11 +29433,11 @@ module.exports = Texture; var Class = __webpack_require__(0); var CONST = __webpack_require__(80); -var DefaultPlugins = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(124); var GetPhysicsPlugins = __webpack_require__(490); var GetScenePlugins = __webpack_require__(489); var NOOP = __webpack_require__(2); -var Settings = __webpack_require__(199); +var Settings = __webpack_require__(200); /** * @classdesc @@ -28277,7 +30105,7 @@ module.exports = Systems; /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28288,7 +30116,7 @@ module.exports = Systems; var OS = __webpack_require__(57); var Browser = __webpack_require__(81); -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Determines the features of the browser running this Phaser Game instance. @@ -28474,7 +30302,7 @@ module.exports = init(); /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -28503,6 +30331,7 @@ var DefaultPlugins = { */ Global: [ + 'game', 'anims', 'cache', 'facebook', @@ -28569,7 +30398,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -28599,7 +30428,7 @@ module.exports = Linear; /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28608,18 +30437,18 @@ module.exports = Linear; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Back = __webpack_require__(282); -var Bounce = __webpack_require__(281); -var Circular = __webpack_require__(280); -var Cubic = __webpack_require__(279); -var Elastic = __webpack_require__(278); -var Expo = __webpack_require__(277); -var Linear = __webpack_require__(276); -var Quadratic = __webpack_require__(275); -var Quartic = __webpack_require__(274); -var Quintic = __webpack_require__(273); -var Sine = __webpack_require__(272); -var Stepped = __webpack_require__(271); +var Back = __webpack_require__(283); +var Bounce = __webpack_require__(282); +var Circular = __webpack_require__(281); +var Cubic = __webpack_require__(280); +var Elastic = __webpack_require__(279); +var Expo = __webpack_require__(278); +var Linear = __webpack_require__(277); +var Quadratic = __webpack_require__(276); +var Quartic = __webpack_require__(275); +var Quintic = __webpack_require__(274); +var Sine = __webpack_require__(273); +var Stepped = __webpack_require__(272); // EaseMap module.exports = { @@ -28679,732 +30508,6 @@ module.exports = { }; -/***/ }), -/* 126 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BaseCamera = __webpack_require__(289); -var CenterOn = __webpack_require__(157); -var Clamp = __webpack_require__(20); -var Class = __webpack_require__(0); -var Effects = __webpack_require__(210); -var Linear = __webpack_require__(124); -var Rectangle = __webpack_require__(11); -var Vector2 = __webpack_require__(4); - -/** - * @classdesc - * A Camera. - * - * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, - * and can be positioned, rotated, zoomed and scrolled accordingly. - * - * A Camera consists of two elements: The viewport and the scroll values. - * - * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are - * created the same size as your game, but their position and size can be set to anything. This means if you - * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, - * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). - * - * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this - * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the - * viewport, and changing the viewport has no impact on the scrolling. - * - * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, - * allowing you to filter Game Objects out on a per-Camera basis. - * - * A Camera also has built-in special effects including Fade, Flash and Camera Shake. - * - * @class Camera - * @extends Phaser.Cameras.Scene2D.BaseCamera - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.0.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var Camera = new Class({ - - Extends: BaseCamera, - - initialize: - - function Camera (x, y, width, height) - { - BaseCamera.call(this, x, y, width, height); - - /** - * Does this Camera allow the Game Objects it renders to receive input events? - * - * @name Phaser.Cameras.Scene2D.Camera#inputEnabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.inputEnabled = true; - - /** - * The Camera Fade effect handler. - * To fade this camera see the `Camera.fade` methods. - * - * @name Phaser.Cameras.Scene2D.Camera#fadeEffect - * @type {Phaser.Cameras.Scene2D.Effects.Fade} - * @since 3.5.0 - */ - this.fadeEffect = new Effects.Fade(this); - - /** - * The Camera Flash effect handler. - * To flash this camera see the `Camera.flash` method. - * - * @name Phaser.Cameras.Scene2D.Camera#flashEffect - * @type {Phaser.Cameras.Scene2D.Effects.Flash} - * @since 3.5.0 - */ - this.flashEffect = new Effects.Flash(this); - - /** - * The Camera Shake effect handler. - * To shake this camera see the `Camera.shake` method. - * - * @name Phaser.Cameras.Scene2D.Camera#shakeEffect - * @type {Phaser.Cameras.Scene2D.Effects.Shake} - * @since 3.5.0 - */ - this.shakeEffect = new Effects.Shake(this); - - /** - * The Camera Pan effect handler. - * To pan this camera see the `Camera.pan` method. - * - * @name Phaser.Cameras.Scene2D.Camera#panEffect - * @type {Phaser.Cameras.Scene2D.Effects.Pan} - * @since 3.11.0 - */ - this.panEffect = new Effects.Pan(this); - - /** - * The Camera Zoom effect handler. - * To zoom this camera see the `Camera.zoom` method. - * - * @name Phaser.Cameras.Scene2D.Camera#zoomEffect - * @type {Phaser.Cameras.Scene2D.Effects.Zoom} - * @since 3.11.0 - */ - this.zoomEffect = new Effects.Zoom(this); - - /** - * The linear interpolation value to use when following a target. - * - * Can also be set via `setLerp` or as part of the `startFollow` call. - * - * The default values of 1 means the camera will instantly snap to the target coordinates. - * A lower value, such as 0.1 means the camera will more slowly track the target, giving - * a smooth transition. You can set the horizontal and vertical values independently, and also - * adjust this value in real-time during your game. - * - * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. - * - * @name Phaser.Cameras.Scene2D.Camera#lerp - * @type {Phaser.Math.Vector2} - * @since 3.9.0 - */ - this.lerp = new Vector2(1, 1); - - /** - * The values stored in this property are subtracted from the Camera targets position, allowing you to - * offset the camera from the actual target x/y coordinates by this amount. - * Can also be set via `setFollowOffset` or as part of the `startFollow` call. - * - * @name Phaser.Cameras.Scene2D.Camera#followOffset - * @type {Phaser.Math.Vector2} - * @since 3.9.0 - */ - this.followOffset = new Vector2(); - - /** - * The Camera dead zone. - * - * The deadzone is only used when the camera is following a target. - * - * It defines a rectangular region within which if the target is present, the camera will not scroll. - * If the target moves outside of this area, the camera will begin scrolling in order to follow it. - * - * The `lerp` values that you can set for a follower target also apply when using a deadzone. - * - * You can directly set this property to be an instance of a Rectangle. Or, you can use the - * `setDeadzone` method for a chainable approach. - * - * The rectangle you provide can have its dimensions adjusted dynamically, however, please - * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point. - * - * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property - * to `null`. - * - * @name Phaser.Cameras.Scene2D.Camera#deadzone - * @type {?Phaser.Geom.Rectangle} - * @since 3.11.0 - */ - this.deadzone = null; - - /** - * Internal follow target reference. - * - * @name Phaser.Cameras.Scene2D.Camera#_follow - * @type {?any} - * @private - * @default null - * @since 3.0.0 - */ - this._follow = null; - }, - - /** - * Sets the Camera dead zone. - * - * The deadzone is only used when the camera is following a target. - * - * It defines a rectangular region within which if the target is present, the camera will not scroll. - * If the target moves outside of this area, the camera will begin scrolling in order to follow it. - * - * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point - * of the camera. This allows you to use the object for additional game related checks, such as - * testing if an object is within it or not via a Rectangle.contains call. - * - * The `lerp` values that you can set for a follower target also apply when using a deadzone. - * - * Calling this method with no arguments will reset an active deadzone. - * - * @method Phaser.Cameras.Scene2D.Camera#setDeadzone - * @since 3.11.0 - * - * @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. - */ - setDeadzone: function (width, height) - { - if (width === undefined) - { - this.deadzone = null; - } - else - { - if (this.deadzone) - { - this.deadzone.width = width; - this.deadzone.height = height; - } - else - { - this.deadzone = new Rectangle(0, 0, width, height); - } - - if (this._follow) - { - var originX = this.width / 2; - var originY = this.height / 2; - - var fx = this._follow.x - this.followOffset.x; - var fy = this._follow.y - this.followOffset.y; - - this.midPoint.set(fx, fy); - - this.scrollX = fx - originX; - this.scrollY = fy - originY; - } - - CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y); - } - - return this; - }, - - /** - * Fades the Camera in from the given color over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeIn - * @since 3.3.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeIn: function (duration, red, green, blue, callback, context) - { - return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context); - }, - - /** - * Fades the Camera out to the given color over the duration specified. - * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeOut - * @since 3.3.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeOut: function (duration, red, green, blue, callback, context) - { - return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context); - }, - - /** - * Fades the Camera from the given color to transparent over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fadeFrom - * @since 3.5.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fadeFrom: function (duration, red, green, blue, force, callback, context) - { - return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context); - }, - - /** - * Fades the Camera from transparent to the given color over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#fade - * @since 3.0.0 - * - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - fade: function (duration, red, green, blue, force, callback, context) - { - return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context); - }, - - /** - * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#flash - * @since 3.0.0 - * - * @param {integer} [duration=250] - The duration of the effect in milliseconds. - * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255. - * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255. - * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255. - * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - flash: function (duration, red, green, blue, force, callback, context) - { - return this.flashEffect.start(duration, red, green, blue, force, callback, context); - }, - - /** - * Shakes the Camera by the given intensity over the duration specified. - * - * @method Phaser.Cameras.Scene2D.Camera#shake - * @since 3.0.0 - * - * @param {integer} [duration=100] - The duration of the effect in milliseconds. - * @param {number} [intensity=0.05] - The intensity of the shake. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. - * 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. - */ - shake: function (duration, intensity, force, callback, context) - { - return this.shakeEffect.start(duration, intensity, force, callback, context); - }, - - /** - * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, - * over the duration and with the ease specified. - * - * @method Phaser.Cameras.Scene2D.Camera#pan - * @since 3.11.0 - * - * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to. - * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to. - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {CameraPanCallback} [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} 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 zoom the Camera to the given scale, over the duration and with the ease specified. - * - * @method Phaser.Cameras.Scene2D.Camera#zoomTo - * @since 3.11.0 - * - * @param {number} zoom - The target Camera zoom value. - * @param {integer} [duration=1000] - The duration of the effect in milliseconds. - * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. - * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. - * @param {CameraPanCallback} [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} This Camera instance. - */ - zoomTo: function (zoom, duration, ease, force, callback, context) - { - return this.zoomEffect.start(zoom, duration, ease, force, callback, context); - }, - - /** - * Internal preRender step. - * - * @method Phaser.Cameras.Scene2D.Camera#preRender - * @protected - * @since 3.0.0 - * - * @param {number} baseScale - The base scale, as set in the Camera Manager. - * @param {number} resolution - The game resolution. - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - - var halfWidth = width * 0.5; - var halfHeight = height * 0.5; - - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - - var originX = width * this.originX; - var originY = height * this.originY; - - var follow = this._follow; - var deadzone = this.deadzone; - - var sx = this.scrollX; - var sy = this.scrollY; - - if (deadzone) - { - CenterOn(deadzone, this.midPoint.x, this.midPoint.y); - } - - if (follow) - { - var fx = (follow.x - this.followOffset.x); - var fy = (follow.y - this.followOffset.y); - - if (deadzone) - { - if (fx < deadzone.x) - { - sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x); - } - else if (fx > deadzone.right) - { - sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x); - } - - if (fy < deadzone.y) - { - sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y); - } - else if (fy > deadzone.bottom) - { - sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y); - } - } - else - { - sx = Linear(sx, fx - originX, this.lerp.x); - sy = Linear(sy, fy - originY, this.lerp.y); - } - } - - if (this.useBounds) - { - sx = this.clampX(sx); - sy = this.clampY(sy); - } - - if (this.roundPixels) - { - originX = Math.round(originX); - originY = Math.round(originY); - } - - // Values are in pixels and not impacted by zooming the Camera - this.scrollX = sx; - this.scrollY = sy; - - var midX = sx + halfWidth; - var midY = sy + halfHeight; - - // The center of the camera, in world space, so taking zoom into account - // Basically the pixel value of what it's looking at in the middle of the cam - this.midPoint.set(midX, midY); - - var displayWidth = width / zoom; - var displayHeight = height / zoom; - - this.worldView.setTo( - midX - (displayWidth / 2), - midY - (displayHeight / 2), - displayWidth, - displayHeight - ); - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - - this.shakeEffect.preRender(); - }, - - /** - * Sets the linear interpolation value to use when following a target. - * - * The default values of 1 means the camera will instantly snap to the target coordinates. - * A lower value, such as 0.1 means the camera will more slowly track the target, giving - * a smooth transition. You can set the horizontal and vertical values independently, and also - * adjust this value in real-time during your game. - * - * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. - * - * @method Phaser.Cameras.Scene2D.Camera#setLerp - * @since 3.9.0 - * - * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target. - * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target. - * - * @return {this} This Camera instance. - */ - setLerp: function (x, y) - { - if (x === undefined) { x = 1; } - if (y === undefined) { y = x; } - - this.lerp.set(x, y); - - return this; - }, - - /** - * Sets the horizontal and vertical offset of the camera from its follow target. - * The values are subtracted from the targets position during the Cameras update step. - * - * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset - * @since 3.9.0 - * - * @param {number} [x=0] - The horizontal offset from the camera follow target.x position. - * @param {number} [y=0] - The vertical offset from the camera follow target.y position. - * - * @return {this} This Camera instance. - */ - setFollowOffset: function (x, y) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - - this.followOffset.set(x, y); - - return this; - }, - - /** - * Sets the Camera to follow a Game Object. - * - * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object - * in its center. - * - * You can set the linear interpolation value used in the follow code. - * Use low lerp values (such as 0.1) to automatically smooth the camera motion. - * - * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel - * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to - * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom - * value on the camera. So be sure to keep the camera zoom to integers. - * - * @method Phaser.Cameras.Scene2D.Camera#startFollow - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow. - * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering? - * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. - * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. - * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position. - * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position. - * - * @return {this} This Camera instance. - */ - startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY) - { - if (roundPixels === undefined) { roundPixels = false; } - if (lerpX === undefined) { lerpX = 1; } - if (lerpY === undefined) { lerpY = lerpX; } - if (offsetX === undefined) { offsetX = 0; } - if (offsetY === undefined) { offsetY = offsetX; } - - this._follow = target; - - this.roundPixels = roundPixels; - - lerpX = Clamp(lerpX, 0, 1); - lerpY = Clamp(lerpY, 0, 1); - - this.lerp.set(lerpX, lerpY); - - this.followOffset.set(offsetX, offsetY); - - var originX = this.width / 2; - var originY = this.height / 2; - - var fx = target.x - offsetX; - var fy = target.y - offsetY; - - this.midPoint.set(fx, fy); - - this.scrollX = fx - originX; - this.scrollY = fy - originY; - - return this; - }, - - /** - * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`. - * - * @method Phaser.Cameras.Scene2D.Camera#stopFollow - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - stopFollow: function () - { - this._follow = null; - - return this; - }, - - /** - * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to - * remove the fade. - * - * @method Phaser.Cameras.Scene2D.Camera#resetFX - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - resetFX: function () - { - this.panEffect.reset(); - this.shakeEffect.reset(); - this.flashEffect.reset(); - this.fadeEffect.reset(); - - return this; - }, - - /** - * Internal method called automatically by the Camera Manager. - * - * @method Phaser.Cameras.Scene2D.Camera#update - * @protected - * @since 3.0.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.visible) - { - this.panEffect.update(time, delta); - this.zoomEffect.update(time, delta); - this.shakeEffect.update(time, delta); - this.flashEffect.update(time, delta); - this.fadeEffect.update(time, delta); - } - }, - - /** - * Destroys this Camera instance. You rarely need to call this directly. - * - * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as - * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. - * - * @method Phaser.Cameras.Scene2D.Camera#destroy - * @fires CameraDestroyEvent - * @since 3.0.0 - */ - destroy: function () - { - BaseCamera.prototype.destroy.call(this); - - this.resetFX(); - - this._follow = null; - this.deadzone = null; - } - -}); - -module.exports = Camera; - - /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { @@ -29919,7 +31022,7 @@ var Vertices = {}; module.exports = Vertices; -var Vector = __webpack_require__(107); +var Vector = __webpack_require__(108); var Common = __webpack_require__(42); (function() { @@ -30466,12 +31569,12 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(253); +var Earcut = __webpack_require__(255); var GetFastValue = __webpack_require__(1); -var ModelViewProjection = __webpack_require__(499); -var ShaderSourceFS = __webpack_require__(498); -var ShaderSourceVS = __webpack_require__(497); -var TransformMatrix = __webpack_require__(32); +var ModelViewProjection = __webpack_require__(500); +var ShaderSourceFS = __webpack_require__(499); +var ShaderSourceVS = __webpack_require__(498); +var TransformMatrix = __webpack_require__(27); var Utils = __webpack_require__(21); var WebGLPipeline = __webpack_require__(132); @@ -32261,6 +33364,7 @@ var WebGLPipeline = new Class({ setFloat1: function (name, x) { this.renderer.setFloat1(this.program, name, x); + return this; }, @@ -32278,8 +33382,8 @@ var WebGLPipeline = new Class({ */ setFloat2: function (name, x, y) { - this.renderer.setFloat2(this.program, name, x, y); + return this; }, @@ -32298,8 +33402,8 @@ var WebGLPipeline = new Class({ */ setFloat3: function (name, x, y, z) { - this.renderer.setFloat3(this.program, name, x, y, z); + return this; }, @@ -32319,8 +33423,8 @@ var WebGLPipeline = new Class({ */ setFloat4: function (name, x, y, z, w) { - this.renderer.setFloat4(this.program, name, x, y, z, w); + return this; }, @@ -32338,6 +33442,7 @@ var WebGLPipeline = new Class({ setInt1: function (name, x) { this.renderer.setInt1(this.program, name, x); + return this; }, @@ -32356,6 +33461,7 @@ var WebGLPipeline = new Class({ setInt2: function (name, x, y) { this.renderer.setInt2(this.program, name, x, y); + return this; }, @@ -32375,6 +33481,7 @@ var WebGLPipeline = new Class({ setInt3: function (name, x, y, z) { this.renderer.setInt3(this.program, name, x, y, z); + return this; }, @@ -32395,6 +33502,7 @@ var WebGLPipeline = new Class({ setInt4: function (name, x, y, z, w) { this.renderer.setInt4(this.program, name, x, y, z, w); + return this; }, @@ -32414,6 +33522,7 @@ var WebGLPipeline = new Class({ setMatrix2: function (name, transpose, matrix) { this.renderer.setMatrix2(this.program, name, transpose, matrix); + return this; }, @@ -32434,6 +33543,7 @@ var WebGLPipeline = new Class({ setMatrix3: function (name, transpose, matrix) { this.renderer.setMatrix3(this.program, name, transpose, matrix); + return this; }, @@ -32452,6 +33562,7 @@ var WebGLPipeline = new Class({ setMatrix4: function (name, transpose, matrix) { this.renderer.setMatrix4(this.program, name, transpose, matrix); + return this; } @@ -32602,10 +33713,10 @@ module.exports = Smoothing(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HexStringToColor = __webpack_require__(288); -var IntegerToColor = __webpack_require__(286); -var ObjectToColor = __webpack_require__(284); -var RGBStringToColor = __webpack_require__(283); +var HexStringToColor = __webpack_require__(289); +var IntegerToColor = __webpack_require__(287); +var ObjectToColor = __webpack_require__(285); +var RGBStringToColor = __webpack_require__(284); /** * Converts the given source color value into an instance of a Color class. @@ -32775,7 +33886,7 @@ module.exports = Random; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); var Point = __webpack_require__(5); /** @@ -33385,7 +34496,7 @@ module.exports = TileToWorldX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var IsInLayerBounds = __webpack_require__(106); +var IsInLayerBounds = __webpack_require__(107); /** * Gets a tile at the given tile coordinates from the given layer. @@ -33448,47 +34559,47 @@ module.exports = GetTileAt; module.exports = { - CalculateFacesAt: __webpack_require__(226), + CalculateFacesAt: __webpack_require__(228), CalculateFacesWithin: __webpack_require__(41), - Copy: __webpack_require__(674), - CreateFromTiles: __webpack_require__(673), - CullTiles: __webpack_require__(672), - Fill: __webpack_require__(671), - FilterTiles: __webpack_require__(670), - FindByIndex: __webpack_require__(669), - FindTile: __webpack_require__(668), - ForEachTile: __webpack_require__(667), + Copy: __webpack_require__(679), + CreateFromTiles: __webpack_require__(678), + CullTiles: __webpack_require__(677), + Fill: __webpack_require__(676), + FilterTiles: __webpack_require__(675), + FindByIndex: __webpack_require__(674), + FindTile: __webpack_require__(673), + ForEachTile: __webpack_require__(672), GetTileAt: __webpack_require__(142), - GetTileAtWorldXY: __webpack_require__(666), - GetTilesWithin: __webpack_require__(23), - GetTilesWithinShape: __webpack_require__(665), - GetTilesWithinWorldXY: __webpack_require__(664), + GetTileAtWorldXY: __webpack_require__(671), + GetTilesWithin: __webpack_require__(24), + GetTilesWithinShape: __webpack_require__(670), + GetTilesWithinWorldXY: __webpack_require__(669), HasTileAt: __webpack_require__(325), - HasTileAtWorldXY: __webpack_require__(663), - IsInLayerBounds: __webpack_require__(106), - PutTileAt: __webpack_require__(225), - PutTileAtWorldXY: __webpack_require__(662), - PutTilesAt: __webpack_require__(661), - Randomize: __webpack_require__(660), + HasTileAtWorldXY: __webpack_require__(668), + IsInLayerBounds: __webpack_require__(107), + PutTileAt: __webpack_require__(227), + PutTileAtWorldXY: __webpack_require__(667), + PutTilesAt: __webpack_require__(666), + Randomize: __webpack_require__(665), RemoveTileAt: __webpack_require__(324), - RemoveTileAtWorldXY: __webpack_require__(659), - RenderDebug: __webpack_require__(658), + RemoveTileAtWorldXY: __webpack_require__(664), + RenderDebug: __webpack_require__(663), ReplaceByIndex: __webpack_require__(326), - SetCollision: __webpack_require__(657), - SetCollisionBetween: __webpack_require__(656), - SetCollisionByExclusion: __webpack_require__(655), - SetCollisionByProperty: __webpack_require__(654), - SetCollisionFromCollisionGroup: __webpack_require__(653), - SetTileIndexCallback: __webpack_require__(652), - SetTileLocationCallback: __webpack_require__(651), - Shuffle: __webpack_require__(650), - SwapByIndex: __webpack_require__(649), + SetCollision: __webpack_require__(662), + SetCollisionBetween: __webpack_require__(661), + SetCollisionByExclusion: __webpack_require__(660), + SetCollisionByProperty: __webpack_require__(659), + SetCollisionFromCollisionGroup: __webpack_require__(658), + SetTileIndexCallback: __webpack_require__(657), + SetTileLocationCallback: __webpack_require__(656), + Shuffle: __webpack_require__(655), + SwapByIndex: __webpack_require__(654), TileToWorldX: __webpack_require__(141), - TileToWorldXY: __webpack_require__(648), + TileToWorldXY: __webpack_require__(653), TileToWorldY: __webpack_require__(140), - WeightedRandomize: __webpack_require__(647), + WeightedRandomize: __webpack_require__(652), WorldToTileX: __webpack_require__(54), - WorldToTileXY: __webpack_require__(646), + WorldToTileXY: __webpack_require__(651), WorldToTileY: __webpack_require__(53) }; @@ -33616,7 +34727,7 @@ var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(262); +var ParseXML = __webpack_require__(263); /** * @typedef {object} Phaser.Loader.FileTypes.XMLFileConfig @@ -33925,9 +35036,9 @@ module.exports = LineToLine; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); -var MeshRender = __webpack_require__(868); +var MeshRender = __webpack_require__(873); /** * @classdesc @@ -34097,11 +35208,11 @@ module.exports = Mesh; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); -var GetBitmapTextSize = __webpack_require__(922); -var ParseFromAtlas = __webpack_require__(921); -var Render = __webpack_require__(920); +var GetBitmapTextSize = __webpack_require__(927); +var ParseFromAtlas = __webpack_require__(926); +var Render = __webpack_require__(925); /** * The font data for an individual character of a Bitmap Font. @@ -34777,7 +35888,7 @@ module.exports = { CountAllMatching: __webpack_require__(465), Each: __webpack_require__(464), EachInRange: __webpack_require__(463), - FindClosestInSorted: __webpack_require__(215), + FindClosestInSorted: __webpack_require__(217), GetAll: __webpack_require__(462), GetFirst: __webpack_require__(461), GetRandom: __webpack_require__(150), @@ -34786,19 +35897,19 @@ module.exports = { MoveUp: __webpack_require__(458), NumberArray: __webpack_require__(457), NumberArrayStep: __webpack_require__(456), - QuickSelect: __webpack_require__(187), - Range: __webpack_require__(248), - Remove: __webpack_require__(202), + QuickSelect: __webpack_require__(188), + Range: __webpack_require__(250), + Remove: __webpack_require__(203), RemoveAt: __webpack_require__(455), RemoveBetween: __webpack_require__(454), RemoveRandomElement: __webpack_require__(453), Replace: __webpack_require__(452), RotateLeft: __webpack_require__(293), RotateRight: __webpack_require__(292), - SafeRange: __webpack_require__(29), + SafeRange: __webpack_require__(30), SendToBack: __webpack_require__(451), SetAll: __webpack_require__(450), - Shuffle: __webpack_require__(96), + Shuffle: __webpack_require__(97), SpliceOne: __webpack_require__(56), StableSort: __webpack_require__(83), Swap: __webpack_require__(449) @@ -34818,7 +35929,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(500); +var ShaderSourceFS = __webpack_require__(501); var TextureTintPipeline = __webpack_require__(131); var LIGHT_COUNT = 10; @@ -35405,6 +36516,35 @@ module.exports = ForwardDiffuseLightPipeline; /* 153 */ /***/ (function(module, exports) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * Attempts to remove the element from its parentNode in the DOM. + * + * @function Phaser.DOM.RemoveFromDOM + * @since 3.0.0 + * + * @param {HTMLElement} element - The DOM element to remove from its parent node. + */ +var RemoveFromDOM = function (element) +{ + if (element.parentNode) + { + element.parentNode.removeChild(element); + } +}; + +module.exports = RemoveFromDOM; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -35431,7 +36571,7 @@ module.exports = Between; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35461,7 +36601,7 @@ module.exports = RadToDeg; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36006,7 +37146,7 @@ module.exports = Vector4; /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36019,7 +37159,7 @@ var Class = __webpack_require__(0); var GameObject = __webpack_require__(15); var Sprite = __webpack_require__(35); var Vector2 = __webpack_require__(4); -var Vector4 = __webpack_require__(155); +var Vector4 = __webpack_require__(156); /** * @classdesc @@ -36272,7 +37412,7 @@ module.exports = Sprite3D; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -36309,7 +37449,7 @@ module.exports = CenterOn; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -36339,7 +37479,7 @@ module.exports = GetColor; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -36386,7 +37526,7 @@ module.exports = SmoothStep; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36442,7 +37582,7 @@ module.exports = Random; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36480,7 +37620,7 @@ module.exports = Random; /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36520,7 +37660,7 @@ module.exports = Random; /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36585,7 +37725,7 @@ module.exports = GetPoints; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36629,7 +37769,7 @@ module.exports = Random; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36639,13 +37779,13 @@ module.exports = Random; */ var BlendModes = __webpack_require__(52); -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); /** * @classdesc @@ -36932,7 +38072,7 @@ module.exports = Zone; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37801,7 +38941,7 @@ module.exports = Timeline; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37811,15 +38951,15 @@ module.exports = Timeline; */ var Clone = __webpack_require__(34); -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); -var GetTargets = __webpack_require__(103); -var GetTweens = __webpack_require__(169); +var GetTargets = __webpack_require__(104); +var GetTweens = __webpack_require__(170); var GetValue = __webpack_require__(3); -var Timeline = __webpack_require__(166); +var Timeline = __webpack_require__(167); var TweenBuilder = __webpack_require__(72); /** @@ -37953,7 +39093,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37962,15 +39102,15 @@ module.exports = TimelineBuilder; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(101); +var Defaults = __webpack_require__(102); var GetAdvancedValue = __webpack_require__(12); var GetBoolean = __webpack_require__(63); var GetEaseFunction = __webpack_require__(64); var GetNewValue = __webpack_require__(73); var GetValue = __webpack_require__(3); -var GetValueOp = __webpack_require__(102); -var Tween = __webpack_require__(100); -var TweenData = __webpack_require__(99); +var GetValueOp = __webpack_require__(103); +var Tween = __webpack_require__(101); +var TweenData = __webpack_require__(100); /** * [description] @@ -38081,7 +39221,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38127,7 +39267,7 @@ module.exports = GetTweens; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38185,7 +39325,7 @@ module.exports = GetProps; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38502,7 +39642,7 @@ module.exports = TimerEvent; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38683,7 +39823,7 @@ module.exports = BasePlugin; /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38705,8 +39845,8 @@ var Vertices = __webpack_require__(129); var Common = __webpack_require__(42); var Body = __webpack_require__(74); var Bounds = __webpack_require__(128); -var Vector = __webpack_require__(107); -var decomp = __webpack_require__(1025); +var Vector = __webpack_require__(108); +var decomp = __webpack_require__(1030); (function() { @@ -39020,7 +40160,7 @@ var decomp = __webpack_require__(1025); /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39032,7 +40172,7 @@ var decomp = __webpack_require__(1025); var Class = __webpack_require__(0); var File = __webpack_require__(19); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(109); +var GetURL = __webpack_require__(110); var IsPlainObject = __webpack_require__(7); /** @@ -39216,7 +40356,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39226,11 +40366,11 @@ module.exports = HTML5AudioFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(174); +var HTML5AudioFile = __webpack_require__(175); var IsPlainObject = __webpack_require__(7); /** @@ -39496,7 +40636,7 @@ module.exports = AudioFile; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39505,7 +40645,7 @@ module.exports = AudioFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MergeXHRSettings = __webpack_require__(108); +var MergeXHRSettings = __webpack_require__(109); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -39564,7 +40704,7 @@ module.exports = XHRLoader; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39869,7 +41009,7 @@ module.exports = KeyCombo; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40103,7 +41243,7 @@ module.exports = Key; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40112,8 +41252,8 @@ module.exports = Key; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Axis = __webpack_require__(181); -var Button = __webpack_require__(180); +var Axis = __webpack_require__(182); +var Button = __webpack_require__(181); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var Vector2 = __webpack_require__(4); @@ -40861,7 +42001,7 @@ module.exports = Gamepad; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41002,7 +42142,7 @@ module.exports = Button; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41127,7 +42267,7 @@ module.exports = Axis; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -41223,7 +42363,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41232,8 +42372,8 @@ module.exports = CreateInteractiveObject; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(116); -var SetTransform = __webpack_require__(118); +var Commands = __webpack_require__(117); +var SetTransform = __webpack_require__(119); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -41469,7 +42609,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -41501,7 +42641,7 @@ module.exports = Circumference; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41510,8 +42650,8 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(184); -var CircumferencePoint = __webpack_require__(114); +var Circumference = __webpack_require__(185); +var CircumferencePoint = __webpack_require__(115); var FromPercent = __webpack_require__(65); var MATH_CONST = __webpack_require__(16); @@ -41555,7 +42695,7 @@ module.exports = GetPoints; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41564,7 +42704,7 @@ module.exports = GetPoints; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CircumferencePoint = __webpack_require__(114); +var CircumferencePoint = __webpack_require__(115); var FromPercent = __webpack_require__(65); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -41598,7 +42738,7 @@ module.exports = GetPoint; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -41716,7 +42856,7 @@ module.exports = QuickSelect; /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -41762,7 +42902,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41790,7 +42930,7 @@ module.exports = { /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41799,7 +42939,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); var IsSizePowerOfTwo = __webpack_require__(84); var ScaleModes = __webpack_require__(60); @@ -42064,7 +43204,7 @@ module.exports = TextureSource; /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42073,16 +43213,16 @@ module.exports = TextureSource; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var CanvasTexture = __webpack_require__(487); var Class = __webpack_require__(0); -var Color = __webpack_require__(30); -var CONST = __webpack_require__(22); +var Color = __webpack_require__(31); +var CONST = __webpack_require__(23); var EventEmitter = __webpack_require__(8); -var GenerateTexture = __webpack_require__(268); +var GenerateTexture = __webpack_require__(269); var GetValue = __webpack_require__(3); -var Parser = __webpack_require__(189); -var Texture = __webpack_require__(120); +var Parser = __webpack_require__(190); +var Texture = __webpack_require__(121); /** * @callback EachTextureCallback @@ -42297,6 +43437,8 @@ var TextureManager = new Class({ * * @param {string} key - The unique string-based key of the Texture. * @param {*} data - The Base64 encoded data. + * + * @return {this} This Texture Manager instance. */ addBase64: function (key, data) { @@ -42324,6 +43466,8 @@ var TextureManager = new Class({ image.src = data; } + + return this; }, /** @@ -43171,7 +44315,7 @@ module.exports = TextureManager; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44138,7 +45282,7 @@ module.exports = WebAudioSound; /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44150,7 +45294,7 @@ module.exports = WebAudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); -var WebAudioSound = __webpack_require__(192); +var WebAudioSound = __webpack_require__(193); /** * @classdesc @@ -44465,7 +45609,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44592,7 +45736,7 @@ module.exports = NoAudioSound; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44605,7 +45749,7 @@ module.exports = NoAudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); -var NoAudioSound = __webpack_require__(194); +var NoAudioSound = __webpack_require__(195); var NOOP = __webpack_require__(2); /** @@ -44710,7 +45854,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45692,7 +46836,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 197 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45704,7 +46848,7 @@ module.exports = HTML5AudioSound; var BaseSoundManager = __webpack_require__(79); var Class = __webpack_require__(0); -var HTML5AudioSound = __webpack_require__(196); +var HTML5AudioSound = __webpack_require__(197); /** * HTML5 Audio implementation of the Sound Manager. @@ -46159,7 +47303,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 198 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46169,9 +47313,9 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(197); -var NoAudioSoundManager = __webpack_require__(195); -var WebAudioSoundManager = __webpack_require__(193); +var HTML5AudioSoundManager = __webpack_require__(198); +var NoAudioSoundManager = __webpack_require__(196); +var WebAudioSoundManager = __webpack_require__(194); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -46209,7 +47353,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 199 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46220,7 +47364,7 @@ module.exports = SoundManagerCreator; var CONST = __webpack_require__(80); var GetValue = __webpack_require__(3); -var Merge = __webpack_require__(95); +var Merge = __webpack_require__(96); var InjectionMap = __webpack_require__(488); /** @@ -46341,7 +47485,7 @@ module.exports = Settings; /***/ }), -/* 200 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46351,7 +47495,7 @@ module.exports = Settings; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(121); +var Systems = __webpack_require__(122); /** * @classdesc @@ -46620,7 +47764,7 @@ module.exports = Scene; /***/ }), -/* 201 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46633,8 +47777,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(80); var GetValue = __webpack_require__(3); var NOOP = __webpack_require__(2); -var Scene = __webpack_require__(200); -var Systems = __webpack_require__(121); +var Scene = __webpack_require__(201); +var Systems = __webpack_require__(122); /** * @classdesc @@ -48192,7 +49336,7 @@ module.exports = SceneManager; /***/ }), -/* 202 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48283,7 +49427,7 @@ module.exports = Remove; /***/ }), -/* 203 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48295,11 +49439,11 @@ module.exports = Remove; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var FileTypesManager = __webpack_require__(6); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); var GetFastValue = __webpack_require__(1); var PluginCache = __webpack_require__(10); -var Remove = __webpack_require__(202); +var Remove = __webpack_require__(203); /** * @typedef {object} GlobalPlugin @@ -48529,6 +49673,10 @@ var PluginManager = new Class({ scene[map[pluginKey]] = sys[pluginKey]; } } + else if (pluginKey === 'game' && map.hasOwnProperty(pluginKey)) + { + scene[map[pluginKey]] = game; + } } for (var s = 0; s < scenePlugins.length; s++) @@ -49134,7 +50282,7 @@ module.exports = PluginManager; /***/ }), -/* 204 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49375,7 +50523,7 @@ module.exports = TouchManager; /***/ }), -/* 205 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49385,7 +50533,7 @@ module.exports = TouchManager; */ var Class = __webpack_require__(0); -var SmoothStepInterpolation = __webpack_require__(252); +var SmoothStepInterpolation = __webpack_require__(254); var Vector2 = __webpack_require__(4); @@ -50158,7 +51306,7 @@ module.exports = Pointer; /***/ }), -/* 206 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50168,7 +51316,7 @@ module.exports = Pointer; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(122); +var Features = __webpack_require__(123); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md @@ -50513,7 +51661,7 @@ module.exports = MouseManager; /***/ }), -/* 207 */ +/* 208 */ /***/ (function(module, exports) { /** @@ -50593,7 +51741,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 208 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50603,14 +51751,14 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(207); +var CONST = __webpack_require__(208); var EventEmitter = __webpack_require__(8); -var Mouse = __webpack_require__(206); -var Pointer = __webpack_require__(205); +var Mouse = __webpack_require__(207); +var Pointer = __webpack_require__(206); var Rectangle = __webpack_require__(11); -var Touch = __webpack_require__(204); -var TransformMatrix = __webpack_require__(32); -var TransformXY = __webpack_require__(251); +var Touch = __webpack_require__(205); +var TransformMatrix = __webpack_require__(27); +var TransformXY = __webpack_require__(253); /** * @classdesc @@ -51980,7 +53128,7 @@ module.exports = InputManager; /***/ }), -/* 209 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51989,7 +53137,7 @@ module.exports = InputManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Determines the canvas features of the browser running this Phaser Game instance. @@ -52094,7 +53242,7 @@ module.exports = init(); /***/ }), -/* 210 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52109,17 +53257,17 @@ module.exports = init(); module.exports = { - Fade: __webpack_require__(572), - Flash: __webpack_require__(571), - Pan: __webpack_require__(570), - Shake: __webpack_require__(537), - Zoom: __webpack_require__(536) + Fade: __webpack_require__(577), + Flash: __webpack_require__(576), + Pan: __webpack_require__(575), + Shake: __webpack_require__(542), + Zoom: __webpack_require__(541) }; /***/ }), -/* 211 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52128,7 +53276,824 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BaseCache = __webpack_require__(212); +var BaseCamera = __webpack_require__(88); +var CanvasPool = __webpack_require__(22); +var CenterOn = __webpack_require__(158); +var Clamp = __webpack_require__(20); +var Class = __webpack_require__(0); +var Components = __webpack_require__(13); +var Effects = __webpack_require__(211); +var Linear = __webpack_require__(125); +var Rectangle = __webpack_require__(11); +var Vector2 = __webpack_require__(4); + +/** + * @classdesc + * A Camera. + * + * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, + * and can be positioned, rotated, zoomed and scrolled accordingly. + * + * A Camera consists of two elements: The viewport and the scroll values. + * + * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are + * created the same size as your game, but their position and size can be set to anything. This means if you + * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, + * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). + * + * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this + * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the + * viewport, and changing the viewport has no impact on the scrolling. + * + * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, + * allowing you to filter Game Objects out on a per-Camera basis. + * + * A Camera also has built-in special effects including Fade, Flash and Camera Shake. + * + * @class Camera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.0.0 + * + * @extends Phaser.Cameras.Scene2D.BaseCamera + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.Tint + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var Camera = new Class({ + + Extends: BaseCamera, + + Mixins: [ + Components.Flip, + Components.Tint + ], + + initialize: + + function Camera (x, y, width, height) + { + BaseCamera.call(this, x, y, width, height); + + /** + * Does this Camera allow the Game Objects it renders to receive input events? + * + * @name Phaser.Cameras.Scene2D.Camera#inputEnabled + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.inputEnabled = true; + + /** + * The Camera Fade effect handler. + * To fade this camera see the `Camera.fade` methods. + * + * @name Phaser.Cameras.Scene2D.Camera#fadeEffect + * @type {Phaser.Cameras.Scene2D.Effects.Fade} + * @since 3.5.0 + */ + this.fadeEffect = new Effects.Fade(this); + + /** + * The Camera Flash effect handler. + * To flash this camera see the `Camera.flash` method. + * + * @name Phaser.Cameras.Scene2D.Camera#flashEffect + * @type {Phaser.Cameras.Scene2D.Effects.Flash} + * @since 3.5.0 + */ + this.flashEffect = new Effects.Flash(this); + + /** + * The Camera Shake effect handler. + * To shake this camera see the `Camera.shake` method. + * + * @name Phaser.Cameras.Scene2D.Camera#shakeEffect + * @type {Phaser.Cameras.Scene2D.Effects.Shake} + * @since 3.5.0 + */ + this.shakeEffect = new Effects.Shake(this); + + /** + * The Camera Pan effect handler. + * To pan this camera see the `Camera.pan` method. + * + * @name Phaser.Cameras.Scene2D.Camera#panEffect + * @type {Phaser.Cameras.Scene2D.Effects.Pan} + * @since 3.11.0 + */ + this.panEffect = new Effects.Pan(this); + + /** + * The Camera Zoom effect handler. + * To zoom this camera see the `Camera.zoom` method. + * + * @name Phaser.Cameras.Scene2D.Camera#zoomEffect + * @type {Phaser.Cameras.Scene2D.Effects.Zoom} + * @since 3.11.0 + */ + this.zoomEffect = new Effects.Zoom(this); + + /** + * The linear interpolation value to use when following a target. + * + * Can also be set via `setLerp` or as part of the `startFollow` call. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + * + * @name Phaser.Cameras.Scene2D.Camera#lerp + * @type {Phaser.Math.Vector2} + * @since 3.9.0 + */ + this.lerp = new Vector2(1, 1); + + /** + * The values stored in this property are subtracted from the Camera targets position, allowing you to + * offset the camera from the actual target x/y coordinates by this amount. + * Can also be set via `setFollowOffset` or as part of the `startFollow` call. + * + * @name Phaser.Cameras.Scene2D.Camera#followOffset + * @type {Phaser.Math.Vector2} + * @since 3.9.0 + */ + this.followOffset = new Vector2(); + + /** + * The Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * You can directly set this property to be an instance of a Rectangle. Or, you can use the + * `setDeadzone` method for a chainable approach. + * + * The rectangle you provide can have its dimensions adjusted dynamically, however, please + * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point. + * + * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property + * to `null`. + * + * @name Phaser.Cameras.Scene2D.Camera#deadzone + * @type {?Phaser.Geom.Rectangle} + * @since 3.11.0 + */ + this.deadzone = null; + + /** + * Internal follow target reference. + * + * @name Phaser.Cameras.Scene2D.Camera#_follow + * @type {?any} + * @private + * @default null + * @since 3.0.0 + */ + this._follow = null; + + this.renderToTexture = false; + + /** + * The HTML Canvas Element that the Render Texture is drawing to. + * This is only populated if Phaser is running with the Canvas Renderer. + * + * @name Phaser.GameObjects.RenderTexture#canvas + * @type {HTMLCanvasElement} + * @since 3.12.0 + */ + this.canvas = null; + + /** + * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to. + * + * @name Phaser.GameObjects.RenderTexture#context + * @type {CanvasRenderingContext2D} + * @since 3.12.0 + */ + this.context = null; + + /** + * A reference to the GL Frame Buffer this Render Texture is drawing to. + * This is only set if Phaser is running with the WebGL Renderer. + * + * @name Phaser.GameObjects.RenderTexture#framebuffer + * @type {?WebGLFramebuffer} + * @since 3.12.0 + */ + this.glTexture = null; + + /** + * A reference to the GL Frame Buffer this Render Texture is drawing to. + * This is only set if Phaser is running with the WebGL Renderer. + * + * @name Phaser.GameObjects.RenderTexture#framebuffer + * @type {?WebGLFramebuffer} + * @since 3.12.0 + */ + this.framebuffer = null; + + this.pipeline = null; + + // this.flipX = false; + // this.flipY = false; + // this.tintFill = 0; + // this._isTinted = false; + // this._tintTL = 0xffffff; + // this._tintTR = 0xffffff; + // this._tintBL = 0xffffff; + // this._tintBR = 0xffffff; + // this._alphaTL = 1; + // this._alphaTR = 1; + // this._alphaBL = 1; + // this._alphaBR = 1; + }, + + setRenderToTexture: function (pipeline) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer.gl) + { + this.glTexture = renderer.createTextureFromSource(null, this.width, this.height, 0); + this.framebuffer = renderer.createFramebuffer(this.width, this.height, this.glTexture, false); + } + else + { + this.canvas = CanvasPool.create2D(this, this.width, this.height); + this.context = this.canvas.getContext('2d'); + } + + this.renderToTexture = true; + + if (pipeline) + { + this.pipeline = pipeline; + } + + return this; + }, + + /** + * Sets the Camera dead zone. + * + * The deadzone is only used when the camera is following a target. + * + * It defines a rectangular region within which if the target is present, the camera will not scroll. + * If the target moves outside of this area, the camera will begin scrolling in order to follow it. + * + * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point + * of the camera. This allows you to use the object for additional game related checks, such as + * testing if an object is within it or not via a Rectangle.contains call. + * + * The `lerp` values that you can set for a follower target also apply when using a deadzone. + * + * Calling this method with no arguments will reset an active deadzone. + * + * @method Phaser.Cameras.Scene2D.Camera#setDeadzone + * @since 3.11.0 + * + * @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. + */ + setDeadzone: function (width, height) + { + if (width === undefined) + { + this.deadzone = null; + } + else + { + if (this.deadzone) + { + this.deadzone.width = width; + this.deadzone.height = height; + } + else + { + this.deadzone = new Rectangle(0, 0, width, height); + } + + if (this._follow) + { + var originX = this.width / 2; + var originY = this.height / 2; + + var fx = this._follow.x - this.followOffset.x; + var fy = this._follow.y - this.followOffset.y; + + this.midPoint.set(fx, fy); + + this.scrollX = fx - originX; + this.scrollY = fy - originY; + } + + CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y); + } + + return this; + }, + + /** + * Fades the Camera in from the given color over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeIn + * @since 3.3.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeIn: function (duration, red, green, blue, callback, context) + { + return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context); + }, + + /** + * Fades the Camera out to the given color over the duration specified. + * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeOut + * @since 3.3.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeOut: function (duration, red, green, blue, callback, context) + { + return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context); + }, + + /** + * Fades the Camera from the given color to transparent over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fadeFrom + * @since 3.5.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fadeFrom: function (duration, red, green, blue, force, callback, context) + { + return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context); + }, + + /** + * Fades the Camera from transparent to the given color over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#fade + * @since 3.0.0 + * + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + fade: function (duration, red, green, blue, force, callback, context) + { + return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context); + }, + + /** + * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#flash + * @since 3.0.0 + * + * @param {integer} [duration=250] - The duration of the effect in milliseconds. + * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255. + * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255. + * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255. + * @param {boolean} [force=false] - Force the effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + flash: function (duration, red, green, blue, force, callback, context) + { + return this.flashEffect.start(duration, red, green, blue, force, callback, context); + }, + + /** + * Shakes the Camera by the given intensity over the duration specified. + * + * @method Phaser.Cameras.Scene2D.Camera#shake + * @since 3.0.0 + * + * @param {integer} [duration=100] - The duration of the effect in milliseconds. + * @param {number} [intensity=0.05] - The intensity of the shake. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect. + * 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. + */ + shake: function (duration, intensity, force, callback, context) + { + return this.shakeEffect.start(duration, intensity, force, callback, context); + }, + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given destination, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#pan + * @since 3.11.0 + * + * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to. + * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {CameraPanCallback} [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} 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 zoom the Camera to the given scale, over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#zoomTo + * @since 3.11.0 + * + * @param {number} zoom - The target Camera zoom value. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running. + * @param {CameraPanCallback} [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} This Camera instance. + */ + zoomTo: function (zoom, duration, ease, force, callback, context) + { + return this.zoomEffect.start(zoom, duration, ease, force, callback, context); + }, + + /** + * Internal preRender step. + * + * @method Phaser.Cameras.Scene2D.Camera#preRender + * @protected + * @since 3.0.0 + * + * @param {number} baseScale - The base scale, as set in the Camera Manager. + * @param {number} resolution - The game resolution. + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + + var halfWidth = width * 0.5; + var halfHeight = height * 0.5; + + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + + var originX = width * this.originX; + var originY = height * this.originY; + + var follow = this._follow; + var deadzone = this.deadzone; + + var sx = this.scrollX; + var sy = this.scrollY; + + if (deadzone) + { + CenterOn(deadzone, this.midPoint.x, this.midPoint.y); + } + + if (follow) + { + var fx = (follow.x - this.followOffset.x); + var fy = (follow.y - this.followOffset.y); + + if (deadzone) + { + if (fx < deadzone.x) + { + sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x); + } + else if (fx > deadzone.right) + { + sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x); + } + + if (fy < deadzone.y) + { + sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y); + } + else if (fy > deadzone.bottom) + { + sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y); + } + } + else + { + sx = Linear(sx, fx - originX, this.lerp.x); + sy = Linear(sy, fy - originY, this.lerp.y); + } + } + + if (this.useBounds) + { + sx = this.clampX(sx); + sy = this.clampY(sy); + } + + if (this.roundPixels) + { + originX = Math.round(originX); + originY = Math.round(originY); + } + + // Values are in pixels and not impacted by zooming the Camera + this.scrollX = sx; + this.scrollY = sy; + + var midX = sx + halfWidth; + var midY = sy + halfHeight; + + // The center of the camera, in world space, so taking zoom into account + // Basically the pixel value of what it's looking at in the middle of the cam + this.midPoint.set(midX, midY); + + var displayWidth = width / zoom; + var displayHeight = height / zoom; + + this.worldView.setTo( + midX - (displayWidth / 2), + midY - (displayHeight / 2), + displayWidth, + displayHeight + ); + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + + this.shakeEffect.preRender(); + }, + + /** + * Sets the linear interpolation value to use when following a target. + * + * The default values of 1 means the camera will instantly snap to the target coordinates. + * A lower value, such as 0.1 means the camera will more slowly track the target, giving + * a smooth transition. You can set the horizontal and vertical values independently, and also + * adjust this value in real-time during your game. + * + * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis. + * + * @method Phaser.Cameras.Scene2D.Camera#setLerp + * @since 3.9.0 + * + * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target. + * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target. + * + * @return {this} This Camera instance. + */ + setLerp: function (x, y) + { + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } + + this.lerp.set(x, y); + + return this; + }, + + /** + * Sets the horizontal and vertical offset of the camera from its follow target. + * The values are subtracted from the targets position during the Cameras update step. + * + * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset + * @since 3.9.0 + * + * @param {number} [x=0] - The horizontal offset from the camera follow target.x position. + * @param {number} [y=0] - The vertical offset from the camera follow target.y position. + * + * @return {this} This Camera instance. + */ + setFollowOffset: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.followOffset.set(x, y); + + return this; + }, + + /** + * Sets the Camera to follow a Game Object. + * + * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object + * in its center. + * + * You can set the linear interpolation value used in the follow code. + * Use low lerp values (such as 0.1) to automatically smooth the camera motion. + * + * If you find you're getting a slight "jitter" effect when following an object it's probably to do with sub-pixel + * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to + * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom + * value on the camera. So be sure to keep the camera zoom to integers. + * + * @method Phaser.Cameras.Scene2D.Camera#startFollow + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow. + * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering? + * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. + * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. + * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position. + * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position. + * + * @return {this} This Camera instance. + */ + startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY) + { + if (roundPixels === undefined) { roundPixels = false; } + if (lerpX === undefined) { lerpX = 1; } + if (lerpY === undefined) { lerpY = lerpX; } + if (offsetX === undefined) { offsetX = 0; } + if (offsetY === undefined) { offsetY = offsetX; } + + this._follow = target; + + this.roundPixels = roundPixels; + + lerpX = Clamp(lerpX, 0, 1); + lerpY = Clamp(lerpY, 0, 1); + + this.lerp.set(lerpX, lerpY); + + this.followOffset.set(offsetX, offsetY); + + var originX = this.width / 2; + var originY = this.height / 2; + + var fx = target.x - offsetX; + var fy = target.y - offsetY; + + this.midPoint.set(fx, fy); + + this.scrollX = fx - originX; + this.scrollY = fy - originY; + + return this; + }, + + /** + * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`. + * + * @method Phaser.Cameras.Scene2D.Camera#stopFollow + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + stopFollow: function () + { + this._follow = null; + + return this; + }, + + /** + * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to + * remove the fade. + * + * @method Phaser.Cameras.Scene2D.Camera#resetFX + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + resetFX: function () + { + this.panEffect.reset(); + this.shakeEffect.reset(); + this.flashEffect.reset(); + this.fadeEffect.reset(); + + return this; + }, + + /** + * Internal method called automatically by the Camera Manager. + * + * @method Phaser.Cameras.Scene2D.Camera#update + * @protected + * @since 3.0.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.visible) + { + this.panEffect.update(time, delta); + this.zoomEffect.update(time, delta); + this.shakeEffect.update(time, delta); + this.flashEffect.update(time, delta); + this.fadeEffect.update(time, delta); + } + }, + + /** + * Destroys this Camera instance. You rarely need to call this directly. + * + * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as + * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. + * + * @method Phaser.Cameras.Scene2D.Camera#destroy + * @fires CameraDestroyEvent + * @since 3.0.0 + */ + destroy: function () + { + BaseCamera.prototype.destroy.call(this); + + this.resetFX(); + + this._follow = null; + this.deadzone = null; + } + +}); + +module.exports = Camera; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BaseCache = __webpack_require__(214); var Class = __webpack_require__(0); /** @@ -52342,7 +54307,7 @@ module.exports = CacheManager; /***/ }), -/* 212 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52536,7 +54501,7 @@ module.exports = BaseCache; /***/ }), -/* 213 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52545,7 +54510,7 @@ module.exports = BaseCache; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Animation = __webpack_require__(216); +var Animation = __webpack_require__(218); var Class = __webpack_require__(0); var CustomMap = __webpack_require__(127); var EventEmitter = __webpack_require__(8); @@ -53163,7 +55128,7 @@ module.exports = AnimationManager; /***/ }), -/* 214 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53346,7 +55311,7 @@ module.exports = AnimationFrame; /***/ }), -/* 215 */ +/* 217 */ /***/ (function(module, exports) { /** @@ -53427,7 +55392,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 216 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53438,8 +55403,8 @@ module.exports = FindClosestInSorted; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var FindClosestInSorted = __webpack_require__(215); -var Frame = __webpack_require__(214); +var FindClosestInSorted = __webpack_require__(217); +var Frame = __webpack_require__(216); var GetValue = __webpack_require__(3); /** @@ -54357,7 +56322,7 @@ module.exports = Animation; /***/ }), -/* 217 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54389,7 +56354,7 @@ module.exports = WrapDegrees; /***/ }), -/* 218 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54421,7 +56386,7 @@ module.exports = Wrap; /***/ }), -/* 219 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54579,7 +56544,7 @@ module.exports = GeometryMask; /***/ }), -/* 220 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54822,7 +56787,7 @@ module.exports = BitmapMask; /***/ }), -/* 221 */ +/* 223 */ /***/ (function(module, exports) { var g; @@ -54848,7 +56813,7 @@ module.exports = g; /***/ }), -/* 222 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54857,8 +56822,8 @@ module.exports = g; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var MapData = __webpack_require__(104); +var Formats = __webpack_require__(28); +var MapData = __webpack_require__(105); var Parse = __webpack_require__(323); var Tilemap = __webpack_require__(315); @@ -54934,7 +56899,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 223 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54943,9 +56908,9 @@ module.exports = ParseToTilemap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var LayerData = __webpack_require__(105); -var MapData = __webpack_require__(104); +var Formats = __webpack_require__(28); +var LayerData = __webpack_require__(106); +var MapData = __webpack_require__(105); var Tile = __webpack_require__(66); /** @@ -55026,7 +56991,7 @@ module.exports = Parse2DArray; /***/ }), -/* 224 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -55065,7 +57030,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 225 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55075,8 +57040,8 @@ module.exports = SetLayerCollisionIndex; */ var Tile = __webpack_require__(66); -var IsInLayerBounds = __webpack_require__(106); -var CalculateFacesAt = __webpack_require__(226); +var IsInLayerBounds = __webpack_require__(107); +var CalculateFacesAt = __webpack_require__(228); var SetTileCollision = __webpack_require__(67); /** @@ -55145,7 +57110,7 @@ module.exports = PutTileAt; /***/ }), -/* 226 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55221,7 +57186,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 227 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55911,7 +57876,7 @@ var Body = __webpack_require__(74); /***/ }), -/* 228 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55920,7 +57885,7 @@ var Body = __webpack_require__(74); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(187); +var quickselect = __webpack_require__(188); /** * @classdesc @@ -56519,7 +58484,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 229 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56735,7 +58700,7 @@ module.exports = ProcessQueue; /***/ }), -/* 230 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56919,7 +58884,7 @@ module.exports = TextFile; /***/ }), -/* 231 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -56973,7 +58938,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 232 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57066,7 +59031,7 @@ module.exports = GetPoints; /***/ }), -/* 233 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57154,7 +59119,7 @@ module.exports = GetPoint; /***/ }), -/* 234 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -57182,7 +59147,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports) { /** @@ -57231,7 +59196,7 @@ module.exports = Contains; /***/ }), -/* 236 */ +/* 238 */ /***/ (function(module, exports) { /** @@ -57279,7 +59244,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 237 */ +/* 239 */ /***/ (function(module, exports) { /** @@ -57365,7 +59330,7 @@ module.exports = ContainsArray; /***/ }), -/* 238 */ +/* 240 */ /***/ (function(module, exports) { /** @@ -57399,7 +59364,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 239 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58060,7 +60025,7 @@ module.exports = Quad; /***/ }), -/* 240 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58069,13 +60034,13 @@ module.exports = Quad; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); var GameObject = __webpack_require__(15); var GetPowerOfTwo = __webpack_require__(414); -var TileSpriteRender = __webpack_require__(893); +var TileSpriteRender = __webpack_require__(898); var Vector2 = __webpack_require__(4); // bitmask flag for GameObject.renderMask @@ -58696,7 +60661,7 @@ module.exports = TileSprite; /***/ }), -/* 241 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58705,14 +60670,14 @@ module.exports = TileSprite; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(289); -var CanvasPool = __webpack_require__(24); +var Camera = __webpack_require__(88); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); -var Frame = __webpack_require__(94); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); +var Frame = __webpack_require__(95); var GameObject = __webpack_require__(15); -var Render = __webpack_require__(899); +var Render = __webpack_require__(904); var UUID = __webpack_require__(421); /** @@ -59533,7 +61498,6 @@ var RenderTexture = new Class({ if (this.gl) { - this.renderer.deleteTexture(this.texture); this.renderer.deleteFramebuffer(this.framebuffer); } @@ -59546,7 +61510,7 @@ module.exports = RenderTexture; /***/ }), -/* 242 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59556,12 +61520,12 @@ module.exports = RenderTexture; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var GravityWell = __webpack_require__(429); -var List = __webpack_require__(93); +var List = __webpack_require__(94); var ParticleEmitter = __webpack_require__(427); -var Render = __webpack_require__(903); +var Render = __webpack_require__(908); /** * @classdesc @@ -59997,7 +61961,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 243 */ +/* 245 */ /***/ (function(module, exports) { /** @@ -60026,7 +61990,7 @@ module.exports = FloatBetween; /***/ }), -/* 244 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60035,11 +61999,11 @@ module.exports = FloatBetween; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); Ellipse.Area = __webpack_require__(443); -Ellipse.Circumference = __webpack_require__(184); -Ellipse.CircumferencePoint = __webpack_require__(114); +Ellipse.Circumference = __webpack_require__(185); +Ellipse.CircumferencePoint = __webpack_require__(115); Ellipse.Clone = __webpack_require__(442); Ellipse.Contains = __webpack_require__(55); Ellipse.ContainsPoint = __webpack_require__(441); @@ -60047,8 +62011,8 @@ Ellipse.ContainsRect = __webpack_require__(440); Ellipse.CopyFrom = __webpack_require__(439); Ellipse.Equals = __webpack_require__(438); Ellipse.GetBounds = __webpack_require__(437); -Ellipse.GetPoint = __webpack_require__(186); -Ellipse.GetPoints = __webpack_require__(185); +Ellipse.GetPoint = __webpack_require__(187); +Ellipse.GetPoints = __webpack_require__(186); Ellipse.Offset = __webpack_require__(436); Ellipse.OffsetPoint = __webpack_require__(435); Ellipse.Random = __webpack_require__(136); @@ -60057,7 +62021,7 @@ module.exports = Ellipse; /***/ }), -/* 245 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60068,7 +62032,7 @@ module.exports = Ellipse; var BitmapText = __webpack_require__(149); var Class = __webpack_require__(0); -var Render = __webpack_require__(908); +var Render = __webpack_require__(913); /** * @typedef {object} DisplayCallbackConfig @@ -60286,7 +62250,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 246 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60298,10 +62262,10 @@ module.exports = DynamicBitmapText; var ArrayUtils = __webpack_require__(151); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var GameObject = __webpack_require__(15); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(913); +var Render = __webpack_require__(918); var Union = __webpack_require__(446); var Vector2 = __webpack_require__(4); @@ -61525,7 +63489,7 @@ module.exports = Container; /***/ }), -/* 247 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61534,13 +63498,13 @@ module.exports = Container; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(917); -var Bob = __webpack_require__(914); +var BlitterRender = __webpack_require__(922); +var Bob = __webpack_require__(919); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var Frame = __webpack_require__(94); +var Components = __webpack_require__(13); +var Frame = __webpack_require__(95); var GameObject = __webpack_require__(15); -var List = __webpack_require__(93); +var List = __webpack_require__(94); /** * @callback Phaser.GameObjects.Blitter.CreateCallback @@ -61826,7 +63790,7 @@ module.exports = Blitter; /***/ }), -/* 248 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61836,7 +63800,7 @@ module.exports = Blitter; */ var GetValue = __webpack_require__(3); -var Shuffle = __webpack_require__(96); +var Shuffle = __webpack_require__(97); var BuildChunk = function (a, b, qty) { @@ -61966,7 +63930,7 @@ module.exports = Range; /***/ }), -/* 249 */ +/* 251 */ /***/ (function(module, exports) { /** @@ -61995,7 +63959,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 250 */ +/* 252 */ /***/ (function(module, exports) { /** @@ -62032,7 +63996,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 251 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62098,7 +64062,7 @@ module.exports = TransformXY; /***/ }), -/* 252 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62107,7 +64071,7 @@ module.exports = TransformXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SmoothStep = __webpack_require__(159); +var SmoothStep = __webpack_require__(160); /** * A Smooth Step interpolation method. @@ -62131,7 +64095,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 253 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62806,7 +64770,7 @@ earcut.flatten = function (data) { }; /***/ }), -/* 254 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62817,8 +64781,8 @@ earcut.flatten = function (data) { */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(502); -var ShaderSourceVS = __webpack_require__(501); +var ShaderSourceFS = __webpack_require__(503); +var ShaderSourceVS = __webpack_require__(502); var WebGLPipeline = __webpack_require__(132); /** @@ -63033,7 +64997,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 255 */ +/* 257 */ /***/ (function(module, exports) { /** @@ -63102,7 +65066,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 256 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63112,15 +65076,17 @@ module.exports = WebGLSnapshot; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var BaseCamera = __webpack_require__(88); var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var IsSizePowerOfTwo = __webpack_require__(84); var SpliceOne = __webpack_require__(56); +var TransformMatrix = __webpack_require__(27); var Utils = __webpack_require__(21); -var WebGLSnapshot = __webpack_require__(255); +var WebGLSnapshot = __webpack_require__(257); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(254); +var BitmapMaskPipeline = __webpack_require__(256); var ForwardDiffuseLightPipeline = __webpack_require__(152); var TextureTintPipeline = __webpack_require__(131); @@ -63522,6 +65488,48 @@ var WebGLRenderer = new Class({ */ this.blankTexture = null; + this.defaultCamera = new BaseCamera(0, 0, 0, 0); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix1 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix1 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix2 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix2 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix3 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix3 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix4 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.12.0 + */ + this._tempMatrix4 = new TransformMatrix(); + this.init(this.config); }, @@ -63692,6 +65700,8 @@ var WebGLRenderer = new Class({ this.drawingBufferHeight = gl.drawingBufferHeight; + this.defaultCamera.setSize(width, height); + return this; }, @@ -64589,14 +66599,36 @@ var WebGLRenderer = new Class({ this.pushScissor(cx, cy, cw, ch); - if (camera.backgroundColor.alphaGL > 0) - { - var color = camera.backgroundColor; - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var color = camera.backgroundColor; + + if (camera.renderToTexture) + { + this.setFramebuffer(camera.framebuffer); + + var gl = this.gl; + + gl.clearColor(0, 0, 0, 0); + + gl.clear(gl.COLOR_BUFFER_BIT); + + TextureTintPipeline.projOrtho(0, camera.width, 0, camera.height, -1000, 1000); + + if (color.alphaGL > 0) + { + TextureTintPipeline.drawFillRect( + cx, cy, cw, ch, + Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), + color.alphaGL + ); + } + } + else if (color.alphaGL > 0) + { TextureTintPipeline.drawFillRect( cx, cy, cw, ch, - Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1.0), + Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL ); } @@ -64621,6 +66653,44 @@ var WebGLRenderer = new Class({ camera.dirty = false; this.popScissor(); + + if (camera.renderToTexture) + { + TextureTintPipeline.flush(); + + this.setFramebuffer(null); + + TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + + var getTint = Utils.getTintAppendFloatAlpha; + + var p = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + + p.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); + } }, /** @@ -65153,7 +67223,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 257 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65163,7 +67233,7 @@ module.exports = WebGLRenderer; */ var modes = __webpack_require__(52); -var CanvasFeatures = __webpack_require__(209); +var CanvasFeatures = __webpack_require__(210); /** * [description] @@ -65204,7 +67274,7 @@ module.exports = GetBlendModes; /***/ }), -/* 258 */ +/* 260 */ /***/ (function(module, exports) { /** @@ -65243,7 +67313,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 259 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65253,13 +67323,13 @@ module.exports = CanvasSnapshot; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasSnapshot = __webpack_require__(258); +var CanvasSnapshot = __webpack_require__(260); var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); -var GetBlendModes = __webpack_require__(257); +var CONST = __webpack_require__(23); +var GetBlendModes = __webpack_require__(259); var ScaleModes = __webpack_require__(60); var Smoothing = __webpack_require__(133); -var TransformMatrix = __webpack_require__(32); +var TransformMatrix = __webpack_require__(27); /** * @classdesc @@ -65385,6 +67455,9 @@ var CanvasRenderer = new Class({ */ this.blendModes = GetBlendModes(); + // image-rendering: optimizeSpeed; + // image-rendering: pixelated; + /** * [description] * @@ -65894,7 +67967,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 260 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66091,36 +68164,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 261 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Attempts to remove the element from its parentNode in the DOM. - * - * @function Phaser.DOM.RemoveFromDOM - * @since 3.0.0 - * - * @param {HTMLElement} element - The DOM element to remove from its parent node. - */ -var RemoveFromDOM = function (element) -{ - if (element.parentNode) - { - element.parentNode.removeChild(element); - } -}; - -module.exports = RemoveFromDOM; - - -/***/ }), -/* 262 */ +/* 263 */ /***/ (function(module, exports) { /** @@ -66177,7 +68221,7 @@ module.exports = ParseXML; /***/ }), -/* 263 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66240,7 +68284,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 264 */ +/* 265 */ /***/ (function(module, exports) { /** @@ -66303,7 +68347,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 265 */ +/* 266 */ /***/ (function(module, exports) { /** @@ -66340,7 +68384,7 @@ module.exports = CatmullRom; /***/ }), -/* 266 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66425,7 +68469,7 @@ module.exports = FromPoints; /***/ }), -/* 267 */ +/* 268 */ /***/ (function(module, exports) { /** @@ -66463,7 +68507,7 @@ module.exports = { /***/ }), -/* 268 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66472,8 +68516,8 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Arne16 = __webpack_require__(267); -var CanvasPool = __webpack_require__(24); +var Arne16 = __webpack_require__(268); +var CanvasPool = __webpack_require__(22); var GetValue = __webpack_require__(3); /** @@ -66578,7 +68622,7 @@ module.exports = GenerateTexture; /***/ }), -/* 269 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67982,7 +70026,7 @@ module.exports = Matrix4; /***/ }), -/* 270 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67992,15 +70036,15 @@ module.exports = Matrix4; */ var Class = __webpack_require__(0); -var Matrix4 = __webpack_require__(269); -var RandomXYZ = __webpack_require__(534); -var RandomXYZW = __webpack_require__(533); -var RotateVec3 = __webpack_require__(532); +var Matrix4 = __webpack_require__(270); +var RandomXYZ = __webpack_require__(539); +var RandomXYZW = __webpack_require__(538); +var RotateVec3 = __webpack_require__(537); var Set = __webpack_require__(70); -var Sprite3D = __webpack_require__(156); +var Sprite3D = __webpack_require__(157); var Vector2 = __webpack_require__(4); var Vector3 = __webpack_require__(87); -var Vector4 = __webpack_require__(155); +var Vector4 = __webpack_require__(156); // Local cache vars var tmpVec3 = new Vector3(); @@ -69057,7 +71101,7 @@ module.exports = Camera; /***/ }), -/* 271 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69070,11 +71114,11 @@ module.exports = Camera; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(538); +module.exports = __webpack_require__(543); /***/ }), -/* 272 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69089,32 +71133,9 @@ module.exports = __webpack_require__(538); module.exports = { - In: __webpack_require__(541), - Out: __webpack_require__(540), - InOut: __webpack_require__(539) - -}; - - -/***/ }), -/* 273 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quintic - */ - -module.exports = { - - In: __webpack_require__(544), - Out: __webpack_require__(543), - InOut: __webpack_require__(542) + In: __webpack_require__(546), + Out: __webpack_require__(545), + InOut: __webpack_require__(544) }; @@ -69130,14 +71151,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Quintic */ module.exports = { - In: __webpack_require__(547), - Out: __webpack_require__(546), - InOut: __webpack_require__(545) + In: __webpack_require__(549), + Out: __webpack_require__(548), + InOut: __webpack_require__(547) }; @@ -69153,14 +71174,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quadratic + * @namespace Phaser.Math.Easing.Quartic */ module.exports = { - In: __webpack_require__(550), - Out: __webpack_require__(549), - InOut: __webpack_require__(548) + In: __webpack_require__(552), + Out: __webpack_require__(551), + InOut: __webpack_require__(550) }; @@ -69176,16 +71197,39 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Linear + * @namespace Phaser.Math.Easing.Quadratic */ -module.exports = __webpack_require__(551); +module.exports = { + + In: __webpack_require__(555), + Out: __webpack_require__(554), + InOut: __webpack_require__(553) + +}; /***/ }), /* 277 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Linear + */ + +module.exports = __webpack_require__(556); + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -69198,32 +71242,9 @@ module.exports = __webpack_require__(551); module.exports = { - In: __webpack_require__(554), - Out: __webpack_require__(553), - InOut: __webpack_require__(552) - -}; - - -/***/ }), -/* 278 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Elastic - */ - -module.exports = { - - In: __webpack_require__(557), - Out: __webpack_require__(556), - InOut: __webpack_require__(555) + In: __webpack_require__(559), + Out: __webpack_require__(558), + InOut: __webpack_require__(557) }; @@ -69239,14 +71260,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { - In: __webpack_require__(560), - Out: __webpack_require__(559), - InOut: __webpack_require__(558) + In: __webpack_require__(562), + Out: __webpack_require__(561), + InOut: __webpack_require__(560) }; @@ -69262,14 +71283,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Circular + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { - In: __webpack_require__(563), - Out: __webpack_require__(562), - InOut: __webpack_require__(561) + In: __webpack_require__(565), + Out: __webpack_require__(564), + InOut: __webpack_require__(563) }; @@ -69285,14 +71306,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Bounce + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(566), - Out: __webpack_require__(565), - InOut: __webpack_require__(564) + In: __webpack_require__(568), + Out: __webpack_require__(567), + InOut: __webpack_require__(566) }; @@ -69308,14 +71329,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Back + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(569), - Out: __webpack_require__(568), - InOut: __webpack_require__(567) + In: __webpack_require__(571), + Out: __webpack_require__(570), + InOut: __webpack_require__(569) }; @@ -69330,7 +71351,30 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(574), + Out: __webpack_require__(573), + InOut: __webpack_require__(572) + +}; + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Color = __webpack_require__(31); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -69367,7 +71411,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 284 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69376,7 +71420,7 @@ module.exports = RGBStringToColor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -69397,7 +71441,7 @@ module.exports = ObjectToColor; /***/ }), -/* 285 */ +/* 286 */ /***/ (function(module, exports) { /** @@ -69445,7 +71489,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 286 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69454,8 +71498,8 @@ module.exports = IntegerToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); -var IntegerToRGB = __webpack_require__(285); +var Color = __webpack_require__(31); +var IntegerToRGB = __webpack_require__(286); /** * Converts the given color value into an instance of a Color object. @@ -69478,7 +71522,7 @@ module.exports = IntegerToColor; /***/ }), -/* 287 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -69509,7 +71553,7 @@ module.exports = GetColor32; /***/ }), -/* 288 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69518,7 +71562,7 @@ module.exports = GetColor32; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); /** * Converts a hex string into a Phaser Color object. @@ -69561,1787 +71605,6 @@ var HexStringToColor = function (hex) module.exports = HexStringToColor; -/***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); -var EventEmitter = __webpack_require__(8); -var Rectangle = __webpack_require__(11); -var TransformMatrix = __webpack_require__(32); -var ValueToColor = __webpack_require__(134); -var Vector2 = __webpack_require__(4); - -/** - * @typedef {object} JSONCameraBounds - * @property {number} x - The horizontal position of camera - * @property {number} y - The vertical position of camera - * @property {number} width - The width size of camera - * @property {number} height - The height size of camera - */ - -/** - * @typedef {object} JSONCamera - * - * @property {string} name - The name of the camera - * @property {number} x - The horizontal position of camera - * @property {number} y - The vertical position of camera - * @property {number} width - The width size of camera - * @property {number} height - The height size of camera - * @property {number} zoom - The zoom of camera - * @property {number} rotation - The rotation of camera - * @property {boolean} roundPixels - The round pixels st status of camera - * @property {number} scrollX - The horizontal scroll of camera - * @property {number} scrollY - The vertical scroll of camera - * @property {string} backgroundColor - The background color of camera - * @property {(JSONCameraBounds|undefined)} [bounds] - The bounds of camera - */ - -/** - * @classdesc - * A Base Camera class. - * - * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world, - * and can be positioned, rotated, zoomed and scrolled accordingly. - * - * A Camera consists of two elements: The viewport and the scroll values. - * - * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are - * created the same size as your game, but their position and size can be set to anything. This means if you - * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game, - * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`). - * - * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this - * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the - * viewport, and changing the viewport has no impact on the scrolling. - * - * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method, - * allowing you to filter Game Objects out on a per-Camera basis. - * - * The Base Camera is extended by the Camera class, which adds in special effects including Fade, - * Flash and Camera Shake, as well as the ability to follow Game Objects. - * - * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow - * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate - * to when they were added to the Camera class. - * - * @class BaseCamera - * @extends Phaser.Events.EventEmitter - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.12.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var BaseCamera = new Class({ - - Extends: EventEmitter, - - initialize: - - function BaseCamera (x, y, width, height) - { - EventEmitter.call(this); - - /** - * A reference to the Scene this camera belongs to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene; - - /** - * A reference to the Game Scene Manager. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager - * @type {Phaser.Scenes.SceneManager} - * @since 3.12.0 - */ - this.sceneManager; - - /** - * A reference to the Game Config. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#config - * @type {object} - * @readOnly - * @since 3.12.0 - */ - this.config; - - /** - * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion. - * This value is a bitmask. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#id - * @type {integer} - * @readOnly - * @since 3.11.0 - */ - this.id = 0; - - /** - * The name of the Camera. This is left empty for your own use. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The resolution of the Game, used in most Camera calculations. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#resolution - * @type {number} - * @readOnly - * @since 3.12.0 - */ - this.resolution = 1; - - /** - * Should this camera round its pixel values to integers? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.roundPixels = false; - - /** - * Is this Camera visible or not? - * - * A visible camera will render and perform input tests. - * An invisible camera will not render anything and will skip input tests. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#visible - * @type {boolean} - * @default true - * @since 3.10.0 - */ - this.visible = true; - - /** - * Is this Camera using a bounds to restrict scrolling movement? - * - * Set this property along with the bounds via `Camera.setBounds`. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.useBounds = false; - - /** - * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at. - * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step. - * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly. - * You can use it for culling or intersection checks. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#worldView - * @type {Phaser.Geom.Rectangle} - * @readOnly - * @since 3.11.0 - */ - this.worldView = new Rectangle(); - - /** - * Is this Camera dirty? - * - * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame. - * - * This flag is cleared during the `postRenderCamera` method of the renderer. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#dirty - * @type {boolean} - * @default true - * @since 3.11.0 - */ - this.dirty = true; - - /** - * The x position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollX` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#x - * @type {number} - * @private - * @since 3.0.0 - */ - this._x = x; - - /** - * The y position of the Camera, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollY` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#y - * @type {number} - * @private - * @since 3.0.0 - */ - this._y = y; - - /** - * Internal Camera X value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cx - * @type {number} - * @private - * @since 3.12.0 - */ - this._cx = 0; - - /** - * Internal Camera Y value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cy - * @type {number} - * @private - * @since 3.12.0 - */ - this._cy = 0; - - /** - * Internal Camera Width value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_cw - * @type {number} - * @private - * @since 3.12.0 - */ - this._cw = 0; - - /** - * Internal Camera Height value multiplied by the resolution. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_ch - * @type {number} - * @private - * @since 3.12.0 - */ - this._ch = 0; - - /** - * The width of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_width - * @type {number} - * @private - * @since 3.11.0 - */ - this._width = width; - - /** - * The height of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_height - * @type {number} - * @private - * @since 3.11.0 - */ - this._height = height; - - /** - * The bounds the camera is restrained to during scrolling. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); - - /** - * The horizontal scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._scrollX = 0; - - /** - * The vertical scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._scrollY = 0; - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * - * A value of 0.5 would zoom the Camera out, so you can now see twice as much - * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel - * now takes up 2 pixels when rendered. - * - * Set to 1 to return to the default zoom level. - * - * Be careful to never set this value to zero. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom - * @type {number} - * @private - * @default 1 - * @since 3.11.0 - */ - this._zoom = 1; - - /** - * The rotation of the Camera in radians. - * - * 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. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - this._rotation = 0; - - /** - * A local transform matrix used for internal calculations. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#matrix - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @private - * @since 3.0.0 - */ - this.matrix = new TransformMatrix(); - - /** - * Does this Camera have a transparent background? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#transparent - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.transparent = true; - - /** - * The background color of this Camera. Only used if `transparent` is `false`. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor - * @type {Phaser.Display.Color} - * @since 3.0.0 - */ - this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); - - /** - * The Camera alpha value. Setting this property impacts every single object that this Camera - * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out, - * or via the chainable `setAlpha` method instead. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#alpha - * @type {number} - * @default 1 - * @since 3.11.0 - */ - this.alpha = 1; - - /** - * Should the camera cull Game Objects before checking them for input hit tests? - * In some special cases it may be beneficial to disable this. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.disableCull = false; - - /** - * A temporary array of culled objects. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects - * @type {Phaser.GameObjects.GameObject[]} - * @default [] - * @private - * @since 3.0.0 - */ - this.culledObjects = []; - - /** - * The mid-point of the Camera in 'world' coordinates. - * - * Use it to obtain exactly where in the world the center of the camera is currently looking. - * - * This value is updated in the preRender method, after the scroll values and follower - * have been processed. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint - * @type {Phaser.Math.Vector2} - * @readOnly - * @since 3.11.0 - */ - this.midPoint = new Vector2(width / 2, height / 2); - - /** - * The horizontal origin of rotation for this Camera. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * See `setOrigin` to set both origins in a single, chainable call. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#originX - * @type {number} - * @default 0.5 - * @since 3.11.0 - */ - this.originX = 0.5; - - /** - * The vertical origin of rotation for this Camera. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * See `setOrigin` to set both origins in a single, chainable call. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#originY - * @type {number} - * @default 0.5 - * @since 3.11.0 - */ - this.originY = 0.5; - - /** - * Does this Camera have a custom viewport? - * - * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport - * @type {boolean} - * @private - * @default false - * @since 3.12.0 - */ - this._customViewport = false; - }, - - /** - * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders. - * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha - * @since 3.11.0 - * - * @param {number} [value=1] - The Camera alpha value. - * - * @return {this} This Camera instance. - */ - setAlpha: function (value) - { - if (value === undefined) { value = 1; } - - this.alpha = value; - - return this; - }, - - /** - * Sets the rotation origin of this Camera. - * - * The values are given in the range 0 to 1 and are only used when calculating Camera rotation. - * - * By default the camera rotates around the center of the viewport. - * - * Changing the origin allows you to adjust the point in the viewport from which rotation happens. - * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin - * @since 3.11.0 - * - * @param {number} [x=0.5] - The horizontal origin value. - * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. - * - * @return {this} This Camera instance. - */ - setOrigin: function (x, y) - { - if (x === undefined) { x = 0.5; } - if (y === undefined) { y = x; } - - this.originX = x; - this.originY = y; - - return this; - }, - - /** - * Calculates what the Camera.scrollX and scrollY values would need to be in order to move - * the Camera so it is centered on the given x and y coordinates, without actually moving - * the Camera there. The results are clamped based on the Camera bounds, if set. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll - * @since 3.11.0 - * - * @param {number} x - The horizontal coordinate to center on. - * @param {number} y - The vertical coordinate to center on. - * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created. - * - * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` abd `y` properties. - */ - getScroll: function (x, y, out) - { - if (out === undefined) { out = new Vector2(); } - - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - out.x = x - originX; - out.y = y - originY; - - if (this.useBounds) - { - out.x = this.clampX(out.x); - out.y = this.clampY(out.y); - } - - return out; - }, - - /** - * Moves the Camera so that it is centered on the given coordinates, bounds allowing. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn - * @since 3.11.0 - * - * @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. - */ - centerOn: function (x, y) - { - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - this.midPoint.set(x, y); - - this.scrollX = x - originX; - this.scrollY = y - originY; - - if (this.useBounds) - { - this.scrollX = this.clampX(this.scrollX); - this.scrollY = this.clampY(this.scrollY); - } - - return this; - }, - - /** - * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - centerToBounds: function () - { - if (this.useBounds) - { - var bounds = this._bounds; - var originX = this.width * 0.5; - var originY = this.height * 0.5; - - this.midPoint.set(bounds.centerX, bounds.centerY); - - this.scrollX = bounds.centerX - originX; - this.scrollY = bounds.centerY - originY; - } - - return this; - }, - - /** - * Moves the Camera so that it is re-centered based on its viewport size. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - centerToSize: function () - { - this.scrollX = this.width * 0.5; - this.scrollY = this.height * 0.5; - - return this; - }, - - /** - * Takes an array of Game Objects and returns a new array featuring only those objects - * visible by this camera. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#cull - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return] - * - * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull. - * - * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera. - */ - cull: function (renderableObjects) - { - if (this.disableCull) - { - return renderableObjects; - } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return renderableObjects; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var culledObjects = this.culledObjects; - var length = renderableObjects.length; - - determinant = 1 / determinant; - - culledObjects.length = 0; - - for (var index = 0; index < length; ++index) - { - var object = renderableObjects[index]; - - if (!object.hasOwnProperty('width') || object.parentContainer) - { - culledObjects.push(object); - continue; - } - - var objectW = object.width; - var objectH = object.height; - var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); - var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); - var tx = (objectX * mva + objectY * mvc + mve); - var ty = (objectX * mvb + objectY * mvd + mvf); - var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); - var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); - var cullW = cameraW + objectW; - var cullH = cameraH + objectH; - - if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && - tw > -objectW && th > -objectH && tw < cullW && th < cullH) - { - culledObjects.push(object); - } - } - - return culledObjects; - }, - - /** - * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform. - * You can optionally provide a Vector2, or similar object, to store the results in. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {number} x - The x position to convert to world space. - * @param {number} y - The y position to convert to world space. - * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created. - * - * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties. - */ - getWorldPoint: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - output.x = x; - output.y = y; - - return output; - } - - determinant = 1 / determinant; - - var ima = mvd * determinant; - var imb = -mvb * determinant; - var imc = -mvc * determinant; - var imd = mva * determinant; - var ime = (mvc * mvf - mvd * mve) * determinant; - var imf = (mvb * mve - mva * mvf) * determinant; - - var c = Math.cos(this.rotation); - var s = Math.sin(this.rotation); - - var zoom = this.zoom; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - - var res = this.resolution; - - var sx = x * res + ((scrollX * c - scrollY * s) * zoom); - var sy = y * res + ((scrollX * s + scrollY * c) * zoom); - - /* Apply transform to point */ - output.x = (sx * ima + sy * imc + ime); - output.y = (sx * imb + sy * imd + imf); - - return output; - }, - - /** - * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings - * so that they are ignored by this Camera. This means they will not be rendered by this Camera. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#ignore - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObject - The Game Object, or array of Game Objects, to be ignored by this Camera. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - ignore: function (gameObject) - { - var id = this.id; - - if (Array.isArray(gameObject)) - { - for (var i = 0; i < gameObject.length; i++) - { - gameObject[i].cameraFilter |= id; - } - } - else - { - gameObject.cameraFilter |= id; - } - - return this; - }, - - /** - * Internal preRender step. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#preRender - * @protected - * @since 3.0.0 - * - * @param {number} baseScale - The base scale, as set in the Camera Manager. - * @param {number} resolution - The game resolution. - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - - var halfWidth = width * 0.5; - var halfHeight = height * 0.5; - - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - - var originX = width * this.originX; - var originY = height * this.originY; - - var sx = this.scrollX; - var sy = this.scrollY; - - if (this.useBounds) - { - sx = this.clampX(sx); - sy = this.clampY(sy); - } - - if (this.roundPixels) - { - originX = Math.round(originX); - originY = Math.round(originY); - } - - // Values are in pixels and not impacted by zooming the Camera - this.scrollX = sx; - this.scrollY = sy; - - var midX = sx + halfWidth; - var midY = sy + halfHeight; - - // The center of the camera, in world space, so taking zoom into account - // Basically the pixel value of what it's looking at in the middle of the cam - this.midPoint.set(midX, midY); - - var displayWidth = width / zoom; - var displayHeight = height / zoom; - - this.worldView.setTo( - midX - (displayWidth / 2), - midY - (displayHeight / 2), - displayWidth, - displayHeight - ); - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - }, - - /** - * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required. - * Do not call this method if you are not using camera bounds. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#clampX - * @since 3.11.0 - * - * @param {number} x - The value to horizontally scroll clamp. - * - * @return {number} The adjusted value to use as scrollX. - */ - clampX: function (x) - { - var bounds = this._bounds; - - var dw = this.displayWidth; - - var bx = bounds.x + ((dw - this.width) / 2); - var bw = Math.max(bx, bx + bounds.width - dw); - - if (x < bx) - { - x = bx; - } - else if (x > bw) - { - x = bw; - } - - return x; - }, - - /** - * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. - * Do not call this method if you are not using camera bounds. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#clampY - * @since 3.11.0 - * - * @param {number} y - The value to vertically scroll clamp. - * - * @return {number} The adjusted value to use as scrollY. - */ - clampY: function (y) - { - var bounds = this._bounds; - - var dh = this.displayHeight; - - var by = bounds.y + ((dh - this.height) / 2); - var bh = Math.max(by, by + bounds.height - dh); - - if (y < by) - { - y = by; - } - else if (y > bh) - { - y = bh; - } - - return y; - }, - - /* - var gap = this._zoomInversed; - return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap); - */ - - /** - * If this Camera has previously had movement bounds set on it, this will remove them. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - removeBounds: function () - { - this.useBounds = false; - - this.dirty = true; - - this._bounds.setEmpty(); - - return this; - }, - - /** - * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * - * Rotating a camera does not rotate the viewport itself, it is applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle - * @since 3.0.0 - * - * @param {number} [value=0] - The cameras angle of rotation, given in degrees. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setAngle: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = DegToRad(value); - - return this; - }, - - /** - * Sets the background color for this Camera. - * - * By default a Camera has a transparent background but it can be given a solid color, with any level - * of transparency, via this method. - * - * The color value can be specified using CSS color notation, hex or numbers. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor - * @since 3.0.0 - * - * @param {(string|number|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. - */ - setBackgroundColor: function (color) - { - if (color === undefined) { color = 'rgba(0,0,0,0)'; } - - this.backgroundColor = ValueToColor(color); - - this.transparent = (this.backgroundColor.alpha === 0); - - return this; - }, - - /** - * Set the bounds of the Camera. The bounds are an axis-aligned rectangle. - * - * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the - * edges and into blank space. It does not limit the placement of Game Objects, or where - * the Camera viewport can be positioned. - * - * Temporarily disable the bounds by changing the boolean `Camera.useBounds`. - * - * Clear the bounds entirely by calling `Camera.removeBounds`. - * - * If you set bounds that are smaller than the viewport it will stop the Camera from being - * able to scroll. The bounds can be positioned where-ever you wish. By default they are from - * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of - * the Camera bounds. However, you can position them anywhere. So if you wanted a game world - * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y - * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find - * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds - * @since 3.0.0 - * - * @param {integer} x - The top-left x coordinate of the bounds. - * @param {integer} y - The top-left y coordinate of the bounds. - * @param {integer} width - The width of the bounds, in pixels. - * @param {integer} height - The height of the bounds, in pixels. - * @param {boolean} [centerOn] - If `true` the Camera will automatically be centered on the new bounds. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setBounds: function (x, y, width, height, centerOn) - { - this._bounds.setTo(x, y, width, height); - - this.dirty = true; - this.useBounds = true; - - if (centerOn) - { - this.centerToBounds(); - } - else - { - this.scrollX = this.clampX(this.scrollX); - this.scrollY = this.clampY(this.scrollY); - } - - return this; - }, - - /** - * Sets the name of this Camera. - * This value is for your own use and isn't used internally. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setName - * @since 3.0.0 - * - * @param {string} [value=''] - The name of the Camera. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setName: function (value) - { - if (value === undefined) { value = ''; } - - this.name = value; - - return this; - }, - - /** - * Set the position of the Camera viewport within the game. - * - * This does not change where the camera is 'looking'. See `setScroll` to control that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition - * @since 3.0.0 - * - * @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. - */ - setPosition: function (x, y) - { - if (y === undefined) { y = x; } - - this.x = x; - this.y = y; - - return this; - }, - - /** - * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * - * Rotating a camera does not rotate the viewport itself, it is applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation - * @since 3.0.0 - * - * @param {number} [value=0] - The rotation of the Camera, in radians. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setRotation: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = value; - - return this; - }, - - /** - * Should the Camera round pixel values to whole integers when rendering Game Objects? - * - * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels - * @since 3.0.0 - * - * @param {boolean} value - `true` to round Camera pixels, `false` to not. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setRoundPixels: function (value) - { - this.roundPixels = value; - - return this; - }, - - /** - * Sets the Scene the Camera is bound to. - * - * Also populates the `resolution` property and updates the internal size values. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setScene - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene the camera is bound to. - * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. - */ - setScene: function (scene) - { - this.scene = scene; - - this.config = scene.sys.game.config; - this.sceneManager = scene.sys.game.scene; - - var res = this.config.resolution; - - this.resolution = res; - - this._cx = this._x * res; - this._cy = this._y * res; - this._cw = this._width * res; - this._ch = this._height * res; - - return this; - }, - - /** - * Set the position of where the Camera is looking within the game. - * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. - * Use this method, or the scroll properties, to move your camera around the game world. - * - * This does not change where the camera viewport is placed. See `setPosition` to control that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll - * @since 3.0.0 - * - * @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. - */ - setScroll: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollX = x; - this.scrollY = y; - - return this; - }, - - /** - * Set the size of the Camera viewport. - * - * By default a Camera is the same size as the game, but can be made smaller via this method, - * allowing you to create mini-cam style effects by creating and positioning a smaller Camera - * viewport within your game. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setSize - * @since 3.0.0 - * - * @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. - */ - setSize: function (width, height) - { - if (height === undefined) { height = width; } - - this.width = width; - this.height = height; - - return this; - }, - - /** - * This method sets the position and size of the Camera viewport in a single call. - * - * If you're trying to change where the Camera is looking at in your game, then see - * the method `Camera.setScroll` instead. This method is for changing the viewport - * itself, not what the camera can see. - * - * By default a Camera is the same size as the game, but can be made smaller via this method, - * allowing you to create mini-cam style effects by creating and positioning a smaller Camera - * viewport within your game. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport - * @since 3.0.0 - * - * @param {number} x - The top-left x coordinate of the Camera viewport. - * @param {number} y - The top-left y coordinate of the Camera viewport. - * @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. - */ - setViewport: function (x, y, width, height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - - return this; - }, - - /** - * Set the zoom value of the Camera. - * - * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'. - * Changing to a larger value, such as 2, will cause the camera to 'zoom in'. - * - * A value of 1 means 'no zoom' and is the default. - * - * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom - * @since 3.0.0 - * - * @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. - */ - setZoom: function (value) - { - if (value === undefined) { value = 1; } - - if (value === 0) - { - value = 0.001; - } - - this.zoom = value; - - return this; - }, - - /** - * Sets the visibility of this Camera. - * - * An invisible Camera will skip rendering and input tests of everything it can see. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible - * @since 3.10.0 - * - * @param {boolean} value - The visible state of the Camera. - * - * @return {this} This Camera instance. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - }, - - /** - * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON - * @since 3.0.0 - * - * @return {JSONCamera} A well-formed object suitable for conversion to JSON. - */ - toJSON: function () - { - var output = { - 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 - }; - - if (this.useBounds) - { - output['bounds'] = { - x: this._bounds.x, - y: this._bounds.y, - width: this._bounds.width, - height: this._bounds.height - }; - } - - return output; - }, - - /** - * Internal method called automatically by the Camera Manager. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#update - * @protected - * @since 3.0.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 () - { - // NOOP - }, - - /** - * Internal method called automatically when the viewport changes. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem - * @private - * @since 3.12.0 - */ - updateSystem: function () - { - var custom = false; - - if (this._x !== 0 || this._y !== 0) - { - custom = true; - } - else - { - var gameWidth = this.config.width; - var gameHeight = this.config.height; - - if (gameWidth !== this._width || gameHeight !== this._height) - { - custom = true; - } - } - - var sceneManager = this.sceneManager; - - if (custom && !this._customViewport) - { - // We need a custom viewport for this Camera - sceneManager.customViewports++; - } - else if (!custom && this._customViewport) - { - // We're turning off a custom viewport for this Camera - sceneManager.customViewports--; - } - - this.dirty = true; - this._customViewport = custom; - }, - - /** - * This event is fired when a camera is destroyed by the Camera Manager. - * - * @event CameraDestroyEvent - * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed. - */ - - /** - * Destroys this Camera instance. You rarely need to call this directly. - * - * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as - * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that. - * - * @method Phaser.Cameras.Scene2D.BaseCamera#destroy - * @fires CameraDestroyEvent - * @since 3.0.0 - */ - destroy: function () - { - this.emit('cameradestroy', this); - - this.removeAllListeners(); - - this.matrix.destroy(); - - this.culledObjects = []; - - if (this._customViewport) - { - // We're turning off a custom viewport for this Camera - this.sceneManager.customViewports--; - } - - this._bounds = null; - - this.scene = null; - this.config = null; - this.sceneManager = null; - }, - - /** - * The x position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollX` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#x - * @type {number} - * @since 3.0.0 - */ - x: { - - get: function () - { - return this._x; - }, - - set: function (value) - { - this._x = value; - this._cx = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The y position of the Camera viewport, relative to the top-left of the game canvas. - * The viewport is the area into which the camera renders. - * To adjust the position the camera is looking at in the game world, see the `scrollY` value. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#y - * @type {number} - * @since 3.0.0 - */ - y: { - - get: function () - { - return this._y; - }, - - set: function (value) - { - this._y = value; - this._cy = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The width of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#width - * @type {number} - * @since 3.0.0 - */ - width: { - - get: function () - { - return this._width; - }, - - set: function (value) - { - this._width = value; - this._cw = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The height of the Camera viewport, in pixels. - * - * The viewport is the area into which the Camera renders. Setting the viewport does - * not restrict where the Camera can scroll to. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#height - * @type {number} - * @since 3.0.0 - */ - height: { - - get: function () - { - return this._height; - }, - - set: function (value) - { - this._height = value; - this._ch = value * this.resolution; - this.updateSystem(); - } - - }, - - /** - * The horizontal scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX - * @type {number} - * @default 0 - * @since 3.0.0 - */ - scrollX: { - - get: function () - { - return this._scrollX; - }, - - set: function (value) - { - this._scrollX = value; - this.dirty = true; - } - - }, - - /** - * The vertical scroll position of this Camera. - * - * Change this value to cause the Camera to scroll around your Scene. - * - * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method, - * will automatically adjust the Camera scroll values accordingly. - * - * You can set the bounds within which the Camera can scroll via the `setBounds` method. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY - * @type {number} - * @default 0 - * @since 3.0.0 - */ - scrollY: { - - get: function () - { - return this._scrollY; - }, - - set: function (value) - { - this._scrollY = value; - this.dirty = true; - } - - }, - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * - * A value of 0.5 would zoom the Camera out, so you can now see twice as much - * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel - * now takes up 2 pixels when rendered. - * - * Set to 1 to return to the default zoom level. - * - * Be careful to never set this value to zero. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#zoom - * @type {number} - * @default 1 - * @since 3.0.0 - */ - zoom: { - - get: function () - { - return this._zoom; - }, - - set: function (value) - { - this._zoom = value; - this.dirty = true; - } - - }, - - /** - * The rotation of the Camera in radians. - * - * 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. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#rotation - * @type {number} - * @private - * @default 0 - * @since 3.11.0 - */ - rotation: { - - get: function () - { - return this._rotation; - }, - - set: function (value) - { - this._rotation = value; - this.dirty = true; - } - - }, - - /** - * The x position of the center of the Camera's viewport, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#centerX - * @type {number} - * @readOnly - * @since 3.10.0 - */ - centerX: { - - get: function () - { - return this.x + (0.5 * this.width); - } - - }, - - /** - * The y position of the center of the Camera's viewport, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#centerY - * @type {number} - * @readOnly - * @since 3.10.0 - */ - centerY: { - - get: function () - { - return this.y + (0.5 * this.height); - } - - }, - - /** - * The displayed width of the camera viewport, factoring in the camera zoom level. - * - * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width - * would be 1600, as it's displaying twice as many pixels as zoom level 1. - * - * Equally, a camera with a width of 800 and zoom of 2 would have a display width - * of 400 pixels. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth - * @type {number} - * @readOnly - * @since 3.11.0 - */ - displayWidth: { - - get: function () - { - return this.width / this.zoom; - } - - }, - - /** - * The displayed height of the camera viewport, factoring in the camera zoom level. - * - * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height - * would be 1200, as it's displaying twice as many pixels as zoom level 1. - * - * Equally, a camera with a height of 600 and zoom of 2 would have a display height - * of 300 pixels. - * - * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight - * @type {number} - * @readOnly - * @since 3.11.0 - */ - displayHeight: { - - get: function () - { - return this.height / this.zoom; - } - - } - -}); - -module.exports = BaseCamera; - - /***/ }), /* 290 */ /***/ (function(module, exports) { @@ -71715,7 +71978,7 @@ module.exports = GetPoint; */ var GetPoint = __webpack_require__(137); -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -72528,10 +72791,10 @@ var Constraint = {}; module.exports = Constraint; var Vertices = __webpack_require__(129); -var Vector = __webpack_require__(107); +var Vector = __webpack_require__(108); var Sleeping = __webpack_require__(335); var Bounds = __webpack_require__(128); -var Axes = __webpack_require__(687); +var Axes = __webpack_require__(692); var Common = __webpack_require__(42); (function() { @@ -73087,17 +73350,21 @@ var Common = __webpack_require__(42); /* 305 */ /***/ (function(module, exports, __webpack_require__) { +/* eslint no-console: 0 */ + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var AdInstance = __webpack_require__(512); var Class = __webpack_require__(0); var DataManager = __webpack_require__(59); var EventEmitter = __webpack_require__(8); -var GetValue = __webpack_require__(3); -var LeaderboardScore = __webpack_require__(507); +var Leaderboard = __webpack_require__(511); +var Product = __webpack_require__(509); +var Purchase = __webpack_require__(508); /** * @classdesc @@ -73118,7 +73385,7 @@ var FacebookInstantGamesPlugin = new Class({ initialize: - function FacebookInstantGamesPlugin (game, config) + function FacebookInstantGamesPlugin (game) { EventEmitter.call(this); @@ -73140,18 +73407,31 @@ var FacebookInstantGamesPlugin = new Class({ this.hasLoaded = false; this.dataLocked = false; - this.apis = []; + this.supportedAPIs = []; + this.entryPoint = ''; this.entryPointData = null; - this.contextID = 0; - this.contextType = ''; - this.locale = ''; - this.platform = ''; - this.version = ''; + this.contextID = null; - this.playerID = ''; - this.playerName = ''; - this.playerPhotoURL = ''; + // POST - A facebook post. + // THREAD - A messenger thread. + // GROUP - A facebook group. + // SOLO - Default context, where the player is the only participant. + this.contextType = null; + this.locale = null; + this.platform = null; + this.version = null; + + this.playerID = null; + this.playerName = null; + this.playerPhotoURL = null; + this.playerCanSubscribeBot = false; + + this.paymentsReady = false; + this.catalog = []; + this.purchases = []; + this.leaderboards = {}; + this.ads = []; }, setDataHandler: function (parent, key, value) @@ -73168,8 +73448,10 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('sdh saved', data); + _this.emit('savedata', data); }); }, @@ -73188,25 +73470,30 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('cdh saved', data); + _this.emit('savedata', data); }); }, showLoadProgress: function (scene) { - scene.load.on('progress', function (value) { + scene.load.on('progress', function (value) + { if (!this.hasLoaded) { console.log(value); + FBInstant.setLoadingProgress(value * 100); } }, this); - scene.load.on('complete', function () { + scene.load.on('complete', function () + { this.hasLoaded = true; @@ -73223,56 +73510,227 @@ var FacebookInstantGamesPlugin = new Class({ { console.log('FBP gameStarted'); - this.apis = FBInstant.getSupportedAPIs(); + var APIs = FBInstant.getSupportedAPIs(); - this.contextID = FBInstant.context.getID(); - this.contextType = FBInstant.context.getType(); - this.locale = FBInstant.getLocale(); - this.platform = FBInstant.getPlatform(); - this.version = FBInstant.getSDKVersion(); + var supported = {}; - this.playerID = FBInstant.player.getID(); - this.playerName = FBInstant.player.getName(); - this.playerPhotoURL = FBInstant.player.getPhoto(); + var dotToUpper = function (match) + { + return match[1].toUpperCase(); + }; + + APIs.forEach(function (api) + { + api = api.replace(/\../g, dotToUpper); + + supported[api] = true; + }); + + this.supportedAPIs = supported; + + console.log(this.supportedAPIs); + + this.getID(); + this.getType(); + this.getLocale(); + this.getPlatform(); + this.getSDKVersion(); + + this.getPlayerID(); + this.getPlayerName(); + this.getPlayerPhotoURL(); var _this = this; - FBInstant.onPause(function() { + FBInstant.onPause(function () + { _this.emit('pause'); }); - FBInstant.getEntryPointAsync().then(function (entrypoint) { - + FBInstant.getEntryPointAsync().then(function (entrypoint) + { _this.entryPoint = entrypoint; _this.entryPointData = FBInstant.getEntryPointData(); + _this.emit('startgame'); + }).catch(function (e) + { + console.warn(e); }); - // this.emit('startgame'); + // Facebook.com and Android 6 only + if (this.supportedAPIs.paymentsPurchaseAsync) + { + FBInstant.payments.onReady(function () + { + console.log('payments ready'); + + _this.paymentsReady = true; + }).catch(function (e) + { + console.warn(e); + }); + } + }, + + checkAPI: function (api) + { + if (!this.supportedAPIs[api]) + { + console.warn(api + ' not supported'); + + return false; + } + else + { + return true; + } + }, + + getID: function () + { + if (!this.contextID && this.supportedAPIs.contextGetID) + { + this.contextID = FBInstant.context.getID(); + } + + return this.contextID; + }, + + getType: function () + { + if (!this.contextType && this.supportedAPIs.contextGetType) + { + this.contextType = FBInstant.context.getType(); + } + + return this.contextType; + }, + + getLocale: function () + { + if (!this.locale && this.supportedAPIs.getLocale) + { + this.locale = FBInstant.getLocale(); + } + + return this.locale; + }, + + getPlatform: function () + { + if (!this.platform && this.supportedAPIs.getPlatform) + { + this.platform = FBInstant.getPlatform(); + } + + return this.platform; + }, + + getSDKVersion: function () + { + if (!this.version && this.supportedAPIs.getSDKVersion) + { + this.version = FBInstant.getSDKVersion(); + } + + return this.version; + }, + + getPlayerID: function () + { + if (!this.playerID && this.supportedAPIs.playerGetID) + { + this.playerID = FBInstant.player.getID(); + } + + return this.playerID; + }, + + getPlayerName: function () + { + if (!this.playerName && this.supportedAPIs.playerGetName) + { + this.playerName = FBInstant.player.getName(); + } + + return this.playerName; + }, + + getPlayerPhotoURL: function () + { + if (!this.playerPhotoURL && this.supportedAPIs.playerGetPhoto) + { + this.playerPhotoURL = FBInstant.player.getPhoto(); + } + + return this.playerPhotoURL; }, loadPlayerPhoto: function (scene, key) { - console.log('load'); + if (this.playerPhotoURL) + { + console.log('load'); - scene.load.setCORS('anonymous'); + scene.load.setCORS('anonymous'); + + scene.load.image(key, this.playerPhotoURL); + + scene.load.on('complete', function () + { + this.emit('photocomplete', key); + }, this); + + scene.load.start(); + } - scene.load.image(key, this.playerPhotoURL); + return this; + }, - scene.load.on('complete', function () { + canSubscribeBot: function () + { + if (this.supportedAPIs.playerCanSubscribeBotAsync) + { + var _this = this; - this.emit('photocomplete', key); + FBInstant.player.canSubscribeBotAsync().then(function () + { + _this.playerCanSubscribeBot = true; - }, this); + _this.emit('cansubscribebot'); + }); + } - scene.load.start(); + return this; + }, + + subscribeBot: function () + { + if (this.playerCanSubscribeBot) + { + var _this = this; + + FBInstant.player.subscribeBotAsync().then(function () + { + _this.emit('subscribebot'); + }).catch(function () + { + _this.emit('subscribebotfailed'); + }); + } return this; }, getData: function (keys) { + if (!this.checkAPI('playerGetDataAsync')) + { + return this; + } + if (!Array.isArray(keys)) { keys = [ keys ]; @@ -73282,8 +73740,8 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.getDataAsync(keys).then(function(data) { - + FBInstant.player.getDataAsync(keys).then(function (data) + { console.log('getdata req', data); _this.dataLocked = true; @@ -73296,7 +73754,6 @@ var FacebookInstantGamesPlugin = new Class({ _this.dataLocked = false; _this.emit('getdata', data); - }); return this; @@ -73304,22 +73761,55 @@ var FacebookInstantGamesPlugin = new Class({ saveData: function (data) { + if (!this.checkAPI('playerSetDataAsync')) + { + return this; + } + var _this = this; - FBInstant.player.setDataAsync(data).then(function() { + FBInstant.player.setDataAsync(data).then(function () + { console.log('data saved to fb'); + _this.emit('savedata', data); }); return this; }, + flushData: function () + { + if (!this.checkAPI('playerFlushDataAsync')) + { + return this; + } + + var _this = this; + + FBInstant.player.flushDataAsync().then(function () + { + console.log('data flushed'); + + _this.emit('flushdata'); + }); + + return this; + }, + getStats: function (keys) { + if (!this.checkAPI('playerGetStatsAsync')) + { + return this; + } + var _this = this; - FBInstant.player.getStatsAsync(keys).then(function(data) { + FBInstant.player.getStatsAsync(keys).then(function (data) + { console.log('stats got from fb'); + _this.emit('getstats', data); }); @@ -73328,6 +73818,11 @@ var FacebookInstantGamesPlugin = new Class({ saveStats: function (data) { + if (!this.checkAPI('playerSetStatsAsync')) + { + return this; + } + var output = {}; for (var key in data) @@ -73340,7 +73835,8 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.setStatsAsync(output).then(function() { + FBInstant.player.setStatsAsync(output).then(function () + { console.log('stats saved to fb'); _this.emit('savestats', output); }); @@ -73350,6 +73846,11 @@ var FacebookInstantGamesPlugin = new Class({ incStats: function (data) { + if (!this.checkAPI('playerIncrementStatsAsync')) + { + return this; + } + var output = {}; for (var key in data) @@ -73362,8 +73863,10 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.player.incrementStatsAsync(output).then(function(stats) { + FBInstant.player.incrementStatsAsync(output).then(function (stats) + { console.log('stats modified'); + _this.emit('incstats', stats); }); @@ -73372,6 +73875,11 @@ var FacebookInstantGamesPlugin = new Class({ saveSession: function (data) { + if (!this.checkAPI('setSessionData')) + { + return this; + } + var test = JSON.stringify(data); if (test.length <= 1000) @@ -73406,26 +73914,13 @@ var FacebookInstantGamesPlugin = new Class({ return this._share('CHALLENGE', text, key, frame, sessionData); }, - createShortcut: function () - { - var _this = this; - - FBInstant.canCreateShortcutAsync().then(function(canCreateShortcut) { - - if (canCreateShortcut) - { - FBInstant.createShortcutAsync().then(function() { - _this.emit('shortcutcreated'); - }).catch(function() { - _this.emit('shortcutfailed'); - }); - } - - }); - }, - _share: function (intent, text, key, frame, sessionData) { + if (!this.checkAPI('shareAsync')) + { + return this; + } + if (sessionData === undefined) { sessionData = {}; } if (key) @@ -73449,15 +73944,318 @@ var FacebookInstantGamesPlugin = new Class({ var _this = this; - FBInstant.shareAsync(payload).then(function() { + FBInstant.shareAsync(payload).then(function () + { _this.emit('resume'); }); return this; }, + isSizeBetween: function (min, max) + { + if (!this.checkAPI('contextIsSizeBetween')) + { + return this; + } + + return FBInstant.context.isSizeBetween(min, max); + }, + + switchContext: function (contextID) + { + if (!this.checkAPI('contextSwitchAsync')) + { + return this; + } + + if (contextID !== this.contextID) + { + var _this = this; + + FBInstant.context.switchAsync(contextID).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('switch', _this.contextID); + }); + } + + return this; + }, + + chooseContext: function (options) + { + if (!this.checkAPI('contextChoseAsync')) + { + return this; + } + + var _this = this; + + FBInstant.context.chooseAsync(options).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('choose', _this.contextID); + }); + + return this; + }, + + createContext: function (playerID) + { + if (!this.checkAPI('contextCreateAsync')) + { + return this; + } + + var _this = this; + + FBInstant.context.createAsync(playerID).then(function () + { + _this.contextID = FBInstant.context.getID(); + _this.emit('create', _this.contextID); + }); + + return this; + }, + + getPlayers: function () + { + if (!this.checkAPI('playerGetConnectedPlayersAsync')) + { + return this; + } + + var _this = this; + + FBInstant.player.getConnectedPlayersAsync().then(function (players) + { + console.log('got player data'); + console.log(players); + + _this.emit('players', players); + }); + + return this; + }, + + getCatalog: function () + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + var catalog = this.catalog; + + FBInstant.payments.getCatalogAsync().then(function (data) + { + console.log('got catalog'); + + catalog = []; + + data.forEach(function (item) + { + + catalog.push(Product(item)); + + }); + + _this.emit('getcatalog', catalog); + }); + + return this; + }, + + purchase: function (productID, developerPayload) + { + if (!this.paymentsReady) + { + return this; + } + + var config = {productID: productID}; + + if (developerPayload) + { + config.developerPayload = developerPayload; + } + + var _this = this; + + FBInstant.payments.purchaseAsync(config).then(function (data) + { + var purchase = Purchase(data); + + console.log('product purchase', purchase); + + _this.emit('purchase', purchase); + }); + + return this; + }, + + getPurchases: function () + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + var purchases = this.purchases; + + FBInstant.payments.getPurchasesAsync().then(function (data) + { + console.log('got purchases'); + + purchases = []; + + data.forEach(function (item) + { + + purchases.push(Purchase(item)); + + }); + + _this.emit('getpurchases', purchases); + }); + + return this; + }, + + consumePurchases: function (purchaseToken) + { + if (!this.paymentsReady) + { + return this; + } + + var _this = this; + + FBInstant.payments.consumePurchaseAsync(purchaseToken).then(function () + { + console.log('purchase consumed'); + + _this.emit('consumepurchase', purchaseToken); + }); + + return this; + }, + + update: function (cta, text, key, frame, template, updateData) + { + return this._update('CUSTOM', cta, text, key, frame, template, updateData); + }, + + updateLeaderboard: function (cta, text, key, frame, template, updateData) + { + return this._update('LEADERBOARD', cta, text, key, frame, template, updateData); + }, + + _update: function (action, cta, text, key, frame, template, updateData) + { + if (!this.checkAPI('shareAsync')) + { + return this; + } + + if (cta === undefined) { cta = ''; } + + if (typeof text === 'string') + { + text = {default: text}; + } + + if (updateData === undefined) { updateData = {}; } + + if (key) + { + var imageData = this.game.textures.getBase64(key, frame); + } + + var payload = { + action: action, + cta: cta, + image: imageData, + text: text, + template: template, + data: updateData, + strategy: 'IMMEDIATE', + notification: 'NO_PUSH' + }; + + var _this = this; + + FBInstant.updateAsync(payload).then(function () + { + _this.emit('update'); + }); + + return this; + }, + + switchGame: function (appID, data) + { + if (!this.checkAPI('switchGameAsync')) + { + return this; + } + + if (data) + { + var test = JSON.stringify(data); + + if (test.length > 1000) + { + console.warn('Switch Game data too long. Max 1000 chars.'); + return this; + } + } + + var _this = this; + + FBInstant.switchGameAsync(appID, data).then(function () + { + _this.emit('switchgame', appID); + }); + + return this; + }, + + createShortcut: function () + { + var _this = this; + + FBInstant.canCreateShortcutAsync().then(function (canCreateShortcut) + { + if (canCreateShortcut) + { + FBInstant.createShortcutAsync().then(function () + { + _this.emit('shortcutcreated'); + }).catch(function () + { + _this.emit('shortcutfailed'); + }); + } + + }); + }, + + quit: function () + { + FBInstant.quit(); + }, + log: function (name, value, params) { + if (!this.checkAPI('logEvent')) + { + return this; + } + if (params === undefined) { params = {}; } if (name.length >= 2 && name.length <= 40) @@ -73468,6 +74266,232 @@ var FacebookInstantGamesPlugin = new Class({ return this; }, + preloadAds: function (placementID) + { + if (!this.checkAPI('getInterstitialAdAsync')) + { + return this; + } + + if (!Array.isArray(placementID)) + { + placementID = [ placementID ]; + } + + var i; + var _this = this; + + var total = 0; + + for (i = 0; i < this.ads.length; i++) + { + if (!this.ads[i].shown) + { + total++; + } + } + + if (total + placementID.length >= 3) + { + console.warn('Too many AdInstances. Show an ad before loading more'); + return this; + } + + for (i = 0; i < placementID.length; i++) + { + var id = placementID[i]; + + FBInstant.getInterstitialAdAsync(id).then(function (data) + { + console.log('ad preloaded'); + + var ad = AdInstance(data, true); + + _this.ads.push(ad); + + return ad.loadAsync(); + + }).catch(function (e) + { + console.error(e); + }); + } + + return this; + }, + + preloadVideoAds: function (placementID) + { + if (!this.checkAPI('getRewardedVideoAsync')) + { + return this; + } + + if (!Array.isArray(placementID)) + { + placementID = [ placementID ]; + } + + var i; + var _this = this; + + var total = 0; + + for (i = 0; i < this.ads.length; i++) + { + if (!this.ads[i].shown) + { + total++; + } + } + + if (total + placementID.length >= 3) + { + console.warn('Too many AdInstances. Show an ad before loading more'); + return this; + } + + for (i = 0; i < placementID.length; i++) + { + var id = placementID[i]; + + FBInstant.getRewardedVideoAsync(id).then(function (data) + { + console.log('video ad preloaded'); + + var ad = AdInstance(data, true); + + _this.ads.push(ad); + + return ad.loadAsync(); + + }).catch(function (e) + { + console.error(e); + }); + } + + return this; + }, + + showAd: function (placementID) + { + var _this = this; + + for (var i = 0; i < this.ads.length; i++) + { + var ad = this.ads[i]; + + if (ad.placementID === placementID) + { + ad.instance.showAsync().then(function () + { + ad.shown = true; + + _this.emit('showad', ad); + }).catch(function (e) + { + if (e.code === 'ADS_NO_FILL') + { + _this.emit('adsnofill'); + } + else + { + console.error(e); + } + }); + } + } + + return this; + }, + + showVideo: function (placementID) + { + var _this = this; + + for (var i = 0; i < this.ads.length; i++) + { + var ad = this.ads[i]; + + if (ad.placementID === placementID && ad.video) + { + ad.instance.showAsync().then(function () + { + ad.shown = true; + + _this.emit('showvideo', ad); + }).catch(function (e) + { + if (e.code === 'ADS_NO_FILL') + { + _this.emit('adsnofill'); + } + else + { + console.error(e); + } + }); + } + } + + return this; + }, + + matchPlayer: function (matchTag, switchImmediately) + { + if (matchTag === undefined) { matchTag = null; } + if (switchImmediately === undefined) { switchImmediately = false; } + + if (!this.checkAPI('matchPlayerAsync')) + { + return this; + } + + var _this = this; + + FBInstant.matchPlayerAsync(matchTag, switchImmediately).then(function () + { + console.log('match player'); + + _this.getID(); + _this.getType(); + + _this.emit('matchplayer', _this.contextID, _this.contextType); + }); + + return this; + }, + + // TODO: checkCanPlayerMatchAsync ? + + getLeaderboard: function (name) + { + if (!this.checkAPI('getLeaderboardAsync')) + { + return this; + } + + var _this = this; + + FBInstant.getLeaderboardAsync(name).then(function (data) + { + console.log('leaderboard'); + console.log(data); + + var leaderboard = new Leaderboard(_this, data); + + _this.leaderboards[name] = leaderboard; + + _this.emit('getleaderboard', leaderboard); + }).catch(function (e) + { + console.warn(e); + }); + + return this; + }, + /** * Destroys the FacebookInstantGamesPlugin. * @@ -74545,9 +75569,9 @@ module.exports = Animation; */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(168); +var NumberTweenBuilder = __webpack_require__(169); var PluginCache = __webpack_require__(10); -var TimelineBuilder = __webpack_require__(167); +var TimelineBuilder = __webpack_require__(168); var TWEEN_CONST = __webpack_require__(62); var TweenBuilder = __webpack_require__(72); @@ -75306,12 +76330,12 @@ module.exports = { GetBoolean: __webpack_require__(63), GetEaseFunction: __webpack_require__(64), GetNewValue: __webpack_require__(73), - GetProps: __webpack_require__(170), - GetTargets: __webpack_require__(103), - GetTweens: __webpack_require__(169), - GetValueOp: __webpack_require__(102), - NumberTweenBuilder: __webpack_require__(168), - TimelineBuilder: __webpack_require__(167), + GetProps: __webpack_require__(171), + GetTargets: __webpack_require__(104), + GetTweens: __webpack_require__(170), + GetValueOp: __webpack_require__(103), + NumberTweenBuilder: __webpack_require__(169), + TimelineBuilder: __webpack_require__(168), TweenBuilder: __webpack_require__(72) }; @@ -75339,9 +76363,9 @@ var Tweens = { Builders: __webpack_require__(309), TweenManager: __webpack_require__(307), - Tween: __webpack_require__(100), - TweenData: __webpack_require__(99), - Timeline: __webpack_require__(166) + Tween: __webpack_require__(101), + TweenData: __webpack_require__(100), + Timeline: __webpack_require__(167) }; @@ -75363,7 +76387,7 @@ module.exports = Tweens; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(10); -var TimerEvent = __webpack_require__(171); +var TimerEvent = __webpack_require__(172); /** * @classdesc @@ -75762,7 +76786,7 @@ module.exports = Clock; module.exports = { Clock: __webpack_require__(311), - TimerEvent: __webpack_require__(171) + TimerEvent: __webpack_require__(172) }; @@ -75778,10 +76802,10 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var CONST = __webpack_require__(22); +var Components = __webpack_require__(13); +var CONST = __webpack_require__(23); var GameObject = __webpack_require__(15); -var StaticTilemapLayerRender = __webpack_require__(631); +var StaticTilemapLayerRender = __webpack_require__(636); var TilemapComponents = __webpack_require__(143); var Utils = __webpack_require__(21); @@ -76988,8 +78012,8 @@ module.exports = StaticTilemapLayer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var DynamicTilemapLayerRender = __webpack_require__(634); +var Components = __webpack_require__(13); +var DynamicTilemapLayerRender = __webpack_require__(639); var GameObject = __webpack_require__(15); var TilemapComponents = __webpack_require__(143); @@ -78234,8 +79258,8 @@ var Class = __webpack_require__(0); var DegToRad = __webpack_require__(39); var DynamicTilemapLayer = __webpack_require__(314); var Extend = __webpack_require__(17); -var Formats = __webpack_require__(27); -var LayerData = __webpack_require__(105); +var Formats = __webpack_require__(28); +var LayerData = __webpack_require__(106); var Rotate = __webpack_require__(350); var StaticTilemapLayer = __webpack_require__(313); var Tile = __webpack_require__(66); @@ -80508,10 +81532,10 @@ module.exports = Tilemap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(636); -var ParseTilesets = __webpack_require__(635); +var Formats = __webpack_require__(28); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(641); +var ParseTilesets = __webpack_require__(640); /** * @namespace Phaser.Tilemaps.Parsers.Impact @@ -80685,7 +81709,7 @@ module.exports = ObjectLayer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Pick = __webpack_require__(640); +var Pick = __webpack_require__(645); var ParseGID = __webpack_require__(320); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -81029,14 +82053,14 @@ module.exports = ParseGID; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(644); -var ParseImageLayers = __webpack_require__(642); -var ParseTilesets = __webpack_require__(641); -var ParseObjectLayers = __webpack_require__(639); -var BuildTilesetIndex = __webpack_require__(638); -var AssignTileProperties = __webpack_require__(637); +var Formats = __webpack_require__(28); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(649); +var ParseImageLayers = __webpack_require__(647); +var ParseTilesets = __webpack_require__(646); +var ParseObjectLayers = __webpack_require__(644); +var BuildTilesetIndex = __webpack_require__(643); +var AssignTileProperties = __webpack_require__(642); /** * @namespace Phaser.Tilemaps.Parsers.Tiled @@ -81109,8 +82133,8 @@ module.exports = ParseJSONTiled; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var Parse2DArray = __webpack_require__(223); +var Formats = __webpack_require__(28); +var Parse2DArray = __webpack_require__(225); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -81157,8 +82181,8 @@ module.exports = ParseCSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(27); -var Parse2DArray = __webpack_require__(223); +var Formats = __webpack_require__(28); +var Parse2DArray = __webpack_require__(225); var ParseCSV = __webpack_require__(322); var ParseJSONTiled = __webpack_require__(321); var ParseWeltmeister = __webpack_require__(316); @@ -81228,8 +82252,8 @@ module.exports = Parse; */ var Tile = __webpack_require__(66); -var IsInLayerBounds = __webpack_require__(106); -var CalculateFacesAt = __webpack_require__(226); +var IsInLayerBounds = __webpack_require__(107); +var CalculateFacesAt = __webpack_require__(228); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -81289,7 +82313,7 @@ module.exports = RemoveTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var IsInLayerBounds = __webpack_require__(106); +var IsInLayerBounds = __webpack_require__(107); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -81332,7 +82356,7 @@ module.exports = HasTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching @@ -81440,11 +82464,11 @@ var FilterMode = __webpack_require__(327); var Textures = { FilterMode: FilterMode, - Frame: __webpack_require__(94), - Parsers: __webpack_require__(189), - Texture: __webpack_require__(120), - TextureManager: __webpack_require__(191), - TextureSource: __webpack_require__(190) + Frame: __webpack_require__(95), + Parsers: __webpack_require__(190), + Texture: __webpack_require__(121), + TextureManager: __webpack_require__(192), + TextureSource: __webpack_require__(191) }; @@ -81469,10 +82493,10 @@ module.exports = Textures; module.exports = { - List: __webpack_require__(93), + List: __webpack_require__(94), Map: __webpack_require__(127), - ProcessQueue: __webpack_require__(229), - RTree: __webpack_require__(228), + ProcessQueue: __webpack_require__(231), + RTree: __webpack_require__(230), Set: __webpack_require__(70) }; @@ -81520,19 +82544,19 @@ module.exports = { module.exports = { - SoundManagerCreator: __webpack_require__(198), + SoundManagerCreator: __webpack_require__(199), BaseSound: __webpack_require__(78), BaseSoundManager: __webpack_require__(79), - WebAudioSound: __webpack_require__(192), - WebAudioSoundManager: __webpack_require__(193), + WebAudioSound: __webpack_require__(193), + WebAudioSoundManager: __webpack_require__(194), - HTML5AudioSound: __webpack_require__(196), - HTML5AudioSoundManager: __webpack_require__(197), + HTML5AudioSound: __webpack_require__(197), + HTML5AudioSoundManager: __webpack_require__(198), - NoAudioSound: __webpack_require__(194), - NoAudioSoundManager: __webpack_require__(195) + NoAudioSound: __webpack_require__(195), + NoAudioSoundManager: __webpack_require__(196) }; @@ -82540,10 +83564,10 @@ var Extend = __webpack_require__(17); var Scene = { - SceneManager: __webpack_require__(201), + SceneManager: __webpack_require__(202), ScenePlugin: __webpack_require__(331), - Settings: __webpack_require__(199), - Systems: __webpack_require__(121) + Settings: __webpack_require__(200), + Systems: __webpack_require__(122) }; @@ -82563,7 +83587,7 @@ module.exports = Scene; * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(172); +var BasePlugin = __webpack_require__(173); var Class = __webpack_require__(0); /** @@ -82676,10 +83700,10 @@ module.exports = ScenePlugin; module.exports = { - BasePlugin: __webpack_require__(172), - DefaultPlugins: __webpack_require__(123), + BasePlugin: __webpack_require__(173), + DefaultPlugins: __webpack_require__(124), PluginCache: __webpack_require__(10), - PluginManager: __webpack_require__(203), + PluginManager: __webpack_require__(204), ScenePlugin: __webpack_require__(333) }; @@ -82956,7 +83980,7 @@ module.exports = { var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); var Vector2 = __webpack_require__(4); /** @@ -84315,10 +85339,10 @@ module.exports = Collider; var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); -var RadToDeg = __webpack_require__(154); +var RadToDeg = __webpack_require__(155); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(31); -var TransformMatrix = __webpack_require__(32); +var RectangleContains = __webpack_require__(32); +var TransformMatrix = __webpack_require__(27); var Vector2 = __webpack_require__(4); /** @@ -85763,6 +86787,8 @@ var Body = new Class({ { this.velocity.set(x, y); + this.speed = Math.sqrt(x * x + y * y); + return this; }, @@ -85780,6 +86806,11 @@ var Body = new Class({ { this.velocity.x = value; + var vx = value; + var vy = this.velocity.y; + + this.speed = Math.sqrt(vx * vx + vy * vy); + return this; }, @@ -85797,6 +86828,11 @@ var Body = new Class({ { this.velocity.y = value; + var vx = this.velocity.x; + var vy = value; + + this.speed = Math.sqrt(vx * vx + vy * vy); + return this; }, @@ -86363,13 +87399,13 @@ var FuzzyLessThan = __webpack_require__(354); var GetOverlapX = __webpack_require__(341); var GetOverlapY = __webpack_require__(340); var GetValue = __webpack_require__(3); -var ProcessQueue = __webpack_require__(229); -var ProcessTileCallbacks = __webpack_require__(696); +var ProcessQueue = __webpack_require__(231); +var ProcessTileCallbacks = __webpack_require__(701); var Rectangle = __webpack_require__(11); -var RTree = __webpack_require__(228); -var SeparateTile = __webpack_require__(695); -var SeparateX = __webpack_require__(690); -var SeparateY = __webpack_require__(689); +var RTree = __webpack_require__(230); +var SeparateTile = __webpack_require__(700); +var SeparateX = __webpack_require__(695); +var SeparateY = __webpack_require__(694); var Set = __webpack_require__(70); var StaticBody = __webpack_require__(338); var TileIntersectsBody = __webpack_require__(339); @@ -88679,7 +89715,7 @@ module.exports = World; var ArcadeSprite = __webpack_require__(144); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); -var Group = __webpack_require__(113); +var Group = __webpack_require__(114); var IsPlainObject = __webpack_require__(7); /** @@ -88845,7 +89881,7 @@ var ArcadeSprite = __webpack_require__(144); var Class = __webpack_require__(0); var CONST = __webpack_require__(43); var GetFastValue = __webpack_require__(1); -var Group = __webpack_require__(113); +var Group = __webpack_require__(114); var IsPlainObject = __webpack_require__(7); /** @@ -89152,18 +90188,18 @@ module.exports = PhysicsGroup; module.exports = { - Acceleration: __webpack_require__(708), - Angular: __webpack_require__(707), - Bounce: __webpack_require__(706), - Debug: __webpack_require__(705), - Drag: __webpack_require__(704), - Enable: __webpack_require__(703), - Friction: __webpack_require__(702), - Gravity: __webpack_require__(701), - Immovable: __webpack_require__(700), - Mass: __webpack_require__(699), - Size: __webpack_require__(698), - Velocity: __webpack_require__(697) + Acceleration: __webpack_require__(713), + Angular: __webpack_require__(712), + Bounce: __webpack_require__(711), + Debug: __webpack_require__(710), + Drag: __webpack_require__(709), + Enable: __webpack_require__(708), + Friction: __webpack_require__(707), + Gravity: __webpack_require__(706), + Immovable: __webpack_require__(705), + Mass: __webpack_require__(704), + Size: __webpack_require__(703), + Velocity: __webpack_require__(702) }; @@ -91526,7 +92562,7 @@ var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -91857,12 +92893,12 @@ module.exports = MultiAtlasFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AudioFile = __webpack_require__(175); +var AudioFile = __webpack_require__(176); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -92163,7 +93199,7 @@ var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); var MultiFile = __webpack_require__(37); /** @@ -92422,7 +93458,7 @@ module.exports = AtlasJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); /** * @classdesc @@ -92629,7 +93665,7 @@ module.exports = AnimationJSONFile; /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(204) + TouchManager: __webpack_require__(205) }; /* eslint-enable */ @@ -92652,7 +93688,7 @@ module.exports = { /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(206) + MouseManager: __webpack_require__(207) }; /* eslint-enable */ @@ -92927,7 +93963,7 @@ module.exports = ProcessKeyDown; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var KeyCodes = __webpack_require__(110); +var KeyCodes = __webpack_require__(111); var KeyMap = {}; @@ -93111,9 +94147,9 @@ var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); var GetValue = __webpack_require__(3); var InputPluginCache = __webpack_require__(76); -var Key = __webpack_require__(178); -var KeyCodes = __webpack_require__(110); -var KeyCombo = __webpack_require__(177); +var Key = __webpack_require__(179); +var KeyCodes = __webpack_require__(111); +var KeyCombo = __webpack_require__(178); var KeyMap = __webpack_require__(374); var ProcessKeyDown = __webpack_require__(373); var ProcessKeyUp = __webpack_require__(372); @@ -93749,10 +94785,10 @@ module.exports = { KeyboardPlugin: __webpack_require__(378), - Key: __webpack_require__(178), - KeyCodes: __webpack_require__(110), + Key: __webpack_require__(179), + KeyCodes: __webpack_require__(111), - KeyCombo: __webpack_require__(177), + KeyCombo: __webpack_require__(178), JustDown: __webpack_require__(371), JustUp: __webpack_require__(370), @@ -93808,13 +94844,13 @@ module.exports = CreatePixelPerfectHandler; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); var CircleContains = __webpack_require__(33); var Class = __webpack_require__(0); -var CreateInteractiveObject = __webpack_require__(182); +var CreateInteractiveObject = __webpack_require__(183); var CreatePixelPerfectHandler = __webpack_require__(380); var DistanceBetween = __webpack_require__(58); -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); var EllipseContains = __webpack_require__(55); var EventEmitter = __webpack_require__(8); var GetFastValue = __webpack_require__(1); @@ -93822,7 +94858,7 @@ var InputPluginCache = __webpack_require__(76); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(10); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); var Triangle = __webpack_require__(68); var TriangleContains = __webpack_require__(61); @@ -96340,7 +97376,7 @@ module.exports = { var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(8); -var Gamepad = __webpack_require__(179); +var Gamepad = __webpack_require__(180); var GetValue = __webpack_require__(3); var InputPluginCache = __webpack_require__(76); @@ -96987,9 +98023,9 @@ module.exports = GamepadPlugin; module.exports = { - Axis: __webpack_require__(181), - Button: __webpack_require__(180), - Gamepad: __webpack_require__(179), + Axis: __webpack_require__(182), + Button: __webpack_require__(181), + Gamepad: __webpack_require__(180), GamepadPlugin: __webpack_require__(386), Configs: __webpack_require__(385) @@ -97006,7 +98042,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(207); +var CONST = __webpack_require__(208); var Extend = __webpack_require__(17); /** @@ -97015,14 +98051,14 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(182), + CreateInteractiveObject: __webpack_require__(183), Gamepad: __webpack_require__(387), - InputManager: __webpack_require__(208), + InputManager: __webpack_require__(209), InputPlugin: __webpack_require__(381), InputPluginCache: __webpack_require__(76), Keyboard: __webpack_require__(379), Mouse: __webpack_require__(367), - Pointer: __webpack_require__(205), + Pointer: __webpack_require__(206), Touch: __webpack_require__(366) }; @@ -97235,41 +98271,41 @@ module.exports = ContainsRect; var Rectangle = __webpack_require__(11); -Rectangle.Area = __webpack_require__(803); -Rectangle.Ceil = __webpack_require__(802); -Rectangle.CeilAll = __webpack_require__(801); -Rectangle.CenterOn = __webpack_require__(157); -Rectangle.Clone = __webpack_require__(800); -Rectangle.Contains = __webpack_require__(31); -Rectangle.ContainsPoint = __webpack_require__(799); +Rectangle.Area = __webpack_require__(808); +Rectangle.Ceil = __webpack_require__(807); +Rectangle.CeilAll = __webpack_require__(806); +Rectangle.CenterOn = __webpack_require__(158); +Rectangle.Clone = __webpack_require__(805); +Rectangle.Contains = __webpack_require__(32); +Rectangle.ContainsPoint = __webpack_require__(804); Rectangle.ContainsRect = __webpack_require__(392); -Rectangle.CopyFrom = __webpack_require__(798); +Rectangle.CopyFrom = __webpack_require__(803); Rectangle.Decompose = __webpack_require__(399); -Rectangle.Equals = __webpack_require__(797); -Rectangle.FitInside = __webpack_require__(796); -Rectangle.FitOutside = __webpack_require__(795); -Rectangle.Floor = __webpack_require__(794); -Rectangle.FloorAll = __webpack_require__(793); -Rectangle.FromPoints = __webpack_require__(266); -Rectangle.GetAspectRatio = __webpack_require__(234); -Rectangle.GetCenter = __webpack_require__(792); +Rectangle.Equals = __webpack_require__(802); +Rectangle.FitInside = __webpack_require__(801); +Rectangle.FitOutside = __webpack_require__(800); +Rectangle.Floor = __webpack_require__(799); +Rectangle.FloorAll = __webpack_require__(798); +Rectangle.FromPoints = __webpack_require__(267); +Rectangle.GetAspectRatio = __webpack_require__(236); +Rectangle.GetCenter = __webpack_require__(797); Rectangle.GetPoint = __webpack_require__(137); Rectangle.GetPoints = __webpack_require__(297); -Rectangle.GetSize = __webpack_require__(791); -Rectangle.Inflate = __webpack_require__(790); -Rectangle.Intersection = __webpack_require__(789); -Rectangle.MarchingAnts = __webpack_require__(577); -Rectangle.MergePoints = __webpack_require__(788); -Rectangle.MergeRect = __webpack_require__(787); -Rectangle.MergeXY = __webpack_require__(786); -Rectangle.Offset = __webpack_require__(785); -Rectangle.OffsetPoint = __webpack_require__(784); -Rectangle.Overlaps = __webpack_require__(783); -Rectangle.Perimeter = __webpack_require__(98); -Rectangle.PerimeterPoint = __webpack_require__(782); -Rectangle.Random = __webpack_require__(161); -Rectangle.RandomOutside = __webpack_require__(781); -Rectangle.Scale = __webpack_require__(780); +Rectangle.GetSize = __webpack_require__(796); +Rectangle.Inflate = __webpack_require__(795); +Rectangle.Intersection = __webpack_require__(794); +Rectangle.MarchingAnts = __webpack_require__(582); +Rectangle.MergePoints = __webpack_require__(793); +Rectangle.MergeRect = __webpack_require__(792); +Rectangle.MergeXY = __webpack_require__(791); +Rectangle.Offset = __webpack_require__(790); +Rectangle.OffsetPoint = __webpack_require__(789); +Rectangle.Overlaps = __webpack_require__(788); +Rectangle.Perimeter = __webpack_require__(99); +Rectangle.PerimeterPoint = __webpack_require__(787); +Rectangle.Random = __webpack_require__(162); +Rectangle.RandomOutside = __webpack_require__(786); +Rectangle.Scale = __webpack_require__(785); Rectangle.Union = __webpack_require__(446); module.exports = Rectangle; @@ -97286,7 +98322,7 @@ module.exports = Rectangle; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(235); +var Contains = __webpack_require__(237); /** * @classdesc @@ -97750,20 +98786,20 @@ module.exports = LineToCircle; module.exports = { - CircleToCircle: __webpack_require__(850), - CircleToRectangle: __webpack_require__(849), - GetRectangleIntersection: __webpack_require__(848), + CircleToCircle: __webpack_require__(855), + CircleToRectangle: __webpack_require__(854), + GetRectangleIntersection: __webpack_require__(853), LineToCircle: __webpack_require__(401), LineToLine: __webpack_require__(147), - LineToRectangle: __webpack_require__(847), + LineToRectangle: __webpack_require__(852), PointToLine: __webpack_require__(400), - PointToLineSegment: __webpack_require__(846), - RectangleToRectangle: __webpack_require__(238), - RectangleToTriangle: __webpack_require__(845), - RectangleToValues: __webpack_require__(844), - TriangleToCircle: __webpack_require__(843), - TriangleToLine: __webpack_require__(842), - TriangleToTriangle: __webpack_require__(841) + PointToLineSegment: __webpack_require__(851), + RectangleToRectangle: __webpack_require__(240), + RectangleToTriangle: __webpack_require__(850), + RectangleToValues: __webpack_require__(849), + TriangleToCircle: __webpack_require__(848), + TriangleToLine: __webpack_require__(847), + TriangleToTriangle: __webpack_require__(846) }; @@ -97784,14 +98820,14 @@ module.exports = { module.exports = { - Circle: __webpack_require__(860), - Ellipse: __webpack_require__(244), + Circle: __webpack_require__(865), + Ellipse: __webpack_require__(246), Intersects: __webpack_require__(402), - Line: __webpack_require__(840), - Point: __webpack_require__(822), - Polygon: __webpack_require__(808), + Line: __webpack_require__(845), + Point: __webpack_require__(827), + Polygon: __webpack_require__(813), Rectangle: __webpack_require__(393), - Triangle: __webpack_require__(779) + Triangle: __webpack_require__(784) }; @@ -98419,9 +99455,9 @@ module.exports = Light; */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Text = __webpack_require__(111); +var Text = __webpack_require__(112); /** * Creates a new Text Game Object and returns it. @@ -98507,7 +99543,7 @@ GameObjectCreator.register('text', function (config, addToScene) var BuildGameObject = __webpack_require__(25); var BuildGameObjectAnimation = __webpack_require__(130); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var Sprite = __webpack_require__(35); @@ -98567,7 +99603,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var Image = __webpack_require__(69); @@ -98616,8 +99652,8 @@ GameObjectCreator.register('image', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); -var Graphics = __webpack_require__(117); +var GameObjectCreator = __webpack_require__(14); +var Graphics = __webpack_require__(118); /** * Creates a new Graphics Game Object and returns it. @@ -98664,7 +99700,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Text = __webpack_require__(111); +var Text = __webpack_require__(112); var GameObjectFactory = __webpack_require__(9); /** @@ -98795,7 +99831,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Graphics = __webpack_require__(117); +var Graphics = __webpack_require__(118); var GameObjectFactory = __webpack_require__(9); /** @@ -98864,7 +99900,7 @@ module.exports = GetPowerOfTwo; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(24); +var CanvasPool = __webpack_require__(22); /** * Calculates the ascent, descent and fontSize of a given font style. @@ -101213,14 +102249,14 @@ module.exports = DeathZone; var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); -var Components = __webpack_require__(14); +var Components = __webpack_require__(13); var DeathZone = __webpack_require__(426); var EdgeZone = __webpack_require__(425); -var EmitterOp = __webpack_require__(904); +var EmitterOp = __webpack_require__(909); var GetFastValue = __webpack_require__(1); var GetRandom = __webpack_require__(150); var HasAny = __webpack_require__(424); -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); var Particle = __webpack_require__(428); var RandomZone = __webpack_require__(423); var Rectangle = __webpack_require__(11); @@ -104284,7 +105320,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(116); +var Commands = __webpack_require__(117); var Utils = __webpack_require__(21); // TODO: Remove the use of this @@ -104623,12 +105659,12 @@ if (true) renderWebGL = __webpack_require__(433); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(183); + renderCanvas = __webpack_require__(184); } if (true) { - renderCanvas = __webpack_require__(183); + renderCanvas = __webpack_require__(184); } module.exports = { @@ -104892,7 +105928,7 @@ module.exports = ContainsPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(115); +var Ellipse = __webpack_require__(116); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -104956,7 +105992,7 @@ module.exports = Area; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CSSBlendModes = __webpack_require__(909); +var CSSBlendModes = __webpack_require__(914); var GameObject = __webpack_require__(15); /** @@ -104987,9 +106023,9 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca return; } - var camMatrix = renderer.pipelines.TextureTintPipeline._tempMatrix1; - var spriteMatrix = renderer.pipelines.TextureTintPipeline._tempMatrix2; - var calcMatrix = renderer.pipelines.TextureTintPipeline._tempMatrix3; + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; var x = src.originX * src.width; var y = src.originY * src.height; @@ -105032,10 +106068,11 @@ module.exports = DOMElementCSSRenderer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(14); -var DOMElementRender = __webpack_require__(910); +var Components = __webpack_require__(13); +var DOMElementRender = __webpack_require__(915); var GameObject = __webpack_require__(15); -var Vector4 = __webpack_require__(155); +var RemoveFromDOM = __webpack_require__(153); +var Vector4 = __webpack_require__(156); /** * @classdesc @@ -105282,6 +106319,10 @@ var DOMElement = new Class({ if (this.node) { this.node.innerText = text; + + var nodeBounds = this.node.getBoundingClientRect(); + + this.setSize(nodeBounds.width, nodeBounds.height); } return this; @@ -105292,6 +106333,10 @@ var DOMElement = new Class({ if (this.node) { this.node.innerHTML = html; + + var nodeBounds = this.node.getBoundingClientRect(); + + this.setSize(nodeBounds.width, nodeBounds.height); } return this; @@ -105314,7 +106359,7 @@ var DOMElement = new Class({ destroy: function () { - + RemoveFromDOM(this.node); } }); @@ -105877,7 +106922,7 @@ module.exports = Swap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Scans the array for elements with the given property. If found, the property is set to the `value`. @@ -106051,7 +107096,7 @@ module.exports = RemoveRandomElement; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Removes the item within the given range in the array. @@ -106165,7 +107210,7 @@ module.exports = RemoveAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RoundAwayFromZero = __webpack_require__(249); +var RoundAwayFromZero = __webpack_require__(251); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -106437,7 +107482,7 @@ module.exports = MoveDown; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns the first element in the array. @@ -106496,7 +107541,7 @@ module.exports = GetFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns all elements in the array. @@ -106558,7 +107603,7 @@ module.exports = GetAll; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Passes each element in the array, between the start and end indexes, to the given callback. @@ -106660,7 +107705,7 @@ module.exports = Each; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SafeRange = __webpack_require__(29); +var SafeRange = __webpack_require__(30); /** * Returns the total number of elements in the array which have a property matching the given value. @@ -107141,7 +108186,7 @@ module.exports = ReverseColumns; */ var Pad = __webpack_require__(135); -var CheckMatrix = __webpack_require__(119); +var CheckMatrix = __webpack_require__(120); // Generates a string (which you can pass to console.log) from the given // Array Matrix. @@ -107227,7 +108272,7 @@ module.exports = MatrixToString; module.exports = { - CheckMatrix: __webpack_require__(119), + CheckMatrix: __webpack_require__(120), MatrixToString: __webpack_require__(474), ReverseColumns: __webpack_require__(473), ReverseRows: __webpack_require__(472), @@ -107235,7 +108280,7 @@ module.exports = { RotateLeft: __webpack_require__(470), RotateMatrix: __webpack_require__(77), RotateRight: __webpack_require__(469), - TransposeMatrix: __webpack_require__(188) + TransposeMatrix: __webpack_require__(189) }; @@ -107251,7 +108296,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var List = __webpack_require__(93); +var List = __webpack_require__(94); var PluginCache = __webpack_require__(10); var StableSort = __webpack_require__(83); @@ -107629,7 +108674,7 @@ module.exports = VisibilityHandler; var Class = __webpack_require__(0); var GetValue = __webpack_require__(3); var NOOP = __webpack_require__(2); -var RequestAnimationFrame = __webpack_require__(260); +var RequestAnimationFrame = __webpack_require__(262); // Frame Rate config // fps: { @@ -109134,7 +110179,7 @@ module.exports = AtlasXML; var Class = __webpack_require__(0); var IsSizePowerOfTwo = __webpack_require__(84); -var Texture = __webpack_require__(120); +var Texture = __webpack_require__(121); /** * @classdesc @@ -109445,7 +110490,7 @@ module.exports = GetScenePlugins; */ var GetFastValue = __webpack_require__(1); -var UppercaseFirst = __webpack_require__(250); +var UppercaseFirst = __webpack_require__(252); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -109498,6 +110543,305 @@ module.exports = GetPhysicsPlugins; /***/ }), /* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Vec2 = __webpack_require__(4); + +/* + Use `scaleMode` SHOW_ALL. + Use `scaleMode` EXACT_FIT. + Use `scaleMode` USER_SCALE. Examine `parentBounds` in the {@link #setResizeCallback resize callback} and call {@link #setUserScale} if necessary. + Use `scaleMode` RESIZE. Examine the game or canvas size from the {@link #onSizeChange} signal **or** the {@link Phaser.State#resize} callback and reposition game objects if necessary. + + Canvas width / height in the element + Canvas CSS width / height in the style + + Detect orientation + Lock orientation (Android only?) + Full-screen support + + Scale Mode - +*/ + +/** + * @classdesc + * [description] + * + * @class ScaleManager + * @memberOf Phaser.Boot + * @constructor + * @since 3.12.0 + * + * @param {Phaser.Game} game - A reference to the Phaser.Game instance. + * @param {ScaleManagerConfig} config + */ +var ScaleManager = new Class({ + + initialize: + + function ScaleManager (game, config) + { + /** + * A reference to the Phaser.Game instance. + * + * @name Phaser.Boot.ScaleManager#game + * @type {Phaser.Game} + * @readOnly + * @since 3.12.0 + */ + this.game = game; + + this.config = config; + + /** + * Target width (in pixels) of the Display canvas. + * @property {number} width + * @readonly + */ + this.width = 0; + + /** + * Target height (in pixels) of the Display canvas. + * @property {number} height + * @readonly + */ + this.height = 0; + + this.zoom = 0; + + this.resolution = 1; + + this.parent = null; + + this.scaleMode = 0; + + /** + * Minimum width the canvas should be scaled to (in pixels). + * Change with {@link #setMinMax}. + * @property {?number} minWidth + * @readonly + * @protected + */ + this.minWidth = null; + + /** + * Minimum height the canvas should be scaled to (in pixels). + * Change with {@link #setMinMax}. + * @property {?number} minHeight + * @readonly + * @protected + */ + this.minHeight = null; + + /** + * Maximum width the canvas should be scaled to (in pixels). + * If null it will scale to whatever width the browser can handle. + * Change with {@link #setMinMax}. + * @property {?number} maxWidth + * @readonly + * @protected + */ + this.maxWidth = null; + + /** + * Maximum height the canvas should be scaled to (in pixels). + * If null it will scale to whatever height the browser can handle. + * Change with {@link #setMinMax}. + * @property {?number} maxHeight + * @readonly + * @protected + */ + this.maxHeight = null; + + /** + * The _current_ scale factor based on the game dimensions vs. the scaled dimensions. + * @property {Phaser.Point} scaleFactor + * @readonly + */ + this.scaleFactor = new Vec2(1, 1); + + /** + * The _current_ inversed scale factor. The displayed dimensions divided by the game dimensions. + * @property {Phaser.Point} scaleFactorInversed + * @readonly + * @protected + */ + this.scaleFactorInversed = new Vec2(1, 1); + + /** + * The aspect ratio of the scaled Display canvas. + * @property {number} aspectRatio + * @readonly + */ + this.aspectRatio = 0; + + /** + * The aspect ratio of the original game dimensions. + * @property {number} sourceAspectRatio + * @readonly + */ + this.sourceAspectRatio = 0; + + /** + * True if the the browser window (instead of the display canvas's DOM parent) should be used as the bounding parent. + * + * This is set automatically based on the `parent` argument passed to {@link Phaser.Game}. + * + * The {@link #parentNode} property is generally ignored while this is in effect. + * + * @property {boolean} parentIsWindow + */ + this.parentIsWindow = false; + + /** + * The _original_ DOM element for the parent of the Display canvas. + * This may be different in fullscreen - see {@link #createFullScreenTarget}. + * + * This is set automatically based on the `parent` argument passed to {@link Phaser.Game}. + * + * This should only be changed after moving the Game canvas to a different DOM parent. + * + * @property {?DOMElement} parentNode + */ + this.parentNode = null; + + /** + * The scale of the game in relation to its parent container. + * @property {Phaser.Point} parentScaleFactor + * @readonly + */ + this.parentScaleFactor = new Vec2(1, 1); + + this._lastParentWidth = 0; + + this._lastParentHeight = 0; + + this._innerHeight = 0; + + this.init(); + }, + + init: function () + { + this._innerHeight = this.getInnerHeight(); + + // var gameWidth = this.config.width; + // var gameHeight = this.config.height; + }, + + centerDisplay: function () + { + var height = this.height; + var gameWidth = 0; + var gameHeight = 0; + + this.parentNode.style.display = 'flex'; + this.parentNode.style.height = height + 'px'; + + this.canvas.style.margin = 'auto'; + this.canvas.style.width = gameWidth + 'px'; + this.canvas.style.height = gameHeight + 'px'; + }, + + /* + iOS10 Resize hack. Thanks, Apple. + + I._onWindowResize = function(a) { + if (this._lastReportedWidth != document.body.offsetWidth) { + this._lastReportedWidth = document.body.offsetWidth; + if (this._isAutoPlaying && this._cancelAutoPlayOnInteraction) { + this.stopAutoPlay(a) + } + window.clearTimeout(this._onResizeDebouncedTimeout); + this._onResizeDebouncedTimeout = setTimeout(this._onResizeDebounced, 500); + aj._onWindowResize.call(this, a) + } + }; + */ + + resizeHandler: function () + { + + }, + + /* + resize: function () + { + let scale = Math.min(window.innerWidth / canvas.width, window.innerHeight / canvas.height); + let orientation = 'left'; + let extra = (this.mobile) ? 'margin-left: -50%': ''; + let margin = window.innerWidth / 2 - (canvas.width / 2) * scale; + + canvas.setAttribute('style', '-ms-transform-origin: ' + orientation + ' top; -webkit-transform-origin: ' + orientation + ' top;' + + ' -moz-transform-origin: ' + orientation + ' top; -o-transform-origin: ' + orientation + ' top; transform-origin: ' + orientation + ' top;' + + ' -ms-transform: scale(' + scale + '); -webkit-transform: scale3d(' + scale + ', 1);' + + ' -moz-transform: scale(' + scale + '); -o-transform: scale(' + scale + '); transform: scale(' + scale + ');' + + ' display: block; margin-left: ' + margin + 'px;' + ); + }, + */ + + getInnerHeight: function () + { + // Based on code by @tylerjpeterson + + if (!this.game.device.os.iOS) + { + return window.innerHeight; + } + + var axis = Math.abs(window.orientation); + + var size = { w: 0, h: 0 }; + + var ruler = document.createElement('div'); + + ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0'); + + document.documentElement.appendChild(ruler); + + size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth; + size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight; + + document.documentElement.removeChild(ruler); + + ruler = null; + + if (Math.abs(window.orientation) !== 90) + { + return size.h; + } + else + { + return size.w; + } + }, + + /** + * Destroys the ScaleManager. + * + * @method Phaser.Boot.ScaleManager#destroy + * @since 3.12.0 + */ + destroy: function () + { + this.game = null; + } + +}); + +module.exports = ScaleManager; + + +/***/ }), +/* 492 */ /***/ (function(module, exports) { /** @@ -109595,7 +110939,7 @@ module.exports = init(); /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports) { /** @@ -109680,7 +111024,7 @@ module.exports = init(); /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109805,7 +111149,7 @@ module.exports = init(); /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109884,7 +111228,7 @@ module.exports = init(); /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109920,18 +111264,18 @@ module.exports = { os: __webpack_require__(57), browser: __webpack_require__(81), - features: __webpack_require__(122), - input: __webpack_require__(494), - audio: __webpack_require__(493), - video: __webpack_require__(492), - fullscreen: __webpack_require__(491), - canvasFeatures: __webpack_require__(209) + features: __webpack_require__(123), + input: __webpack_require__(495), + audio: __webpack_require__(494), + video: __webpack_require__(493), + fullscreen: __webpack_require__(492), + canvasFeatures: __webpack_require__(210) }; /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109940,7 +111284,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -110059,7 +111403,7 @@ module.exports = DebugHeader; /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports) { module.exports = [ @@ -110094,7 +111438,7 @@ module.exports = [ /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, exports) { module.exports = [ @@ -110137,7 +111481,7 @@ module.exports = [ /***/ }), -/* 499 */ +/* 500 */ /***/ (function(module, exports) { /** @@ -110728,7 +112072,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 500 */ +/* 501 */ /***/ (function(module, exports) { module.exports = [ @@ -110786,7 +112130,7 @@ module.exports = [ /***/ }), -/* 501 */ +/* 502 */ /***/ (function(module, exports) { module.exports = [ @@ -110805,7 +112149,7 @@ module.exports = [ /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports) { module.exports = [ @@ -110841,7 +112185,7 @@ module.exports = [ /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110850,10 +112194,10 @@ module.exports = [ * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasInterpolation = __webpack_require__(264); -var CanvasPool = __webpack_require__(24); -var CONST = __webpack_require__(22); -var Features = __webpack_require__(122); +var CanvasInterpolation = __webpack_require__(265); +var CanvasPool = __webpack_require__(22); +var CONST = __webpack_require__(23); +var Features = __webpack_require__(123); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -110936,8 +112280,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(259); - WebGLRenderer = __webpack_require__(256); + CanvasRenderer = __webpack_require__(261); + WebGLRenderer = __webpack_require__(258); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -110965,7 +112309,7 @@ module.exports = CreateRenderer; /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111007,7 +112351,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111017,13 +112361,13 @@ module.exports = CreateDOMContainer; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); var IsPlainObject = __webpack_require__(7); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(2); -var DefaultPlugins = __webpack_require__(123); +var DefaultPlugins = __webpack_require__(124); var ValueToColor = __webpack_require__(134); /** @@ -111048,6 +112392,21 @@ var ValueToColor = __webpack_require__(134); * @property {integer} [panicMax=120] - [description] */ +/** + * @typedef {object} ScaleConfig + * + * @property {(integer|string)} [width=1024] - The base width of your game. + * @property {(integer|string)} [height=768] - The base height of your game. + * @property {integer} [zoom=1] - The zoom value of the game canvas. + * @property {number} [resolution=1] - The rendering resolution of the canvas. + * @property {any} [parent] - The parent DOM element. + * @property {integer} [mode=0] - The scale mode to apply to the canvas. + * @property {integer} [minWidth] - The minimum width the canvas can be scaled down to. + * @property {integer} [minHeight] - The minimum height the canvas can be scaled down to. + * @property {integer} [maxWidth] - The maximum width the canvas can be scaled up to. + * @property {integer} [maxHeight] - The maximum height the canvas can be scaled up to. + */ + /** * @typedef {object} LoaderConfig * @@ -111069,6 +112428,26 @@ var ValueToColor = __webpack_require__(134); * @property {boolean} [behindCanvas=false] - Place the DOM Container behind the Phaser Canvas. The default is to place it over the Canvas. */ +/** + * @typedef {object} PluginObjectItem + * + * @property {string} [key] - [description] + * @property {*} [plugin] - [description] + * @property {boolean} [start] - [description] + * @property {string} [systemKey] - [description] + * @property {string} [sceneKey] - [description] + * @property {*} [data] - [description] + */ + +/** + * @typedef {object} PluginObject + * + * @property {PluginObjectItem[]} [global=null] - [description] + * @property {PluginObjectItem[]} [scene=null] - [description] + * @property {Array} [default=[]] - [description] + * @property {*} [defaultMerge={}] - [description] + */ + /** * @typedef {object} GameConfig * @@ -111124,6 +112503,7 @@ var ValueToColor = __webpack_require__(134); * @property {string} [images.default] - [description] * @property {string} [images.missing] - [description] * @property {object} [physics] - [description] + * @property {PluginObject|PluginObjectItem[]} [plugins] - [description] */ /** @@ -111175,16 +112555,37 @@ var Config = new Class({ */ this.resolution = GetValue(config, 'resolution', 1); - /** - * @const {number} Phaser.Boot.Config#renderType - [description] - */ - this.renderType = GetValue(config, 'type', CONST.AUTO); - /** * @const {?*} Phaser.Boot.Config#parent - [description] */ this.parent = GetValue(config, 'parent', null); + /** + * @const {?*} Phaser.Boot.Config#scaleMode - [description] + */ + this.scaleMode = GetValue(config, 'scaleMode', 0); + + // Scale Manager - Anything set in here over-rides anything set above + + var scaleConfig = GetValue(config, 'scale', null); + + if (scaleConfig) + { + this.width = GetValue(scaleConfig, 'width', this.width); + this.height = GetValue(scaleConfig, 'height', this.height); + this.zoom = GetValue(scaleConfig, 'zoom', this.zoom); + this.resolution = GetValue(scaleConfig, 'resolution', this.resolution); + this.parent = GetValue(scaleConfig, 'parent', this.parent); + this.scaleMode = GetValue(scaleConfig, 'mode', this.scaleMode); + + // TODO: Add in min / max sizes + } + + /** + * @const {number} Phaser.Boot.Config#renderType - [description] + */ + this.renderType = GetValue(config, 'type', CONST.AUTO); + /** * @const {?HTMLCanvasElement} Phaser.Boot.Config#canvas - Force Phaser to use your own Canvas element instead of creating one. */ @@ -111599,7 +113000,7 @@ module.exports = Config; /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111609,25 +113010,26 @@ module.exports = Config; */ var AddToDOM = __webpack_require__(85); -var AnimationManager = __webpack_require__(213); -var CacheManager = __webpack_require__(211); -var CanvasPool = __webpack_require__(24); +var AnimationManager = __webpack_require__(215); +var CacheManager = __webpack_require__(213); +var CanvasPool = __webpack_require__(22); var Class = __webpack_require__(0); -var Config = __webpack_require__(505); -var CreateDOMContainer = __webpack_require__(504); -var CreateRenderer = __webpack_require__(503); +var Config = __webpack_require__(506); +var CreateDOMContainer = __webpack_require__(505); +var CreateRenderer = __webpack_require__(504); var DataManager = __webpack_require__(59); -var DebugHeader = __webpack_require__(496); -var Device = __webpack_require__(495); -var DOMContentLoaded = __webpack_require__(263); +var DebugHeader = __webpack_require__(497); +var Device = __webpack_require__(496); +var DOMContentLoaded = __webpack_require__(264); var EventEmitter = __webpack_require__(8); var FacebookInstantGamesPlugin = __webpack_require__(305); -var InputManager = __webpack_require__(208); +var InputManager = __webpack_require__(209); var PluginCache = __webpack_require__(10); -var PluginManager = __webpack_require__(203); -var SceneManager = __webpack_require__(201); -var SoundManagerCreator = __webpack_require__(198); -var TextureManager = __webpack_require__(191); +var PluginManager = __webpack_require__(204); +var ScaleManager = __webpack_require__(491); +var SceneManager = __webpack_require__(202); +var SoundManagerCreator = __webpack_require__(199); +var TextureManager = __webpack_require__(192); var TimeStep = __webpack_require__(478); var VisibilityHandler = __webpack_require__(477); @@ -111818,6 +113220,17 @@ var Game = new Class({ */ this.device = Device; + /** + * An instance of the Scale Manager. + * + * The Scale Manager is a global system responsible for handling game scaling events. + * + * @name Phaser.Game#scaleManager + * @type {Phaser.Boot.ScaleManager} + * @since 3.12.0 + */ + this.scaleManager = new ScaleManager(this, this.config); + /** * An instance of the base Sound Manager. * @@ -112362,7 +113775,7 @@ module.exports = Game; /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112371,7 +113784,34 @@ module.exports = Game; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(1); + +var Purchase = function (data) +{ + return { + developerPayload: GetFastValue(data, 'developerPayload', ''), + paymentID: GetFastValue(data, 'paymentID', ''), + productID: GetFastValue(data, 'productID', ''), + purchaseTime: GetFastValue(data, 'purchaseTime', ''), + purchaseToken: GetFastValue(data, 'purchaseToken', ''), + signedRequest: GetFastValue(data, 'signedRequest', '') + }; +}; + +module.exports = Purchase; + + +/***/ }), +/* 509 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var GetFastValue = __webpack_require__(1); /** * @classdesc @@ -112382,26 +113822,212 @@ var Class = __webpack_require__(0); * @constructor * @since 3.12.0 */ -var LeaderboardScore = new Class({ +var Product = function (data) +{ + return { + title: GetFastValue(data, 'title', ''), + productID: GetFastValue(data, 'productID', ''), + description: GetFastValue(data, 'description', ''), + imageURI: GetFastValue(data, 'imageURI', ''), + price: GetFastValue(data, 'price', ''), + priceCurrencyCode: GetFastValue(data, 'priceCurrencyCode', '') + }; +}; - initialize: +module.exports = Product; - function LeaderboardScore () - { - this.value; - this.valueFormatted; - this.timestamp; - this.rank; - this.data; - } -}); +/***/ }), +/* 510 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var LeaderboardScore = function (entry) +{ + return { + score: entry.getScore(), + scoreFormatted: entry.getFormattedScore(), + timestamp: entry.getTimestamp(), + rank: entry.getRank(), + data: entry.getExtraData(), + playerName: entry.getPlayer().getName(), + playerPhotoURL: entry.getPlayer().getPhoto(), + playerID: entry.getPlayer().getID() + }; +}; module.exports = LeaderboardScore; /***/ }), -/* 508 */ +/* 511 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var EventEmitter = __webpack_require__(8); +var LeaderboardScore = __webpack_require__(510); + +/** + * @classdesc + * [description] + * + * @class FacebookInstantGamesPlugin + * @memberOf Phaser + * @constructor + * @since 3.12.0 + */ +var Leaderboard = new Class({ + + Extends: EventEmitter, + + initialize: + + function Leaderboard (plugin, data) + { + EventEmitter.call(this); + + this.plugin = plugin; + this.ref = data; + + this.name = data.getName(); + this.contextID = data.getContextID(); + this.entryCount = 0; + + this.playerScore = null; + this.scores = []; + + this.getEntryCount(); + }, + + getEntryCount: function () + { + var _this = this; + + this.ref.getEntryCountAsync().then(function (count) + { + console.log('entry count', count); + + _this.entryCount = count; + + _this.emit('getentrycount', count, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + }, + + setScore: function (score, data) + { + if (data === undefined) { data = ''; } + + var _this = this; + + this.ref.setScoreAsync(score, data).then(function (entry) + { + console.log('set score', entry); + + _this.emit('setscore', entry.getScore(), entry.getExtraData(), _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + }, + + getPlayerScore: function () + { + var _this = this; + + this.ref.getPlayerEntryAsync().then(function (entry) + { + console.log('get player score'); + + var score = LeaderboardScore(entry); + + console.log(score); + + _this.playerScore = score; + + _this.emit('getplayerscore', score, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + + }, + + getScores: function (count, offset) + { + if (count === undefined) { count = 10; } + if (offset === undefined) { offset = 0; } + + var _this = this; + + this.ref.getEntriesAsync().then(function (entries) + { + console.log('get scores', entries); + + _this.scores = []; + + entries.forEach(function (entry) + { + + _this.scores.push(LeaderboardScore(entry)); + + }); + + _this.emit('getscores', _this.scores, _this.name); + + }).catch(function (e) + { + console.warn(e); + }); + + } + +}); + +module.exports = Leaderboard; + + +/***/ }), +/* 512 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var AdInstance = function (instance, video) +{ + return { + instance: instance, + placementID: instance.getPlacementID(), + shown: false, + video: video + }; +}; + +module.exports = AdInstance; + + +/***/ }), +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112585,7 +114211,7 @@ module.exports = EventEmitter; /***/ }), -/* 509 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112598,11 +114224,11 @@ module.exports = EventEmitter; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(508) }; +module.exports = { EventEmitter: __webpack_require__(513) }; /***/ }), -/* 510 */ +/* 515 */ /***/ (function(module, exports) { // shim for using process in browser @@ -112792,7 +114418,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 511 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112807,14 +114433,14 @@ process.umask = function() { return 0; }; module.exports = { - BitmapMask: __webpack_require__(220), - GeometryMask: __webpack_require__(219) + BitmapMask: __webpack_require__(222), + GeometryMask: __webpack_require__(221) }; /***/ }), -/* 512 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112823,7 +114449,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetColor = __webpack_require__(158); +var GetColor = __webpack_require__(159); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -112898,7 +114524,7 @@ module.exports = HSVToRGB; /***/ }), -/* 513 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -112954,7 +114580,7 @@ module.exports = HueToComponent; /***/ }), -/* 514 */ +/* 519 */ /***/ (function(module, exports) { /** @@ -112984,7 +114610,7 @@ module.exports = ComponentToHex; /***/ }), -/* 515 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113010,32 +114636,32 @@ module.exports = ComponentToHex; * @property {number} a - The alpha color value in the range 0 to 255. */ -var Color = __webpack_require__(30); +var Color = __webpack_require__(31); -Color.ColorToRGBA = __webpack_require__(931); -Color.ComponentToHex = __webpack_require__(514); -Color.GetColor = __webpack_require__(158); -Color.GetColor32 = __webpack_require__(287); -Color.HexStringToColor = __webpack_require__(288); -Color.HSLToColor = __webpack_require__(930); -Color.HSVColorWheel = __webpack_require__(929); -Color.HSVToRGB = __webpack_require__(512); -Color.HueToComponent = __webpack_require__(513); -Color.IntegerToColor = __webpack_require__(286); -Color.IntegerToRGB = __webpack_require__(285); -Color.Interpolate = __webpack_require__(928); -Color.ObjectToColor = __webpack_require__(284); -Color.RandomRGB = __webpack_require__(927); -Color.RGBStringToColor = __webpack_require__(283); -Color.RGBToHSV = __webpack_require__(926); -Color.RGBToString = __webpack_require__(925); +Color.ColorToRGBA = __webpack_require__(936); +Color.ComponentToHex = __webpack_require__(519); +Color.GetColor = __webpack_require__(159); +Color.GetColor32 = __webpack_require__(288); +Color.HexStringToColor = __webpack_require__(289); +Color.HSLToColor = __webpack_require__(935); +Color.HSVColorWheel = __webpack_require__(934); +Color.HSVToRGB = __webpack_require__(517); +Color.HueToComponent = __webpack_require__(518); +Color.IntegerToColor = __webpack_require__(287); +Color.IntegerToRGB = __webpack_require__(286); +Color.Interpolate = __webpack_require__(933); +Color.ObjectToColor = __webpack_require__(285); +Color.RandomRGB = __webpack_require__(932); +Color.RGBStringToColor = __webpack_require__(284); +Color.RGBToHSV = __webpack_require__(931); +Color.RGBToString = __webpack_require__(930); Color.ValueToColor = __webpack_require__(134); module.exports = Color; /***/ }), -/* 516 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113161,7 +114787,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 517 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113177,13 +114803,13 @@ module.exports = DataManagerPlugin; module.exports = { DataManager: __webpack_require__(59), - DataManagerPlugin: __webpack_require__(516) + DataManagerPlugin: __webpack_require__(521) }; /***/ }), -/* 518 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113194,7 +114820,7 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(265); +var CatmullRom = __webpack_require__(266); var Class = __webpack_require__(0); var Curve = __webpack_require__(86); var Vector2 = __webpack_require__(4); @@ -113408,7 +115034,7 @@ module.exports = SplineCurve; /***/ }), -/* 519 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -113462,7 +115088,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 520 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113473,7 +115099,7 @@ module.exports = QuadraticBezierInterpolation; var Class = __webpack_require__(0); var Curve = __webpack_require__(86); -var QuadraticBezierInterpolation = __webpack_require__(519); +var QuadraticBezierInterpolation = __webpack_require__(524); var Vector2 = __webpack_require__(4); /** @@ -113676,7 +115302,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 521 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113689,7 +115315,7 @@ module.exports = QuadraticBezier; var Class = __webpack_require__(0); var Curve = __webpack_require__(86); -var FromPoints = __webpack_require__(266); +var FromPoints = __webpack_require__(267); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(4); @@ -113933,7 +115559,7 @@ module.exports = LineCurve; /***/ }), -/* 522 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113948,7 +115574,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(86); var DegToRad = __webpack_require__(39); var GetValue = __webpack_require__(3); -var RadToDeg = __webpack_require__(154); +var RadToDeg = __webpack_require__(155); var Vector2 = __webpack_require__(4); /** @@ -114561,7 +116187,7 @@ module.exports = EllipseCurve; /***/ }), -/* 523 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -114624,7 +116250,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 524 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114636,7 +116262,7 @@ module.exports = CubicBezierInterpolation; // 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__(523); +var CubicBezier = __webpack_require__(528); var Curve = __webpack_require__(86); var Vector2 = __webpack_require__(4); @@ -114851,7 +116477,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 525 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114860,7 +116486,7 @@ module.exports = CubicBezierCurve; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(270); +var Camera = __webpack_require__(271); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(87); @@ -114991,7 +116617,7 @@ module.exports = PerspectiveCamera; /***/ }), -/* 526 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115000,7 +116626,7 @@ module.exports = PerspectiveCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(270); +var Camera = __webpack_require__(271); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(87); @@ -115178,7 +116804,7 @@ module.exports = OrthographicCamera; /***/ }), -/* 527 */ +/* 532 */ /***/ (function(module, exports) { /** @@ -115211,7 +116837,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 528 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -115244,7 +116870,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 529 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115258,12 +116884,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(528); + renderWebGL = __webpack_require__(533); } if (true) { - renderCanvas = __webpack_require__(527); + renderCanvas = __webpack_require__(532); } module.exports = { @@ -115275,7 +116901,7 @@ module.exports = { /***/ }), -/* 530 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115868,7 +117494,7 @@ module.exports = Matrix3; /***/ }), -/* 531 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115882,7 +117508,7 @@ module.exports = Matrix3; var Class = __webpack_require__(0); var Vector3 = __webpack_require__(87); -var Matrix3 = __webpack_require__(530); +var Matrix3 = __webpack_require__(535); var EPSILON = 0.000001; @@ -116640,7 +118266,7 @@ module.exports = Quaternion; /***/ }), -/* 532 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116650,8 +118276,8 @@ module.exports = Quaternion; */ var Vector3 = __webpack_require__(87); -var Matrix4 = __webpack_require__(269); -var Quaternion = __webpack_require__(531); +var Matrix4 = __webpack_require__(270); +var Quaternion = __webpack_require__(536); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -116688,7 +118314,7 @@ module.exports = RotateVec3; /***/ }), -/* 533 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -116725,7 +118351,7 @@ module.exports = RandomXYZW; /***/ }), -/* 534 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -116764,7 +118390,7 @@ module.exports = RandomXYZ; /***/ }), -/* 535 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116773,11 +118399,11 @@ module.exports = RandomXYZ; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(126); +var Camera = __webpack_require__(212); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var PluginCache = __webpack_require__(10); -var RectangleContains = __webpack_require__(31); +var RectangleContains = __webpack_require__(32); /** * @typedef {object} InputJSONCameraObject @@ -117484,7 +119110,7 @@ module.exports = CameraManager; /***/ }), -/* 536 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117495,7 +119121,7 @@ module.exports = CameraManager; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * @classdesc @@ -117801,7 +119427,7 @@ module.exports = Zoom; /***/ }), -/* 537 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118143,7 +119769,7 @@ module.exports = Shake; /***/ }), -/* 538 */ +/* 543 */ /***/ (function(module, exports) { /** @@ -118185,7 +119811,7 @@ module.exports = Stepped; /***/ }), -/* 539 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -118224,7 +119850,7 @@ module.exports = InOut; /***/ }), -/* 540 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -118263,7 +119889,7 @@ module.exports = Out; /***/ }), -/* 541 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -118302,7 +119928,7 @@ module.exports = In; /***/ }), -/* 542 */ +/* 547 */ /***/ (function(module, exports) { /** @@ -118337,7 +119963,7 @@ module.exports = InOut; /***/ }), -/* 543 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -118365,7 +119991,7 @@ module.exports = Out; /***/ }), -/* 544 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -118393,7 +120019,7 @@ module.exports = In; /***/ }), -/* 545 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -118428,7 +120054,7 @@ module.exports = InOut; /***/ }), -/* 546 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -118456,7 +120082,7 @@ module.exports = Out; /***/ }), -/* 547 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -118484,7 +120110,7 @@ module.exports = In; /***/ }), -/* 548 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -118519,7 +120145,7 @@ module.exports = InOut; /***/ }), -/* 549 */ +/* 554 */ /***/ (function(module, exports) { /** @@ -118547,7 +120173,7 @@ module.exports = Out; /***/ }), -/* 550 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -118575,7 +120201,7 @@ module.exports = In; /***/ }), -/* 551 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -118603,7 +120229,7 @@ module.exports = Linear; /***/ }), -/* 552 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -118638,7 +120264,7 @@ module.exports = InOut; /***/ }), -/* 553 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -118666,7 +120292,7 @@ module.exports = Out; /***/ }), -/* 554 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -118694,7 +120320,7 @@ module.exports = In; /***/ }), -/* 555 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -118756,7 +120382,7 @@ module.exports = InOut; /***/ }), -/* 556 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -118811,7 +120437,7 @@ module.exports = Out; /***/ }), -/* 557 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -118866,7 +120492,7 @@ module.exports = In; /***/ }), -/* 558 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -118901,7 +120527,7 @@ module.exports = InOut; /***/ }), -/* 559 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -118929,7 +120555,7 @@ module.exports = Out; /***/ }), -/* 560 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -118957,7 +120583,7 @@ module.exports = In; /***/ }), -/* 561 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -118992,7 +120618,7 @@ module.exports = InOut; /***/ }), -/* 562 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -119020,7 +120646,7 @@ module.exports = Out; /***/ }), -/* 563 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -119048,7 +120674,7 @@ module.exports = In; /***/ }), -/* 564 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -119112,7 +120738,7 @@ module.exports = InOut; /***/ }), -/* 565 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -119155,7 +120781,7 @@ module.exports = Out; /***/ }), -/* 566 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -119200,7 +120826,7 @@ module.exports = In; /***/ }), -/* 567 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -119240,7 +120866,7 @@ module.exports = InOut; /***/ }), -/* 568 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -119271,7 +120897,7 @@ module.exports = Out; /***/ }), -/* 569 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -119302,7 +120928,7 @@ module.exports = In; /***/ }), -/* 570 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119314,7 +120940,7 @@ module.exports = In; var Clamp = __webpack_require__(20); var Class = __webpack_require__(0); var Vector2 = __webpack_require__(4); -var EaseMap = __webpack_require__(125); +var EaseMap = __webpack_require__(126); /** * @classdesc @@ -119653,7 +121279,7 @@ module.exports = Pan; /***/ }), -/* 571 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120029,7 +121655,7 @@ module.exports = Flash; /***/ }), -/* 572 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120462,7 +122088,7 @@ module.exports = Fade; /***/ }), -/* 573 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120477,15 +122103,15 @@ module.exports = Fade; module.exports = { - Camera: __webpack_require__(126), - CameraManager: __webpack_require__(535), - Effects: __webpack_require__(210) + Camera: __webpack_require__(212), + CameraManager: __webpack_require__(540), + Effects: __webpack_require__(211) }; /***/ }), -/* 574 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120500,14 +122126,14 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(212), - CacheManager: __webpack_require__(211) + BaseCache: __webpack_require__(214), + CacheManager: __webpack_require__(213) }; /***/ }), -/* 575 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120522,15 +122148,15 @@ module.exports = { module.exports = { - Animation: __webpack_require__(216), - AnimationFrame: __webpack_require__(214), - AnimationManager: __webpack_require__(213) + Animation: __webpack_require__(218), + AnimationFrame: __webpack_require__(216), + AnimationManager: __webpack_require__(215) }; /***/ }), -/* 576 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -120604,7 +122230,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 577 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120613,7 +122239,7 @@ module.exports = BresenhamPoints; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Perimeter = __webpack_require__(98); +var Perimeter = __webpack_require__(99); var Point = __webpack_require__(5); // Return an array of points from the perimeter of the rectangle @@ -120724,7 +122350,7 @@ module.exports = MarchingAnts; /***/ }), -/* 578 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -120813,7 +122439,7 @@ module.exports = Visible; /***/ }), -/* 579 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120823,9 +122449,9 @@ module.exports = Visible; */ var MATH_CONST = __webpack_require__(16); -var TransformMatrix = __webpack_require__(32); -var WrapAngle = __webpack_require__(218); -var WrapAngleDegrees = __webpack_require__(217); +var TransformMatrix = __webpack_require__(27); +var WrapAngle = __webpack_require__(220); +var WrapAngleDegrees = __webpack_require__(219); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -121293,7 +122919,7 @@ module.exports = Transform; /***/ }), -/* 580 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -121380,7 +123006,7 @@ module.exports = ToJSON; /***/ }), -/* 581 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -121719,7 +123345,7 @@ module.exports = Tint; /***/ }), -/* 582 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -121927,7 +123553,7 @@ module.exports = TextureCrop; /***/ }), -/* 583 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -122057,7 +123683,7 @@ module.exports = Texture; /***/ }), -/* 584 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -122089,6 +123715,10 @@ var Size = { /** * The native (un-scaled) width of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * * @name Phaser.GameObjects.Components.Size#width * @type {number} * @since 3.0.0 @@ -122098,6 +123728,10 @@ var Size = { /** * The native (un-scaled) height of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * * @name Phaser.GameObjects.Components.Size#height * @type {number} * @since 3.0.0 @@ -122106,8 +123740,11 @@ var Size = { /** * The displayed width of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.Size#displayWidth * @type {number} * @since 3.0.0 @@ -122128,8 +123765,11 @@ var Size = { /** * The displayed height of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.Size#displayHeight * @type {number} * @since 3.0.0 @@ -122151,6 +123791,14 @@ var Size = { /** * Sets the size of this Game Object to be that of the given Frame. * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * * @method Phaser.GameObjects.Components.Size#setSizeToFrame * @since 3.0.0 * @@ -122176,6 +123824,9 @@ var Size = { * `setDisplaySize` method, which is the same thing as changing the scale but allows you * to do so by giving pixel values. * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * * @method Phaser.GameObjects.Components.Size#setSize * @since 3.0.0 * @@ -122219,7 +123870,7 @@ module.exports = Size; /***/ }), -/* 585 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -122311,7 +123962,7 @@ module.exports = ScrollFactor; /***/ }), -/* 586 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122382,7 +124033,7 @@ module.exports = ScaleMode; /***/ }), -/* 587 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -122585,7 +124236,7 @@ module.exports = Origin; /***/ }), -/* 588 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122594,8 +124245,8 @@ module.exports = Origin; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapMask = __webpack_require__(220); -var GeometryMask = __webpack_require__(219); +var BitmapMask = __webpack_require__(222); +var GeometryMask = __webpack_require__(221); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -122732,7 +124383,7 @@ module.exports = Mask; /***/ }), -/* 589 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123014,7 +124665,7 @@ module.exports = GetBounds; /***/ }), -/* 590 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -123162,7 +124813,7 @@ module.exports = Flip; /***/ }), -/* 591 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -123255,7 +124906,7 @@ module.exports = Depth; /***/ }), -/* 592 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -123380,7 +125031,7 @@ module.exports = Crop; /***/ }), -/* 593 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -123402,6 +125053,10 @@ var ComputedSize = { /** * The native (un-scaled) width of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * * @name Phaser.GameObjects.Components.ComputedSize#width * @type {number} * @since 3.0.0 @@ -123411,6 +125066,10 @@ var ComputedSize = { /** * The native (un-scaled) height of this Game Object. * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * * @name Phaser.GameObjects.Components.ComputedSize#height * @type {number} * @since 3.0.0 @@ -123419,8 +125078,11 @@ var ComputedSize = { /** * The displayed width of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.ComputedSize#displayWidth * @type {number} * @since 3.0.0 @@ -123441,8 +125103,11 @@ var ComputedSize = { /** * The displayed height of this Game Object. + * * This value takes into account the scale factor. * + * Setting this value will adjust the Game Object's scale property. + * * @name Phaser.GameObjects.Components.ComputedSize#displayHeight * @type {number} * @since 3.0.0 @@ -123462,7 +125127,15 @@ var ComputedSize = { }, /** - * Sets the size of this Game Object. + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. * * @method Phaser.GameObjects.Components.ComputedSize#setSize * @since 3.4.0 @@ -123482,6 +125155,7 @@ var ComputedSize = { /** * Sets the display size of this Game Object. + * * Calling this will adjust the scale. * * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize @@ -123506,7 +125180,7 @@ module.exports = ComputedSize; /***/ }), -/* 594 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123626,7 +125300,7 @@ module.exports = BlendMode; /***/ }), -/* 595 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123921,7 +125595,7 @@ module.exports = Alpha; /***/ }), -/* 596 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123965,7 +125639,7 @@ module.exports = TopRight; /***/ }), -/* 597 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124009,7 +125683,7 @@ module.exports = TopLeft; /***/ }), -/* 598 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124018,9 +125692,9 @@ module.exports = TopLeft; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(92); +var GetCenterX = __webpack_require__(93); var GetTop = __webpack_require__(45); -var SetCenterX = __webpack_require__(91); +var SetCenterX = __webpack_require__(92); var SetTop = __webpack_require__(44); /** @@ -124053,7 +125727,7 @@ module.exports = TopCenter; /***/ }), -/* 599 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124062,9 +125736,9 @@ module.exports = TopCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetRight = __webpack_require__(47); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetRight = __webpack_require__(46); /** @@ -124097,7 +125771,7 @@ module.exports = RightCenter; /***/ }), -/* 600 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124106,9 +125780,9 @@ module.exports = RightCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetLeft = __webpack_require__(49); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetLeft = __webpack_require__(48); /** @@ -124141,7 +125815,7 @@ module.exports = LeftCenter; /***/ }), -/* 601 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124150,8 +125824,8 @@ module.exports = LeftCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetCenterX = __webpack_require__(91); -var SetCenterY = __webpack_require__(90); +var SetCenterX = __webpack_require__(92); +var SetCenterY = __webpack_require__(91); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -124178,7 +125852,7 @@ module.exports = CenterOn; /***/ }), -/* 602 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124187,9 +125861,9 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(601); -var GetCenterX = __webpack_require__(92); -var GetCenterY = __webpack_require__(89); +var CenterOn = __webpack_require__(606); +var GetCenterX = __webpack_require__(93); +var GetCenterY = __webpack_require__(90); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -124220,7 +125894,7 @@ module.exports = Center; /***/ }), -/* 603 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124264,7 +125938,7 @@ module.exports = BottomRight; /***/ }), -/* 604 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124308,7 +125982,7 @@ module.exports = BottomLeft; /***/ }), -/* 605 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124318,9 +125992,9 @@ module.exports = BottomLeft; */ var GetBottom = __webpack_require__(51); -var GetCenterX = __webpack_require__(92); +var GetCenterX = __webpack_require__(93); var SetBottom = __webpack_require__(50); -var SetCenterX = __webpack_require__(91); +var SetCenterX = __webpack_require__(92); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -124352,7 +126026,7 @@ module.exports = BottomCenter; /***/ }), -/* 606 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124365,15 +126039,15 @@ var ALIGN_CONST = __webpack_require__(302); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(605); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(604); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(603); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(602); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(600); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(599); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(598); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(597); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(596); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(610); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(609); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(608); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(607); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(605); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(604); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(603); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(602); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(601); /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -124401,7 +126075,7 @@ module.exports = QuickSet; /***/ }), -/* 607 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124416,61 +126090,61 @@ module.exports = QuickSet; module.exports = { - Angle: __webpack_require__(1015), - Call: __webpack_require__(1014), - GetFirst: __webpack_require__(1013), - GetLast: __webpack_require__(1012), - GridAlign: __webpack_require__(1011), - IncAlpha: __webpack_require__(1010), - IncX: __webpack_require__(1009), - IncXY: __webpack_require__(1008), - IncY: __webpack_require__(1007), - PlaceOnCircle: __webpack_require__(1006), - PlaceOnEllipse: __webpack_require__(1005), - PlaceOnLine: __webpack_require__(1004), - PlaceOnRectangle: __webpack_require__(1003), - PlaceOnTriangle: __webpack_require__(1002), - PlayAnimation: __webpack_require__(1001), + Angle: __webpack_require__(1020), + Call: __webpack_require__(1019), + GetFirst: __webpack_require__(1018), + GetLast: __webpack_require__(1017), + GridAlign: __webpack_require__(1016), + IncAlpha: __webpack_require__(1015), + IncX: __webpack_require__(1014), + IncXY: __webpack_require__(1013), + IncY: __webpack_require__(1012), + PlaceOnCircle: __webpack_require__(1011), + PlaceOnEllipse: __webpack_require__(1010), + PlaceOnLine: __webpack_require__(1009), + PlaceOnRectangle: __webpack_require__(1008), + PlaceOnTriangle: __webpack_require__(1007), + PlayAnimation: __webpack_require__(1006), PropertyValueInc: __webpack_require__(36), PropertyValueSet: __webpack_require__(26), - RandomCircle: __webpack_require__(1000), - RandomEllipse: __webpack_require__(999), - RandomLine: __webpack_require__(998), - RandomRectangle: __webpack_require__(997), - RandomTriangle: __webpack_require__(996), - Rotate: __webpack_require__(995), - RotateAround: __webpack_require__(994), - RotateAroundDistance: __webpack_require__(993), - ScaleX: __webpack_require__(992), - ScaleXY: __webpack_require__(991), - ScaleY: __webpack_require__(990), - SetAlpha: __webpack_require__(989), - SetBlendMode: __webpack_require__(988), - SetDepth: __webpack_require__(987), - SetHitArea: __webpack_require__(986), - SetOrigin: __webpack_require__(985), - SetRotation: __webpack_require__(984), - SetScale: __webpack_require__(983), - SetScaleX: __webpack_require__(982), - SetScaleY: __webpack_require__(981), - SetTint: __webpack_require__(980), - SetVisible: __webpack_require__(979), - SetX: __webpack_require__(978), - SetXY: __webpack_require__(977), - SetY: __webpack_require__(976), - ShiftPosition: __webpack_require__(975), - Shuffle: __webpack_require__(974), - SmootherStep: __webpack_require__(973), - SmoothStep: __webpack_require__(972), - Spread: __webpack_require__(971), - ToggleVisible: __webpack_require__(970), - WrapInRectangle: __webpack_require__(969) + RandomCircle: __webpack_require__(1005), + RandomEllipse: __webpack_require__(1004), + RandomLine: __webpack_require__(1003), + RandomRectangle: __webpack_require__(1002), + RandomTriangle: __webpack_require__(1001), + Rotate: __webpack_require__(1000), + RotateAround: __webpack_require__(999), + RotateAroundDistance: __webpack_require__(998), + ScaleX: __webpack_require__(997), + ScaleXY: __webpack_require__(996), + ScaleY: __webpack_require__(995), + SetAlpha: __webpack_require__(994), + SetBlendMode: __webpack_require__(993), + SetDepth: __webpack_require__(992), + SetHitArea: __webpack_require__(991), + SetOrigin: __webpack_require__(990), + SetRotation: __webpack_require__(989), + SetScale: __webpack_require__(988), + SetScaleX: __webpack_require__(987), + SetScaleY: __webpack_require__(986), + SetTint: __webpack_require__(985), + SetVisible: __webpack_require__(984), + SetX: __webpack_require__(983), + SetXY: __webpack_require__(982), + SetY: __webpack_require__(981), + ShiftPosition: __webpack_require__(980), + Shuffle: __webpack_require__(979), + SmootherStep: __webpack_require__(978), + SmoothStep: __webpack_require__(977), + Spread: __webpack_require__(976), + ToggleVisible: __webpack_require__(975), + WrapInRectangle: __webpack_require__(974) }; /***/ }), -/* 608 */ +/* 613 */ /***/ (function(module, exports) { /** @@ -124523,7 +126197,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 609 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -124593,10 +126267,10 @@ if (!global.cancelAnimationFrame) { }; } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(221))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(223))) /***/ }), -/* 610 */ +/* 615 */ /***/ (function(module, exports) { /** @@ -124633,7 +126307,7 @@ if (!global.cancelAnimationFrame) { /***/ }), -/* 611 */ +/* 616 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -124645,7 +126319,7 @@ if (!Math.trunc) { /***/ }), -/* 612 */ +/* 617 */ /***/ (function(module, exports) { /** @@ -124660,7 +126334,7 @@ if (!window.console) /***/ }), -/* 613 */ +/* 618 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -124847,7 +126521,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 614 */ +/* 619 */ /***/ (function(module, exports) { /** @@ -124863,7 +126537,7 @@ if (!Array.isArray) /***/ }), -/* 615 */ +/* 620 */ /***/ (function(module, exports) { /** @@ -124903,21 +126577,21 @@ if (!Array.prototype.forEach) /***/ }), -/* 616 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { +__webpack_require__(620); +__webpack_require__(619); +__webpack_require__(618); +__webpack_require__(617); +__webpack_require__(616); __webpack_require__(615); __webpack_require__(614); __webpack_require__(613); -__webpack_require__(612); -__webpack_require__(611); -__webpack_require__(610); -__webpack_require__(609); -__webpack_require__(608); /***/ }), -/* 617 */ +/* 622 */ /***/ (function(module, exports) { /** @@ -125057,7 +126731,7 @@ module.exports = Pair; /***/ }), -/* 618 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125072,24 +126746,24 @@ module.exports = Pair; module.exports = { - Bounce: __webpack_require__(1055), - Collision: __webpack_require__(1054), - Force: __webpack_require__(1053), - Friction: __webpack_require__(1052), - Gravity: __webpack_require__(1051), - Mass: __webpack_require__(1050), - Static: __webpack_require__(1049), - Sensor: __webpack_require__(1048), - SetBody: __webpack_require__(1047), - Sleep: __webpack_require__(1045), - Transform: __webpack_require__(1044), - Velocity: __webpack_require__(1043) + Bounce: __webpack_require__(1060), + Collision: __webpack_require__(1059), + Force: __webpack_require__(1058), + Friction: __webpack_require__(1057), + Gravity: __webpack_require__(1056), + Mass: __webpack_require__(1055), + Static: __webpack_require__(1054), + Sensor: __webpack_require__(1053), + SetBody: __webpack_require__(1052), + Sleep: __webpack_require__(1050), + Transform: __webpack_require__(1049), + Velocity: __webpack_require__(1048) }; /***/ }), -/* 619 */ +/* 624 */ /***/ (function(module, exports) { /** @@ -125118,7 +126792,7 @@ module.exports = ReverseString; /***/ }), -/* 620 */ +/* 625 */ /***/ (function(module, exports) { /** @@ -125153,7 +126827,7 @@ module.exports = Format; /***/ }), -/* 621 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125168,17 +126842,17 @@ module.exports = Format; module.exports = { - Format: __webpack_require__(620), + Format: __webpack_require__(625), Pad: __webpack_require__(135), - Reverse: __webpack_require__(619), - UppercaseFirst: __webpack_require__(250), + Reverse: __webpack_require__(624), + UppercaseFirst: __webpack_require__(252), UUID: __webpack_require__(421) }; /***/ }), -/* 622 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125221,7 +126895,7 @@ module.exports = MergeRight; /***/ }), -/* 623 */ +/* 628 */ /***/ (function(module, exports) { /** @@ -125258,7 +126932,7 @@ module.exports = HasAll; /***/ }), -/* 624 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125297,7 +126971,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 625 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125316,20 +126990,20 @@ module.exports = { Extend: __webpack_require__(17), GetAdvancedValue: __webpack_require__(12), GetFastValue: __webpack_require__(1), - GetMinMaxValue: __webpack_require__(624), + GetMinMaxValue: __webpack_require__(629), GetValue: __webpack_require__(3), - HasAll: __webpack_require__(623), + HasAll: __webpack_require__(628), HasAny: __webpack_require__(424), - HasValue: __webpack_require__(112), + HasValue: __webpack_require__(113), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(95), - MergeRight: __webpack_require__(622) + Merge: __webpack_require__(96), + MergeRight: __webpack_require__(627) }; /***/ }), -/* 626 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125345,14 +127019,14 @@ module.exports = { module.exports = { Array: __webpack_require__(151), - Objects: __webpack_require__(625), - String: __webpack_require__(621) + Objects: __webpack_require__(630), + String: __webpack_require__(626) }; /***/ }), -/* 627 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125362,7 +127036,7 @@ module.exports = { */ var GameObjectFactory = __webpack_require__(9); -var ParseToTilemap = __webpack_require__(222); +var ParseToTilemap = __webpack_require__(224); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -125418,7 +127092,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 628 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125427,8 +127101,8 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); -var ParseToTilemap = __webpack_require__(222); +var GameObjectCreator = __webpack_require__(14); +var ParseToTilemap = __webpack_require__(224); /** * @typedef {object} TilemapConfig @@ -125479,7 +127153,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 629 */ +/* 634 */ /***/ (function(module, exports) { /** @@ -125579,7 +127253,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 630 */ +/* 635 */ /***/ (function(module, exports) { /** @@ -125640,7 +127314,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 631 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125654,12 +127328,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(630); + renderWebGL = __webpack_require__(635); } if (true) { - renderCanvas = __webpack_require__(629); + renderCanvas = __webpack_require__(634); } module.exports = { @@ -125671,7 +127345,7 @@ module.exports = { /***/ }), -/* 632 */ +/* 637 */ /***/ (function(module, exports) { /** @@ -125792,7 +127466,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 633 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125892,7 +127566,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 634 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125906,12 +127580,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(633); + renderWebGL = __webpack_require__(638); } if (true) { - renderCanvas = __webpack_require__(632); + renderCanvas = __webpack_require__(637); } module.exports = { @@ -125923,7 +127597,7 @@ module.exports = { /***/ }), -/* 635 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125974,7 +127648,7 @@ module.exports = ParseTilesets; /***/ }), -/* 636 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125983,7 +127657,7 @@ module.exports = ParseTilesets; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LayerData = __webpack_require__(105); +var LayerData = __webpack_require__(106); var Tile = __webpack_require__(66); /** @@ -126058,7 +127732,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 637 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126131,7 +127805,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 638 */ +/* 643 */ /***/ (function(module, exports) { /** @@ -126204,7 +127878,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 639 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126263,7 +127937,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 640 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126272,7 +127946,7 @@ module.exports = ParseObjectLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); /** * [description] @@ -126306,7 +127980,7 @@ module.exports = Pick; /***/ }), -/* 641 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126411,7 +128085,7 @@ module.exports = ParseTilesets; /***/ }), -/* 642 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126463,7 +128137,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 643 */ +/* 648 */ /***/ (function(module, exports) { /** @@ -126506,7 +128180,7 @@ module.exports = Base64Decode; /***/ }), -/* 644 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126515,9 +128189,9 @@ module.exports = Base64Decode; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Base64Decode = __webpack_require__(643); +var Base64Decode = __webpack_require__(648); var GetFastValue = __webpack_require__(1); -var LayerData = __webpack_require__(105); +var LayerData = __webpack_require__(106); var ParseGID = __webpack_require__(320); var Tile = __webpack_require__(66); @@ -126632,7 +128306,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 645 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126648,7 +128322,7 @@ module.exports = ParseTileLayers; module.exports = { Parse: __webpack_require__(323), - Parse2DArray: __webpack_require__(223), + Parse2DArray: __webpack_require__(225), ParseCSV: __webpack_require__(322), Impact: __webpack_require__(316), @@ -126658,7 +128332,7 @@ module.exports = { /***/ }), -/* 646 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126704,7 +128378,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 647 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126713,7 +128387,7 @@ module.exports = WorldToTileXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -126784,7 +128458,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 648 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126828,7 +128502,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 649 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126837,7 +128511,7 @@ module.exports = TileToWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching @@ -126879,7 +128553,7 @@ module.exports = SwapByIndex; /***/ }), -/* 650 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126888,8 +128562,8 @@ module.exports = SwapByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); -var ShuffleArray = __webpack_require__(96); +var GetTilesWithin = __webpack_require__(24); +var ShuffleArray = __webpack_require__(97); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -126924,7 +128598,7 @@ module.exports = Shuffle; /***/ }), -/* 651 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126933,7 +128607,7 @@ module.exports = Shuffle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer. @@ -126967,7 +128641,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 652 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -127015,7 +128689,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 653 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127074,7 +128748,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 654 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127085,7 +128759,7 @@ module.exports = SetCollisionFromCollisionGroup; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -127149,7 +128823,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 655 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127160,7 +128834,7 @@ module.exports = SetCollisionByProperty; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var SetLayerCollisionIndex = __webpack_require__(224); +var SetLayerCollisionIndex = __webpack_require__(226); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -127205,7 +128879,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 656 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127216,7 +128890,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var SetLayerCollisionIndex = __webpack_require__(224); +var SetLayerCollisionIndex = __webpack_require__(226); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -127272,7 +128946,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 657 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127283,7 +128957,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(67); var CalculateFacesWithin = __webpack_require__(41); -var SetLayerCollisionIndex = __webpack_require__(224); +var SetLayerCollisionIndex = __webpack_require__(226); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -127334,7 +129008,7 @@ module.exports = SetCollision; /***/ }), -/* 658 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127343,8 +129017,8 @@ module.exports = SetCollision; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); -var Color = __webpack_require__(515); +var GetTilesWithin = __webpack_require__(24); +var Color = __webpack_require__(520); /** * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to @@ -127420,7 +129094,7 @@ module.exports = RenderDebug; /***/ }), -/* 659 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127463,7 +129137,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 660 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127472,7 +129146,7 @@ module.exports = RemoveTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var GetRandom = __webpack_require__(150); /** @@ -127521,7 +129195,7 @@ module.exports = Randomize; /***/ }), -/* 661 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127531,7 +129205,7 @@ module.exports = Randomize; */ var CalculateFacesWithin = __webpack_require__(41); -var PutTileAt = __webpack_require__(225); +var PutTileAt = __webpack_require__(227); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -127586,7 +129260,7 @@ module.exports = PutTilesAt; /***/ }), -/* 662 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127595,7 +129269,7 @@ module.exports = PutTilesAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PutTileAt = __webpack_require__(225); +var PutTileAt = __webpack_require__(227); var WorldToTileX = __webpack_require__(54); var WorldToTileY = __webpack_require__(53); @@ -127629,7 +129303,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 663 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127669,7 +129343,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 664 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127678,7 +129352,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var WorldToTileX = __webpack_require__(54); var WorldToTileY = __webpack_require__(53); @@ -127722,7 +129396,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 665 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127732,7 +129406,7 @@ module.exports = GetTilesWithinWorldXY; */ var Geom = __webpack_require__(403); -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var Intersects = __webpack_require__(402); var NOOP = __webpack_require__(2); var TileToWorldX = __webpack_require__(141); @@ -127822,7 +129496,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 666 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127864,7 +129538,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 667 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127873,7 +129547,7 @@ module.exports = GetTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * @callback EachTileCallback @@ -127917,7 +129591,7 @@ module.exports = ForEachTile; /***/ }), -/* 668 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127926,7 +129600,7 @@ module.exports = ForEachTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * @callback FindTileCallback @@ -127975,7 +129649,7 @@ module.exports = FindTile; /***/ }), -/* 669 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -128063,7 +129737,7 @@ module.exports = FindByIndex; /***/ }), -/* 670 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128072,7 +129746,7 @@ module.exports = FindByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); /** * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given @@ -128113,7 +129787,7 @@ module.exports = FilterTiles; /***/ }), -/* 671 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128122,7 +129796,7 @@ module.exports = FilterTiles; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var CalculateFacesWithin = __webpack_require__(41); var SetTileCollision = __webpack_require__(67); @@ -128168,7 +129842,7 @@ module.exports = Fill; /***/ }), -/* 672 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128218,7 +129892,7 @@ var CullTiles = function (layer, camera, outputArray) var drawTop = 0; var drawBottom = mapHeight; - if (!tilemapLayer.skipCull) + if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1) { // Camera world view bounds, snapped for scaled tile size // Cull Padding values are given in tiles, not pixels @@ -128259,7 +129933,7 @@ module.exports = CullTiles; /***/ }), -/* 673 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128270,7 +129944,7 @@ module.exports = CullTiles; var TileToWorldX = __webpack_require__(141); var TileToWorldY = __webpack_require__(140); -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var ReplaceByIndex = __webpack_require__(326); /** @@ -128347,7 +130021,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 674 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128356,7 +130030,7 @@ module.exports = CreateFromTiles; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTilesWithin = __webpack_require__(23); +var GetTilesWithin = __webpack_require__(24); var CalculateFacesWithin = __webpack_require__(41); /** @@ -128412,7 +130086,7 @@ module.exports = Copy; /***/ }), -/* 675 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128428,19 +130102,19 @@ module.exports = Copy; module.exports = { Components: __webpack_require__(143), - Parsers: __webpack_require__(645), + Parsers: __webpack_require__(650), - Formats: __webpack_require__(27), + Formats: __webpack_require__(28), ImageCollection: __webpack_require__(319), - ParseToTilemap: __webpack_require__(222), + ParseToTilemap: __webpack_require__(224), Tile: __webpack_require__(66), Tilemap: __webpack_require__(315), - TilemapCreator: __webpack_require__(628), - TilemapFactory: __webpack_require__(627), + TilemapCreator: __webpack_require__(633), + TilemapFactory: __webpack_require__(632), Tileset: __webpack_require__(139), - LayerData: __webpack_require__(105), - MapData: __webpack_require__(104), + LayerData: __webpack_require__(106), + MapData: __webpack_require__(105), ObjectLayer: __webpack_require__(317), DynamicTilemapLayer: __webpack_require__(314), @@ -128450,7 +130124,7 @@ module.exports = { /***/ }), -/* 676 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128465,7 +130139,7 @@ module.exports = { module.exports = { - BitmapMaskPipeline: __webpack_require__(254), + BitmapMaskPipeline: __webpack_require__(256), ForwardDiffuseLightPipeline: __webpack_require__(152), TextureTintPipeline: __webpack_require__(131) @@ -128473,7 +130147,7 @@ module.exports = { /***/ }), -/* 677 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128490,8 +130164,8 @@ module.exports = { Utils: __webpack_require__(21), WebGLPipeline: __webpack_require__(132), - WebGLRenderer: __webpack_require__(256), - Pipelines: __webpack_require__(676), + WebGLRenderer: __webpack_require__(258), + Pipelines: __webpack_require__(681), // Constants BYTE: 0, @@ -128504,7 +130178,7 @@ module.exports = { /***/ }), -/* 678 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128525,14 +130199,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(258), - WebGL: __webpack_require__(255) + Canvas: __webpack_require__(260), + WebGL: __webpack_require__(257) }; /***/ }), -/* 679 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128547,15 +130221,15 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(259), - GetBlendModes: __webpack_require__(257), - SetTransform: __webpack_require__(118) + CanvasRenderer: __webpack_require__(261), + GetBlendModes: __webpack_require__(259), + SetTransform: __webpack_require__(119) }; /***/ }), -/* 680 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128581,15 +130255,15 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(679), - Snapshot: __webpack_require__(678), - WebGL: __webpack_require__(677) + Canvas: __webpack_require__(684), + Snapshot: __webpack_require__(683), + WebGL: __webpack_require__(682) }; /***/ }), -/* 681 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128609,7 +130283,7 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(227); +var Composite = __webpack_require__(229); var Constraint = __webpack_require__(303); var Common = __webpack_require__(42); @@ -128725,7 +130399,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 682 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129075,7 +130749,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 683 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129084,35 +130758,35 @@ var Common = __webpack_require__(42); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Matter = __webpack_require__(1021); +var Matter = __webpack_require__(1026); Matter.Body = __webpack_require__(74); -Matter.Composite = __webpack_require__(227); -Matter.World = __webpack_require__(681); +Matter.Composite = __webpack_require__(229); +Matter.World = __webpack_require__(686); -Matter.Detector = __webpack_require__(685); -Matter.Grid = __webpack_require__(1020); -Matter.Pairs = __webpack_require__(1019); -Matter.Pair = __webpack_require__(617); -Matter.Query = __webpack_require__(1041); -Matter.Resolver = __webpack_require__(1018); -Matter.SAT = __webpack_require__(684); +Matter.Detector = __webpack_require__(690); +Matter.Grid = __webpack_require__(1025); +Matter.Pairs = __webpack_require__(1024); +Matter.Pair = __webpack_require__(622); +Matter.Query = __webpack_require__(1046); +Matter.Resolver = __webpack_require__(1023); +Matter.SAT = __webpack_require__(689); Matter.Constraint = __webpack_require__(303); Matter.Common = __webpack_require__(42); -Matter.Engine = __webpack_require__(1017); +Matter.Engine = __webpack_require__(1022); Matter.Events = __webpack_require__(304); Matter.Sleeping = __webpack_require__(335); -Matter.Plugin = __webpack_require__(682); +Matter.Plugin = __webpack_require__(687); -Matter.Bodies = __webpack_require__(173); -Matter.Composites = __webpack_require__(1024); +Matter.Bodies = __webpack_require__(174); +Matter.Composites = __webpack_require__(1029); -Matter.Axes = __webpack_require__(687); +Matter.Axes = __webpack_require__(692); Matter.Bounds = __webpack_require__(128); -Matter.Svg = __webpack_require__(1039); -Matter.Vector = __webpack_require__(107); +Matter.Svg = __webpack_require__(1044); +Matter.Vector = __webpack_require__(108); Matter.Vertices = __webpack_require__(129); // aliases @@ -129128,7 +130802,7 @@ module.exports = Matter; /***/ }), -/* 684 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129144,7 +130818,7 @@ var SAT = {}; module.exports = SAT; var Vertices = __webpack_require__(129); -var Vector = __webpack_require__(107); +var Vector = __webpack_require__(108); (function() { @@ -129404,7 +131078,7 @@ var Vector = __webpack_require__(107); /***/ }), -/* 685 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129419,8 +131093,8 @@ var Detector = {}; module.exports = Detector; -var SAT = __webpack_require__(684); -var Pair = __webpack_require__(617); +var SAT = __webpack_require__(689); +var Pair = __webpack_require__(622); var Bounds = __webpack_require__(128); (function() { @@ -129517,7 +131191,7 @@ var Bounds = __webpack_require__(128); /***/ }), -/* 686 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129526,12 +131200,12 @@ var Bounds = __webpack_require__(128); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(173); +var Bodies = __webpack_require__(174); var Body = __webpack_require__(74); var Class = __webpack_require__(0); -var Components = __webpack_require__(618); +var Components = __webpack_require__(623); var GetFastValue = __webpack_require__(1); -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); var Vertices = __webpack_require__(129); /** @@ -129843,7 +131517,7 @@ module.exports = MatterTileBody; /***/ }), -/* 687 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129856,7 +131530,7 @@ var Axes = {}; module.exports = Axes; -var Vector = __webpack_require__(107); +var Vector = __webpack_require__(108); var Common = __webpack_require__(42); (function() { @@ -129913,7 +131587,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 688 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129928,24 +131602,24 @@ var Common = __webpack_require__(42); module.exports = { - Acceleration: __webpack_require__(1073), - BodyScale: __webpack_require__(1072), - BodyType: __webpack_require__(1071), - Bounce: __webpack_require__(1070), - CheckAgainst: __webpack_require__(1069), - Collides: __webpack_require__(1068), - Debug: __webpack_require__(1067), - Friction: __webpack_require__(1066), - Gravity: __webpack_require__(1065), - Offset: __webpack_require__(1064), - SetGameObject: __webpack_require__(1063), - Velocity: __webpack_require__(1062) + Acceleration: __webpack_require__(1078), + BodyScale: __webpack_require__(1077), + BodyType: __webpack_require__(1076), + Bounce: __webpack_require__(1075), + CheckAgainst: __webpack_require__(1074), + Collides: __webpack_require__(1073), + Debug: __webpack_require__(1072), + Friction: __webpack_require__(1071), + Gravity: __webpack_require__(1070), + Offset: __webpack_require__(1069), + SetGameObject: __webpack_require__(1068), + Velocity: __webpack_require__(1067) }; /***/ }), -/* 689 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130032,7 +131706,7 @@ module.exports = SeparateY; /***/ }), -/* 690 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130119,7 +131793,7 @@ module.exports = SeparateX; /***/ }), -/* 691 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -130166,7 +131840,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 692 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130175,7 +131849,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(691); +var ProcessTileSeparationY = __webpack_require__(696); /** * Check the body against the given tile on the Y axis. @@ -130241,7 +131915,7 @@ module.exports = TileCheckY; /***/ }), -/* 693 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -130288,7 +131962,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 694 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130297,7 +131971,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(693); +var ProcessTileSeparationX = __webpack_require__(698); /** * Check the body against the given tile on the X axis. @@ -130363,7 +132037,7 @@ module.exports = TileCheckX; /***/ }), -/* 695 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130372,8 +132046,8 @@ module.exports = TileCheckX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileCheckX = __webpack_require__(694); -var TileCheckY = __webpack_require__(692); +var TileCheckX = __webpack_require__(699); +var TileCheckY = __webpack_require__(697); var TileIntersectsBody = __webpack_require__(339); /** @@ -130476,7 +132150,7 @@ module.exports = SeparateTile; /***/ }), -/* 696 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -130517,7 +132191,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 697 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -130547,7 +132221,7 @@ var Velocity = { */ setVelocity: function (x, y) { - this.body.velocity.set(x, y); + this.body.setVelocity(x, y); return this; }, @@ -130564,7 +132238,7 @@ var Velocity = { */ setVelocityX: function (x) { - this.body.velocity.x = x; + this.body.setVelocityX(x); return this; }, @@ -130581,7 +132255,7 @@ var Velocity = { */ setVelocityY: function (y) { - this.body.velocity.y = y; + this.body.setVelocityY(y); return this; }, @@ -130610,7 +132284,7 @@ module.exports = Velocity; /***/ }), -/* 698 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -130689,7 +132363,7 @@ module.exports = Size; /***/ }), -/* 699 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -130729,7 +132403,7 @@ module.exports = Mass; /***/ }), -/* 700 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -130771,7 +132445,7 @@ module.exports = Immovable; /***/ }), -/* 701 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -130846,7 +132520,7 @@ module.exports = Gravity; /***/ }), -/* 702 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -130921,7 +132595,7 @@ module.exports = Friction; /***/ }), -/* 703 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -131031,7 +132705,7 @@ module.exports = Enable; /***/ }), -/* 704 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -131123,7 +132797,7 @@ module.exports = Drag; /***/ }), -/* 705 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -131247,7 +132921,7 @@ module.exports = Debug; /***/ }), -/* 706 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -131339,7 +133013,7 @@ module.exports = Bounce; /***/ }), -/* 707 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -131413,7 +133087,7 @@ module.exports = Angular; /***/ }), -/* 708 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -131488,7 +133162,7 @@ module.exports = Acceleration; /***/ }), -/* 709 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131502,7 +133176,7 @@ var DegToRad = __webpack_require__(39); var DistanceBetween = __webpack_require__(58); var Factory = __webpack_require__(349); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(95); +var Merge = __webpack_require__(96); var PluginCache = __webpack_require__(10); var Vector2 = __webpack_require__(4); var World = __webpack_require__(344); @@ -131998,7 +133672,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 710 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132023,7 +133697,7 @@ var Extend = __webpack_require__(17); var Arcade = { - ArcadePhysics: __webpack_require__(709), + ArcadePhysics: __webpack_require__(714), Body: __webpack_require__(343), Collider: __webpack_require__(342), Factory: __webpack_require__(349), @@ -132043,7 +133717,7 @@ module.exports = Arcade; /***/ }), -/* 711 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -132073,7 +133747,7 @@ module.exports = Within; /***/ }), -/* 712 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -132134,7 +133808,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 713 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -132169,7 +133843,7 @@ module.exports = RoundTo; /***/ }), -/* 714 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -132209,7 +133883,7 @@ module.exports = RandomXY; /***/ }), -/* 715 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -132268,7 +133942,7 @@ module.exports = Percent; /***/ }), -/* 716 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -132298,7 +133972,7 @@ module.exports = MinSub; /***/ }), -/* 717 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -132328,7 +134002,7 @@ module.exports = MaxAdd; /***/ }), -/* 718 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -132357,7 +134031,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 719 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -132388,7 +134062,7 @@ module.exports = IsEven; /***/ }), -/* 720 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -132417,7 +134091,7 @@ module.exports = GetSpeed; /***/ }), -/* 721 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -132454,7 +134128,7 @@ module.exports = FloorTo; /***/ }), -/* 722 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -132483,7 +134157,7 @@ module.exports = Difference; /***/ }), -/* 723 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -132520,7 +134194,7 @@ module.exports = CeilTo; /***/ }), -/* 724 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -132555,7 +134229,7 @@ module.exports = Average; /***/ }), -/* 725 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -132598,7 +134272,7 @@ module.exports = SnapTo; /***/ }), -/* 726 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132615,13 +134289,13 @@ module.exports = { Ceil: __webpack_require__(351), Floor: __webpack_require__(146), - To: __webpack_require__(725) + To: __webpack_require__(730) }; /***/ }), -/* 727 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -132649,7 +134323,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 728 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132666,13 +134340,13 @@ module.exports = { GetNext: __webpack_require__(414), IsSize: __webpack_require__(84), - IsValue: __webpack_require__(727) + IsValue: __webpack_require__(732) }; /***/ }), -/* 729 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132705,7 +134379,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 730 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132714,7 +134388,7 @@ module.exports = SmootherStepInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(124); +var Linear = __webpack_require__(125); /** * A linear interpolation method. @@ -132751,7 +134425,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 731 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132760,7 +134434,7 @@ module.exports = LinearInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CatmullRom = __webpack_require__(265); +var CatmullRom = __webpack_require__(266); /** * A Catmull-Rom interpolation method. @@ -132808,7 +134482,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 732 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132847,7 +134521,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 733 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132862,19 +134536,19 @@ module.exports = BezierInterpolation; module.exports = { - Bezier: __webpack_require__(732), - CatmullRom: __webpack_require__(731), - CubicBezier: __webpack_require__(523), - Linear: __webpack_require__(730), - QuadraticBezier: __webpack_require__(519), - SmoothStep: __webpack_require__(252), - SmootherStep: __webpack_require__(729) + Bezier: __webpack_require__(737), + CatmullRom: __webpack_require__(736), + CubicBezier: __webpack_require__(528), + Linear: __webpack_require__(735), + QuadraticBezier: __webpack_require__(524), + SmoothStep: __webpack_require__(254), + SmootherStep: __webpack_require__(734) }; /***/ }), -/* 734 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -132905,7 +134579,7 @@ module.exports = Floor; /***/ }), -/* 735 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -132936,7 +134610,7 @@ module.exports = Ceil; /***/ }), -/* 736 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132951,9 +134625,9 @@ module.exports = Ceil; module.exports = { - Ceil: __webpack_require__(735), + Ceil: __webpack_require__(740), Equal: __webpack_require__(356), - Floor: __webpack_require__(734), + Floor: __webpack_require__(739), GreaterThan: __webpack_require__(355), LessThan: __webpack_require__(354) @@ -132961,7 +134635,7 @@ module.exports = { /***/ }), -/* 737 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132976,24 +134650,24 @@ module.exports = { module.exports = { - Back: __webpack_require__(282), - Bounce: __webpack_require__(281), - Circular: __webpack_require__(280), - Cubic: __webpack_require__(279), - Elastic: __webpack_require__(278), - Expo: __webpack_require__(277), - Linear: __webpack_require__(276), - Quadratic: __webpack_require__(275), - Quartic: __webpack_require__(274), - Quintic: __webpack_require__(273), - Sine: __webpack_require__(272), - Stepped: __webpack_require__(271) + Back: __webpack_require__(283), + Bounce: __webpack_require__(282), + Circular: __webpack_require__(281), + Cubic: __webpack_require__(280), + Elastic: __webpack_require__(279), + Expo: __webpack_require__(278), + Linear: __webpack_require__(277), + Quadratic: __webpack_require__(276), + Quartic: __webpack_require__(275), + Quintic: __webpack_require__(274), + Sine: __webpack_require__(273), + Stepped: __webpack_require__(272) }; /***/ }), -/* 738 */ +/* 743 */ /***/ (function(module, exports) { /** @@ -133027,7 +134701,7 @@ module.exports = DistanceSquared; /***/ }), -/* 739 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -133061,7 +134735,7 @@ module.exports = DistancePower; /***/ }), -/* 740 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133077,14 +134751,14 @@ module.exports = DistancePower; module.exports = { Between: __webpack_require__(58), - Power: __webpack_require__(739), - Squared: __webpack_require__(738) + Power: __webpack_require__(744), + Squared: __webpack_require__(743) }; /***/ }), -/* 741 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -133133,7 +134807,7 @@ module.exports = ShortestBetween; /***/ }), -/* 742 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133200,7 +134874,7 @@ module.exports = RotateTo; /***/ }), -/* 743 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133230,7 +134904,7 @@ module.exports = Reverse; /***/ }), -/* 744 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -133262,7 +134936,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 745 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -133293,7 +134967,7 @@ module.exports = BetweenPoints; /***/ }), -/* 746 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -133327,7 +135001,7 @@ module.exports = BetweenY; /***/ }), -/* 747 */ +/* 752 */ /***/ (function(module, exports) { /** @@ -133358,7 +135032,7 @@ module.exports = Between; /***/ }), -/* 748 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133373,22 +135047,22 @@ module.exports = Between; module.exports = { - Between: __webpack_require__(747), - BetweenY: __webpack_require__(746), - BetweenPoints: __webpack_require__(745), - BetweenPointsY: __webpack_require__(744), - Reverse: __webpack_require__(743), - RotateTo: __webpack_require__(742), - ShortestBetween: __webpack_require__(741), + Between: __webpack_require__(752), + BetweenY: __webpack_require__(751), + BetweenPoints: __webpack_require__(750), + BetweenPointsY: __webpack_require__(749), + Reverse: __webpack_require__(748), + RotateTo: __webpack_require__(747), + ShortestBetween: __webpack_require__(746), Normalize: __webpack_require__(357), - Wrap: __webpack_require__(218), - WrapDegrees: __webpack_require__(217) + Wrap: __webpack_require__(220), + WrapDegrees: __webpack_require__(219) }; /***/ }), -/* 749 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133407,61 +135081,61 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(748), - Distance: __webpack_require__(740), - Easing: __webpack_require__(737), - Fuzzy: __webpack_require__(736), - Interpolation: __webpack_require__(733), - Pow2: __webpack_require__(728), - Snap: __webpack_require__(726), + Angle: __webpack_require__(753), + Distance: __webpack_require__(745), + Easing: __webpack_require__(742), + Fuzzy: __webpack_require__(741), + Interpolation: __webpack_require__(738), + Pow2: __webpack_require__(733), + Snap: __webpack_require__(731), // Expose the RNG Class RandomDataGenerator: __webpack_require__(300), // Single functions - Average: __webpack_require__(724), + Average: __webpack_require__(729), Bernstein: __webpack_require__(353), - Between: __webpack_require__(153), - CatmullRom: __webpack_require__(265), - CeilTo: __webpack_require__(723), + Between: __webpack_require__(154), + CatmullRom: __webpack_require__(266), + CeilTo: __webpack_require__(728), Clamp: __webpack_require__(20), DegToRad: __webpack_require__(39), - Difference: __webpack_require__(722), + Difference: __webpack_require__(727), Factorial: __webpack_require__(352), - FloatBetween: __webpack_require__(243), - FloorTo: __webpack_require__(721), + FloatBetween: __webpack_require__(245), + FloorTo: __webpack_require__(726), FromPercent: __webpack_require__(65), - GetSpeed: __webpack_require__(720), - IsEven: __webpack_require__(719), - IsEvenStrict: __webpack_require__(718), - Linear: __webpack_require__(124), - MaxAdd: __webpack_require__(717), - MinSub: __webpack_require__(716), - Percent: __webpack_require__(715), - RadToDeg: __webpack_require__(154), - RandomXY: __webpack_require__(714), - RandomXYZ: __webpack_require__(534), - RandomXYZW: __webpack_require__(533), + GetSpeed: __webpack_require__(725), + IsEven: __webpack_require__(724), + IsEvenStrict: __webpack_require__(723), + Linear: __webpack_require__(125), + MaxAdd: __webpack_require__(722), + MinSub: __webpack_require__(721), + Percent: __webpack_require__(720), + RadToDeg: __webpack_require__(155), + RandomXY: __webpack_require__(719), + RandomXYZ: __webpack_require__(539), + RandomXYZW: __webpack_require__(538), Rotate: __webpack_require__(350), RotateAround: __webpack_require__(295), RotateAroundDistance: __webpack_require__(291), - RoundAwayFromZero: __webpack_require__(249), - RoundTo: __webpack_require__(713), - SinCosTableGenerator: __webpack_require__(712), + RoundAwayFromZero: __webpack_require__(251), + RoundTo: __webpack_require__(718), + SinCosTableGenerator: __webpack_require__(717), SmootherStep: __webpack_require__(290), - SmoothStep: __webpack_require__(159), - TransformXY: __webpack_require__(251), - Within: __webpack_require__(711), + SmoothStep: __webpack_require__(160), + TransformXY: __webpack_require__(253), + Within: __webpack_require__(716), Wrap: __webpack_require__(40), // Vector classes Vector2: __webpack_require__(4), Vector3: __webpack_require__(87), - Vector4: __webpack_require__(155), - Matrix3: __webpack_require__(530), - Matrix4: __webpack_require__(269), - Quaternion: __webpack_require__(531), - RotateVec3: __webpack_require__(532) + Vector4: __webpack_require__(156), + Matrix3: __webpack_require__(535), + Matrix4: __webpack_require__(270), + Quaternion: __webpack_require__(536), + RotateVec3: __webpack_require__(537) }; @@ -133475,7 +135149,7 @@ module.exports = PhaserMath; /***/ }), -/* 750 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133490,7 +135164,7 @@ var GetFastValue = __webpack_require__(1); var ImageFile = __webpack_require__(38); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(37); -var TextFile = __webpack_require__(230); +var TextFile = __webpack_require__(232); /** * @typedef {object} Phaser.Loader.FileTypes.UnityAtlasFileConfig @@ -133727,7 +135401,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 751 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133738,8 +135412,8 @@ module.exports = UnityAtlasFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); -var TILEMAP_FORMATS = __webpack_require__(27); +var JSONFile = __webpack_require__(29); +var TILEMAP_FORMATS = __webpack_require__(28); /** * @typedef {object} Phaser.Loader.FileTypes.TilemapJSONFileConfig @@ -133892,7 +135566,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 752 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133903,8 +135577,8 @@ module.exports = TilemapJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); -var TILEMAP_FORMATS = __webpack_require__(27); +var JSONFile = __webpack_require__(29); +var TILEMAP_FORMATS = __webpack_require__(28); /** * @typedef {object} Phaser.Loader.FileTypes.TilemapImpactFileConfig @@ -134057,7 +135731,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 753 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134072,7 +135746,7 @@ var File = __webpack_require__(19); var FileTypesManager = __webpack_require__(6); var GetFastValue = __webpack_require__(1); var IsPlainObject = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(27); +var TILEMAP_FORMATS = __webpack_require__(28); /** * @typedef {object} Phaser.Loader.FileTypes.TilemapCSVFileConfig @@ -134261,7 +135935,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 754 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134503,7 +136177,7 @@ module.exports = SVGFile; /***/ }), -/* 755 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134720,7 +136394,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 756 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134732,7 +136406,7 @@ module.exports = ScenePluginFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var FileTypesManager = __webpack_require__(6); -var JSONFile = __webpack_require__(28); +var JSONFile = __webpack_require__(29); /** * @typedef {object} Phaser.Loader.FileTypes.PackFileConfig @@ -134948,7 +136622,7 @@ module.exports = PackFile; /***/ }), -/* 757 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135217,7 +136891,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 758 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135401,7 +137075,7 @@ module.exports = HTMLFile; /***/ }), -/* 759 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135586,7 +137260,7 @@ module.exports = GLSLFile; /***/ }), -/* 760 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135842,7 +137516,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 761 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136034,7 +137708,7 @@ module.exports = BinaryFile; /***/ }), -/* 762 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136289,7 +137963,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 763 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136306,36 +137980,36 @@ module.exports = { AnimationJSONFile: __webpack_require__(365), AtlasJSONFile: __webpack_require__(364), - AtlasXMLFile: __webpack_require__(762), - AudioFile: __webpack_require__(175), + AtlasXMLFile: __webpack_require__(767), + AudioFile: __webpack_require__(176), AudioSpriteFile: __webpack_require__(363), - BinaryFile: __webpack_require__(761), - BitmapFontFile: __webpack_require__(760), - GLSLFile: __webpack_require__(759), - HTML5AudioFile: __webpack_require__(174), - HTMLFile: __webpack_require__(758), - HTMLTextureFile: __webpack_require__(757), + BinaryFile: __webpack_require__(766), + BitmapFontFile: __webpack_require__(765), + GLSLFile: __webpack_require__(764), + HTML5AudioFile: __webpack_require__(175), + HTMLFile: __webpack_require__(763), + HTMLTextureFile: __webpack_require__(762), ImageFile: __webpack_require__(38), - JSONFile: __webpack_require__(28), + JSONFile: __webpack_require__(29), MultiAtlasFile: __webpack_require__(362), - PackFile: __webpack_require__(756), + PackFile: __webpack_require__(761), PluginFile: __webpack_require__(361), - ScenePluginFile: __webpack_require__(755), + ScenePluginFile: __webpack_require__(760), ScriptFile: __webpack_require__(360), SpriteSheetFile: __webpack_require__(359), - SVGFile: __webpack_require__(754), - TextFile: __webpack_require__(230), - TilemapCSVFile: __webpack_require__(753), - TilemapImpactFile: __webpack_require__(752), - TilemapJSONFile: __webpack_require__(751), - UnityAtlasFile: __webpack_require__(750), + SVGFile: __webpack_require__(759), + TextFile: __webpack_require__(232), + TilemapCSVFile: __webpack_require__(758), + TilemapImpactFile: __webpack_require__(757), + TilemapJSONFile: __webpack_require__(756), + UnityAtlasFile: __webpack_require__(755), XMLFile: __webpack_require__(145) }; /***/ }), -/* 764 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136353,15 +138027,15 @@ var Extend = __webpack_require__(17); var Loader = { - FileTypes: __webpack_require__(763), + FileTypes: __webpack_require__(768), File: __webpack_require__(19), FileTypesManager: __webpack_require__(6), - GetURL: __webpack_require__(109), + GetURL: __webpack_require__(110), LoaderPlugin: __webpack_require__(358), - MergeXHRSettings: __webpack_require__(108), + MergeXHRSettings: __webpack_require__(109), MultiFile: __webpack_require__(37), - XHRLoader: __webpack_require__(176), + XHRLoader: __webpack_require__(177), XHRSettings: __webpack_require__(75) }; @@ -136373,7 +138047,7 @@ module.exports = Loader; /***/ }), -/* 765 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136382,7 +138056,7 @@ module.exports = Loader; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(231); +var RotateAroundXY = __webpack_require__(233); /** * [description] @@ -136407,7 +138081,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 766 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136416,7 +138090,7 @@ module.exports = RotateAroundPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(231); +var RotateAroundXY = __webpack_require__(233); var InCenter = __webpack_require__(389); /** @@ -136443,7 +138117,7 @@ module.exports = Rotate; /***/ }), -/* 767 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136479,7 +138153,7 @@ module.exports = Perimeter; /***/ }), -/* 768 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -136515,7 +138189,7 @@ module.exports = Equals; /***/ }), -/* 769 */ +/* 774 */ /***/ (function(module, exports) { /** @@ -136546,7 +138220,7 @@ module.exports = CopyFrom; /***/ }), -/* 770 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136577,7 +138251,7 @@ module.exports = ContainsPoint; /***/ }), -/* 771 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136607,7 +138281,7 @@ module.exports = Clone; /***/ }), -/* 772 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136616,7 +138290,7 @@ module.exports = Clone; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); // Adapted from https://gist.github.com/mutoo/5617691 @@ -136690,7 +138364,7 @@ module.exports = CircumCircle; /***/ }), -/* 773 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136766,7 +138440,7 @@ module.exports = CircumCenter; /***/ }), -/* 774 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136819,7 +138493,7 @@ module.exports = CenterOn; /***/ }), -/* 775 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136868,7 +138542,7 @@ module.exports = BuildRight; /***/ }), -/* 776 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136877,7 +138551,7 @@ module.exports = BuildRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EarCut = __webpack_require__(253); +var EarCut = __webpack_require__(255); var Triangle = __webpack_require__(68); /** @@ -136943,7 +138617,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 777 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136993,7 +138667,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 778 */ +/* 783 */ /***/ (function(module, exports) { /** @@ -137032,7 +138706,7 @@ module.exports = Area; /***/ }), -/* 779 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137043,36 +138717,36 @@ module.exports = Area; var Triangle = __webpack_require__(68); -Triangle.Area = __webpack_require__(778); -Triangle.BuildEquilateral = __webpack_require__(777); -Triangle.BuildFromPolygon = __webpack_require__(776); -Triangle.BuildRight = __webpack_require__(775); -Triangle.CenterOn = __webpack_require__(774); +Triangle.Area = __webpack_require__(783); +Triangle.BuildEquilateral = __webpack_require__(782); +Triangle.BuildFromPolygon = __webpack_require__(781); +Triangle.BuildRight = __webpack_require__(780); +Triangle.CenterOn = __webpack_require__(779); Triangle.Centroid = __webpack_require__(391); -Triangle.CircumCenter = __webpack_require__(773); -Triangle.CircumCircle = __webpack_require__(772); -Triangle.Clone = __webpack_require__(771); +Triangle.CircumCenter = __webpack_require__(778); +Triangle.CircumCircle = __webpack_require__(777); +Triangle.Clone = __webpack_require__(776); Triangle.Contains = __webpack_require__(61); -Triangle.ContainsArray = __webpack_require__(237); -Triangle.ContainsPoint = __webpack_require__(770); -Triangle.CopyFrom = __webpack_require__(769); +Triangle.ContainsArray = __webpack_require__(239); +Triangle.ContainsPoint = __webpack_require__(775); +Triangle.CopyFrom = __webpack_require__(774); Triangle.Decompose = __webpack_require__(398); -Triangle.Equals = __webpack_require__(768); -Triangle.GetPoint = __webpack_require__(233); -Triangle.GetPoints = __webpack_require__(232); +Triangle.Equals = __webpack_require__(773); +Triangle.GetPoint = __webpack_require__(235); +Triangle.GetPoints = __webpack_require__(234); Triangle.InCenter = __webpack_require__(389); -Triangle.Perimeter = __webpack_require__(767); +Triangle.Perimeter = __webpack_require__(772); Triangle.Offset = __webpack_require__(390); -Triangle.Random = __webpack_require__(160); -Triangle.Rotate = __webpack_require__(766); -Triangle.RotateAroundPoint = __webpack_require__(765); -Triangle.RotateAroundXY = __webpack_require__(231); +Triangle.Random = __webpack_require__(161); +Triangle.Rotate = __webpack_require__(771); +Triangle.RotateAroundPoint = __webpack_require__(770); +Triangle.RotateAroundXY = __webpack_require__(233); module.exports = Triangle; /***/ }), -/* 780 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -137111,7 +138785,7 @@ module.exports = Scale; /***/ }), -/* 781 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137120,7 +138794,7 @@ module.exports = Scale; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Between = __webpack_require__(153); +var Between = __webpack_require__(154); var ContainsRect = __webpack_require__(392); var Point = __webpack_require__(5); @@ -137182,7 +138856,7 @@ module.exports = RandomOutside; /***/ }), -/* 782 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137239,7 +138913,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 783 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -137273,7 +138947,7 @@ module.exports = Overlaps; /***/ }), -/* 784 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -137307,7 +138981,7 @@ module.exports = OffsetPoint; /***/ }), -/* 785 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -137342,7 +139016,7 @@ module.exports = Offset; /***/ }), -/* 786 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -137386,7 +139060,7 @@ module.exports = MergeXY; /***/ }), -/* 787 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -137432,7 +139106,7 @@ module.exports = MergeRect; /***/ }), -/* 788 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -137484,7 +139158,7 @@ module.exports = MergePoints; /***/ }), -/* 789 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137494,7 +139168,7 @@ module.exports = MergePoints; */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(238); +var Intersects = __webpack_require__(240); /** * Takes two Rectangles and first checks to see if they intersect. @@ -137535,7 +139209,7 @@ module.exports = Intersection; /***/ }), -/* 790 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137544,7 +139218,7 @@ module.exports = Intersection; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(157); +var CenterOn = __webpack_require__(158); // Increases the size of the Rectangle object by the specified amounts. // The center point of the Rectangle object stays the same, and its size increases @@ -137578,7 +139252,7 @@ module.exports = Inflate; /***/ }), -/* 791 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137619,7 +139293,7 @@ module.exports = GetSize; /***/ }), -/* 792 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137659,7 +139333,7 @@ module.exports = GetCenter; /***/ }), -/* 793 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -137694,7 +139368,7 @@ module.exports = FloorAll; /***/ }), -/* 794 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -137727,7 +139401,7 @@ module.exports = Floor; /***/ }), -/* 795 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137736,7 +139410,7 @@ module.exports = Floor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(234); +var GetAspectRatio = __webpack_require__(236); // Fits the target rectangle around the source rectangle. // Preserves aspect ration. @@ -137780,7 +139454,7 @@ module.exports = FitOutside; /***/ }), -/* 796 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137789,7 +139463,7 @@ module.exports = FitOutside; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(234); +var GetAspectRatio = __webpack_require__(236); // Fits the target rectangle into the source rectangle. // Preserves aspect ratio. @@ -137833,7 +139507,7 @@ module.exports = FitInside; /***/ }), -/* 797 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -137867,7 +139541,7 @@ module.exports = Equals; /***/ }), -/* 798 */ +/* 803 */ /***/ (function(module, exports) { /** @@ -137898,7 +139572,7 @@ module.exports = CopyFrom; /***/ }), -/* 799 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137907,7 +139581,7 @@ module.exports = CopyFrom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(31); +var Contains = __webpack_require__(32); /** * [description] @@ -137929,7 +139603,7 @@ module.exports = ContainsPoint; /***/ }), -/* 800 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137959,7 +139633,7 @@ module.exports = Clone; /***/ }), -/* 801 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -137994,7 +139668,7 @@ module.exports = CeilAll; /***/ }), -/* 802 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -138027,7 +139701,7 @@ module.exports = Ceil; /***/ }), -/* 803 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -138055,7 +139729,7 @@ module.exports = Area; /***/ }), -/* 804 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -138096,7 +139770,7 @@ module.exports = GetNumberArray; /***/ }), -/* 805 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138152,7 +139826,7 @@ module.exports = GetAABB; /***/ }), -/* 806 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138161,7 +139835,7 @@ module.exports = GetAABB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(235); +var Contains = __webpack_require__(237); /** * [description] @@ -138183,7 +139857,7 @@ module.exports = ContainsPoint; /***/ }), -/* 807 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138213,7 +139887,7 @@ module.exports = Clone; /***/ }), -/* 808 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138224,17 +139898,17 @@ module.exports = Clone; var Polygon = __webpack_require__(394); -Polygon.Clone = __webpack_require__(807); -Polygon.Contains = __webpack_require__(235); -Polygon.ContainsPoint = __webpack_require__(806); -Polygon.GetAABB = __webpack_require__(805); -Polygon.GetNumberArray = __webpack_require__(804); +Polygon.Clone = __webpack_require__(812); +Polygon.Contains = __webpack_require__(237); +Polygon.ContainsPoint = __webpack_require__(811); +Polygon.GetAABB = __webpack_require__(810); +Polygon.GetNumberArray = __webpack_require__(809); module.exports = Polygon; /***/ }), -/* 809 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138278,7 +139952,7 @@ module.exports = SetMagnitude; /***/ }), -/* 810 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138322,7 +139996,7 @@ module.exports = ProjectUnit; /***/ }), -/* 811 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138368,7 +140042,7 @@ module.exports = Project; /***/ }), -/* 812 */ +/* 817 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138403,7 +140077,7 @@ module.exports = Negative; /***/ }), -/* 813 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -138433,7 +140107,7 @@ module.exports = Invert; /***/ }), -/* 814 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138474,7 +140148,7 @@ module.exports = Interpolate; /***/ }), -/* 815 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138544,7 +140218,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 816 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138607,7 +140281,7 @@ module.exports = GetCentroid; /***/ }), -/* 817 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -138637,7 +140311,7 @@ module.exports = Floor; /***/ }), -/* 818 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -138666,7 +140340,7 @@ module.exports = Equals; /***/ }), -/* 819 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -138697,7 +140371,7 @@ module.exports = CopyFrom; /***/ }), -/* 820 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138727,7 +140401,7 @@ module.exports = Clone; /***/ }), -/* 821 */ +/* 826 */ /***/ (function(module, exports) { /** @@ -138757,7 +140431,7 @@ module.exports = Ceil; /***/ }), -/* 822 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138768,27 +140442,27 @@ module.exports = Ceil; var Point = __webpack_require__(5); -Point.Ceil = __webpack_require__(821); -Point.Clone = __webpack_require__(820); -Point.CopyFrom = __webpack_require__(819); -Point.Equals = __webpack_require__(818); -Point.Floor = __webpack_require__(817); -Point.GetCentroid = __webpack_require__(816); +Point.Ceil = __webpack_require__(826); +Point.Clone = __webpack_require__(825); +Point.CopyFrom = __webpack_require__(824); +Point.Equals = __webpack_require__(823); +Point.Floor = __webpack_require__(822); +Point.GetCentroid = __webpack_require__(821); Point.GetMagnitude = __webpack_require__(396); Point.GetMagnitudeSq = __webpack_require__(395); -Point.GetRectangleFromPoints = __webpack_require__(815); -Point.Interpolate = __webpack_require__(814); -Point.Invert = __webpack_require__(813); -Point.Negative = __webpack_require__(812); -Point.Project = __webpack_require__(811); -Point.ProjectUnit = __webpack_require__(810); -Point.SetMagnitude = __webpack_require__(809); +Point.GetRectangleFromPoints = __webpack_require__(820); +Point.Interpolate = __webpack_require__(819); +Point.Invert = __webpack_require__(818); +Point.Negative = __webpack_require__(817); +Point.Project = __webpack_require__(816); +Point.ProjectUnit = __webpack_require__(815); +Point.SetMagnitude = __webpack_require__(814); module.exports = Point; /***/ }), -/* 823 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -138816,7 +140490,7 @@ module.exports = Width; /***/ }), -/* 824 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -138844,7 +140518,7 @@ module.exports = Slope; /***/ }), -/* 825 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -138884,7 +140558,7 @@ module.exports = SetToAngle; /***/ }), -/* 826 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138893,7 +140567,7 @@ module.exports = SetToAngle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(236); +var RotateAroundXY = __webpack_require__(238); /** * Rotate a line around a point by the given angle in radians. @@ -138918,7 +140592,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 827 */ +/* 832 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138927,7 +140601,7 @@ module.exports = RotateAroundPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(236); +var RotateAroundXY = __webpack_require__(238); /** * Rotate a line around its midpoint by the given angle in radians. @@ -138954,7 +140628,7 @@ module.exports = Rotate; /***/ }), -/* 828 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138988,7 +140662,7 @@ module.exports = ReflectAngle; /***/ }), -/* 829 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -139016,7 +140690,7 @@ module.exports = PerpSlope; /***/ }), -/* 830 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -139054,7 +140728,7 @@ module.exports = Offset; /***/ }), -/* 831 */ +/* 836 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139085,7 +140759,7 @@ module.exports = NormalY; /***/ }), -/* 832 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139116,7 +140790,7 @@ module.exports = NormalX; /***/ }), -/* 833 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -139144,7 +140818,7 @@ module.exports = Height; /***/ }), -/* 834 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139188,7 +140862,7 @@ module.exports = GetNormal; /***/ }), -/* 835 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139226,7 +140900,7 @@ module.exports = GetMidPoint; /***/ }), -/* 836 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -139260,7 +140934,7 @@ module.exports = Equals; /***/ }), -/* 837 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -139291,7 +140965,7 @@ module.exports = CopyFrom; /***/ }), -/* 838 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139300,7 +140974,7 @@ module.exports = CopyFrom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(97); +var Line = __webpack_require__(98); /** * Clone the given line. @@ -139321,7 +140995,7 @@ module.exports = Clone; /***/ }), -/* 839 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -139361,7 +141035,7 @@ module.exports = CenterOn; /***/ }), -/* 840 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139370,39 +141044,39 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(97); +var Line = __webpack_require__(98); Line.Angle = __webpack_require__(82); -Line.BresenhamPoints = __webpack_require__(576); -Line.CenterOn = __webpack_require__(839); -Line.Clone = __webpack_require__(838); -Line.CopyFrom = __webpack_require__(837); -Line.Equals = __webpack_require__(836); -Line.GetMidPoint = __webpack_require__(835); -Line.GetNormal = __webpack_require__(834); +Line.BresenhamPoints = __webpack_require__(581); +Line.CenterOn = __webpack_require__(844); +Line.Clone = __webpack_require__(843); +Line.CopyFrom = __webpack_require__(842); +Line.Equals = __webpack_require__(841); +Line.GetMidPoint = __webpack_require__(840); +Line.GetNormal = __webpack_require__(839); Line.GetPoint = __webpack_require__(296); -Line.GetPoints = __webpack_require__(163); -Line.Height = __webpack_require__(833); +Line.GetPoints = __webpack_require__(164); +Line.Height = __webpack_require__(838); Line.Length = __webpack_require__(71); Line.NormalAngle = __webpack_require__(397); -Line.NormalX = __webpack_require__(832); -Line.NormalY = __webpack_require__(831); -Line.Offset = __webpack_require__(830); -Line.PerpSlope = __webpack_require__(829); -Line.Random = __webpack_require__(162); -Line.ReflectAngle = __webpack_require__(828); -Line.Rotate = __webpack_require__(827); -Line.RotateAroundPoint = __webpack_require__(826); -Line.RotateAroundXY = __webpack_require__(236); -Line.SetToAngle = __webpack_require__(825); -Line.Slope = __webpack_require__(824); -Line.Width = __webpack_require__(823); +Line.NormalX = __webpack_require__(837); +Line.NormalY = __webpack_require__(836); +Line.Offset = __webpack_require__(835); +Line.PerpSlope = __webpack_require__(834); +Line.Random = __webpack_require__(163); +Line.ReflectAngle = __webpack_require__(833); +Line.Rotate = __webpack_require__(832); +Line.RotateAroundPoint = __webpack_require__(831); +Line.RotateAroundXY = __webpack_require__(238); +Line.SetToAngle = __webpack_require__(830); +Line.Slope = __webpack_require__(829); +Line.Width = __webpack_require__(828); module.exports = Line; /***/ }), -/* 841 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139411,7 +141085,7 @@ module.exports = Line; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ContainsArray = __webpack_require__(237); +var ContainsArray = __webpack_require__(239); var Decompose = __webpack_require__(398); var LineToLine = __webpack_require__(147); @@ -139490,7 +141164,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 842 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139544,7 +141218,7 @@ module.exports = TriangleToLine; /***/ }), -/* 843 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139607,7 +141281,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 844 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -139647,7 +141321,7 @@ module.exports = RectangleToValues; /***/ }), -/* 845 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139657,8 +141331,8 @@ module.exports = RectangleToValues; */ var LineToLine = __webpack_require__(147); -var Contains = __webpack_require__(31); -var ContainsArray = __webpack_require__(237); +var Contains = __webpack_require__(32); +var ContainsArray = __webpack_require__(239); var Decompose = __webpack_require__(399); /** @@ -139740,7 +141414,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 846 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139781,7 +141455,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 847 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -139882,7 +141556,7 @@ module.exports = LineToRectangle; /***/ }), -/* 848 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139892,7 +141566,7 @@ module.exports = LineToRectangle; */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(238); +var RectangleToRectangle = __webpack_require__(240); /** * [description] @@ -139927,7 +141601,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 849 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -139981,7 +141655,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 850 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140012,7 +141686,7 @@ module.exports = CircleToCircle; /***/ }), -/* 851 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -140046,7 +141720,7 @@ module.exports = OffsetPoint; /***/ }), -/* 852 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -140081,7 +141755,7 @@ module.exports = Offset; /***/ }), -/* 853 */ +/* 858 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140121,7 +141795,7 @@ module.exports = GetBounds; /***/ }), -/* 854 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -140155,7 +141829,7 @@ module.exports = Equals; /***/ }), -/* 855 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -140187,7 +141861,7 @@ module.exports = CopyFrom; /***/ }), -/* 856 */ +/* 861 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140223,7 +141897,7 @@ module.exports = ContainsRect; /***/ }), -/* 857 */ +/* 862 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140254,7 +141928,7 @@ module.exports = ContainsPoint; /***/ }), -/* 858 */ +/* 863 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140263,7 +141937,7 @@ module.exports = ContainsPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); /** * Creates a new Circle instance based on the values contained in the given source. @@ -140284,7 +141958,7 @@ module.exports = Clone; /***/ }), -/* 859 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -140312,7 +141986,7 @@ module.exports = Area; /***/ }), -/* 860 */ +/* 865 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140321,29 +141995,29 @@ module.exports = Area; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circle = __webpack_require__(88); +var Circle = __webpack_require__(89); -Circle.Area = __webpack_require__(859); +Circle.Area = __webpack_require__(864); Circle.Circumference = __webpack_require__(298); Circle.CircumferencePoint = __webpack_require__(138); -Circle.Clone = __webpack_require__(858); +Circle.Clone = __webpack_require__(863); Circle.Contains = __webpack_require__(33); -Circle.ContainsPoint = __webpack_require__(857); -Circle.ContainsRect = __webpack_require__(856); -Circle.CopyFrom = __webpack_require__(855); -Circle.Equals = __webpack_require__(854); -Circle.GetBounds = __webpack_require__(853); +Circle.ContainsPoint = __webpack_require__(862); +Circle.ContainsRect = __webpack_require__(861); +Circle.CopyFrom = __webpack_require__(860); +Circle.Equals = __webpack_require__(859); +Circle.GetBounds = __webpack_require__(858); Circle.GetPoint = __webpack_require__(301); Circle.GetPoints = __webpack_require__(299); -Circle.Offset = __webpack_require__(852); -Circle.OffsetPoint = __webpack_require__(851); -Circle.Random = __webpack_require__(164); +Circle.Offset = __webpack_require__(857); +Circle.OffsetPoint = __webpack_require__(856); +Circle.Random = __webpack_require__(165); module.exports = Circle; /***/ }), -/* 861 */ +/* 866 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140458,7 +142132,7 @@ module.exports = LightsPlugin; /***/ }), -/* 862 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140468,9 +142142,9 @@ module.exports = LightsPlugin; */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Quad = __webpack_require__(239); +var Quad = __webpack_require__(241); /** * Creates a new Quad Game Object and returns it. @@ -140508,7 +142182,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 863 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140518,7 +142192,7 @@ GameObjectCreator.register('quad', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var GetValue = __webpack_require__(3); var Mesh = __webpack_require__(148); @@ -140563,7 +142237,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 864 */ +/* 869 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140572,7 +142246,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Quad = __webpack_require__(239); +var Quad = __webpack_require__(241); var GameObjectFactory = __webpack_require__(9); /** @@ -140609,7 +142283,7 @@ if (true) /***/ }), -/* 865 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140659,7 +142333,7 @@ if (true) /***/ }), -/* 866 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -140688,7 +142362,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 867 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140806,7 +142480,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 868 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140820,12 +142494,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(867); + renderWebGL = __webpack_require__(872); } if (true) { - renderCanvas = __webpack_require__(866); + renderCanvas = __webpack_require__(871); } module.exports = { @@ -140837,7 +142511,7 @@ module.exports = { /***/ }), -/* 869 */ +/* 874 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140846,9 +142520,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Zone = __webpack_require__(165); +var Zone = __webpack_require__(166); /** * Creates a new Zone Game Object and returns it. @@ -140876,7 +142550,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 870 */ +/* 875 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140886,9 +142560,9 @@ GameObjectCreator.register('zone', function (config) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var TileSprite = __webpack_require__(240); +var TileSprite = __webpack_require__(242); /** * @typedef {object} TileSprite @@ -140942,7 +142616,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 871 */ +/* 876 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140953,7 +142627,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var BitmapText = __webpack_require__(149); var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var GetValue = __webpack_require__(3); @@ -140995,7 +142669,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 872 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141006,9 +142680,9 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) var BuildGameObject = __webpack_require__(25); var BuildGameObjectAnimation = __webpack_require__(130); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var Sprite3D = __webpack_require__(156); +var Sprite3D = __webpack_require__(157); /** * Creates a new Sprite3D Game Object and returns it. @@ -141050,7 +142724,7 @@ GameObjectCreator.register('sprite3D', function (config, addToScene) /***/ }), -/* 873 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141060,9 +142734,9 @@ GameObjectCreator.register('sprite3D', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); -var RenderTexture = __webpack_require__(241); +var RenderTexture = __webpack_require__(243); /** * @typedef {object} RenderTextureConfig @@ -141109,7 +142783,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 874 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141118,10 +142792,10 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); var GetFastValue = __webpack_require__(1); -var ParticleEmitterManager = __webpack_require__(242); +var ParticleEmitterManager = __webpack_require__(244); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -141166,7 +142840,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 875 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141175,8 +142849,8 @@ GameObjectCreator.register('particles', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(13); -var Group = __webpack_require__(113); +var GameObjectCreator = __webpack_require__(14); +var Group = __webpack_require__(114); /** * Creates a new Group Game Object and returns it. @@ -141199,7 +142873,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 876 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141208,9 +142882,9 @@ GameObjectCreator.register('group', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(245); +var BitmapText = __webpack_require__(247); var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); /** @@ -141259,7 +142933,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 877 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141270,8 +142944,8 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var BuildGameObject = __webpack_require__(25); -var Container = __webpack_require__(246); -var GameObjectCreator = __webpack_require__(13); +var Container = __webpack_require__(248); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); /** @@ -141308,7 +142982,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 878 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141317,9 +142991,9 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(247); +var Blitter = __webpack_require__(249); var BuildGameObject = __webpack_require__(25); -var GameObjectCreator = __webpack_require__(13); +var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(12); /** @@ -141358,7 +143032,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 879 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141367,7 +143041,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Zone = __webpack_require__(165); +var Zone = __webpack_require__(166); var GameObjectFactory = __webpack_require__(9); /** @@ -141400,7 +143074,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 880 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141409,7 +143083,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileSprite = __webpack_require__(240); +var TileSprite = __webpack_require__(242); var GameObjectFactory = __webpack_require__(9); /** @@ -141444,7 +143118,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 881 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141488,7 +143162,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 882 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141497,7 +143171,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Sprite3D = __webpack_require__(156); +var Sprite3D = __webpack_require__(157); var GameObjectFactory = __webpack_require__(9); /** @@ -141536,7 +143210,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) /***/ }), -/* 883 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141546,7 +143220,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var RenderTexture = __webpack_require__(241); +var RenderTexture = __webpack_require__(243); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -141570,7 +143244,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height) /***/ }), -/* 884 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141618,7 +143292,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 885 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141628,7 +143302,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var ParticleEmitterManager = __webpack_require__(242); +var ParticleEmitterManager = __webpack_require__(244); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -141664,7 +143338,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 886 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141673,7 +143347,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Group = __webpack_require__(113); +var Group = __webpack_require__(114); var GameObjectFactory = __webpack_require__(9); /** @@ -141696,7 +143370,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 887 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141705,7 +143379,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var DynamicBitmapText = __webpack_require__(245); +var DynamicBitmapText = __webpack_require__(247); var GameObjectFactory = __webpack_require__(9); /** @@ -141739,7 +143413,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 888 */ +/* 893 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141780,7 +143454,7 @@ GameObjectFactory.register('dom', function (x, y, element) /***/ }), -/* 889 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141790,7 +143464,7 @@ GameObjectFactory.register('dom', function (x, y, element) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Container = __webpack_require__(246); +var Container = __webpack_require__(248); var GameObjectFactory = __webpack_require__(9); /** @@ -141814,7 +143488,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 890 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141823,7 +143497,7 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(247); +var Blitter = __webpack_require__(249); var GameObjectFactory = __webpack_require__(9); /** @@ -141856,7 +143530,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 891 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -141891,7 +143565,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 892 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141951,7 +143625,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 893 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141965,12 +143639,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(892); + renderWebGL = __webpack_require__(897); } if (true) { - renderCanvas = __webpack_require__(891); + renderCanvas = __webpack_require__(896); } module.exports = { @@ -141982,7 +143656,7 @@ module.exports = { /***/ }), -/* 894 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142098,7 +143772,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 895 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -142214,7 +143888,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 896 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142223,7 +143897,7 @@ module.exports = RETRO_FONT_CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(895); +var RETRO_FONT_CONST = __webpack_require__(900); var Extend = __webpack_require__(17); /** @@ -142246,7 +143920,7 @@ var Extend = __webpack_require__(17); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(894) }; +var RetroFont = { Parse: __webpack_require__(899) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -142255,7 +143929,7 @@ module.exports = RetroFont; /***/ }), -/* 897 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -142288,7 +143962,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 898 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142351,7 +144025,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 899 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142365,12 +144039,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(898); + renderWebGL = __webpack_require__(903); } if (true) { - renderCanvas = __webpack_require__(897); + renderCanvas = __webpack_require__(902); } module.exports = { @@ -142382,7 +144056,7 @@ module.exports = { /***/ }), -/* 900 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142405,7 +144079,7 @@ module.exports = { /***/ }), -/* 901 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -142526,7 +144200,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 902 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142676,7 +144350,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 903 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142690,12 +144364,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(902); + renderWebGL = __webpack_require__(907); } if (true) { - renderCanvas = __webpack_require__(901); + renderCanvas = __webpack_require__(906); } module.exports = { @@ -142707,7 +144381,7 @@ module.exports = { /***/ }), -/* 904 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142717,7 +144391,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(243); +var FloatBetween = __webpack_require__(245); var GetEaseFunction = __webpack_require__(64); var GetFastValue = __webpack_require__(1); var Wrap = __webpack_require__(40); @@ -143376,7 +145050,7 @@ module.exports = EmitterOp; /***/ }), -/* 905 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143394,14 +145068,14 @@ module.exports = { GravityWell: __webpack_require__(429), Particle: __webpack_require__(428), ParticleEmitter: __webpack_require__(427), - ParticleEmitterManager: __webpack_require__(242), - Zones: __webpack_require__(900) + ParticleEmitterManager: __webpack_require__(244), + Zones: __webpack_require__(905) }; /***/ }), -/* 906 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143410,7 +145084,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTransform = __webpack_require__(118); +var SetTransform = __webpack_require__(119); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -143577,7 +145251,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 907 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143883,7 +145557,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 908 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143897,12 +145571,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(907); + renderWebGL = __webpack_require__(912); } if (true) { - renderCanvas = __webpack_require__(906); + renderCanvas = __webpack_require__(911); } module.exports = { @@ -143914,7 +145588,7 @@ module.exports = { /***/ }), -/* 909 */ +/* 914 */ /***/ (function(module, exports) { /** @@ -143955,7 +145629,7 @@ module.exports = [ /***/ }), -/* 910 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143986,7 +145660,7 @@ module.exports = { /***/ }), -/* 911 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -144069,7 +145743,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 912 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -144147,7 +145821,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 913 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144162,12 +145836,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(912); + renderWebGL = __webpack_require__(917); } if (true) { - renderCanvas = __webpack_require__(911); + renderCanvas = __webpack_require__(916); } module.exports = { @@ -144179,7 +145853,7 @@ module.exports = { /***/ }), -/* 914 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144558,7 +146232,7 @@ module.exports = Bob; /***/ }), -/* 915 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -144686,7 +146360,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 916 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144816,7 +146490,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 917 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144830,12 +146504,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(916); + renderWebGL = __webpack_require__(921); } if (true) { - renderCanvas = __webpack_require__(915); + renderCanvas = __webpack_require__(920); } module.exports = { @@ -144847,7 +146521,7 @@ module.exports = { /***/ }), -/* 918 */ +/* 923 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144856,7 +146530,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTransform = __webpack_require__(118); +var SetTransform = __webpack_require__(119); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -144933,50 +146607,6 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, lineOffsetX = (lineData.longest - lineData.lengths[0]); } - /* - // Alpha - - var alpha = camera.alpha * src.alpha; - - if (alpha === 0) - { - // Nothing to see, so abort early - return; - } - - // Blend Mode - ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; - - // Alpha - ctx.globalAlpha = alpha; - - var tx = (src.x - camera.scrollX * src.scrollFactorX) + src.frame.x; - var ty = (src.y - camera.scrollY * src.scrollFactorY) + src.frame.y; - - var roundPixels = camera.roundPixels; - - if (roundPixels) - { - tx |= 0; - ty |= 0; - } - - ctx.save(); - - if (parentMatrix) - { - parentMatrix.copyToContext(ctx); - } - - ctx.translate(tx, ty); - - ctx.rotate(src.rotation); - - ctx.translate(-src.displayOriginX, -src.displayOriginY); - - ctx.scale(src.scaleX, src.scaleY); - */ - ctx.translate(-src.displayOriginX, -src.displayOriginY); var roundPixels = camera.roundPixels; @@ -145066,7 +146696,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 919 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145295,7 +146925,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 920 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145309,12 +146939,12 @@ var renderCanvas = __webpack_require__(2); if (true) { - renderWebGL = __webpack_require__(919); + renderWebGL = __webpack_require__(924); } if (true) { - renderCanvas = __webpack_require__(918); + renderCanvas = __webpack_require__(923); } module.exports = { @@ -145326,7 +146956,7 @@ module.exports = { /***/ }), -/* 921 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145379,7 +147009,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 922 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -145621,7 +147251,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 923 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145637,69 +147267,69 @@ module.exports = GetBitmapTextSize; var GameObjects = { DisplayList: __webpack_require__(476), - GameObjectCreator: __webpack_require__(13), + GameObjectCreator: __webpack_require__(14), GameObjectFactory: __webpack_require__(9), UpdateList: __webpack_require__(448), - Components: __webpack_require__(14), + Components: __webpack_require__(13), BuildGameObject: __webpack_require__(25), BuildGameObjectAnimation: __webpack_require__(130), GameObject: __webpack_require__(15), BitmapText: __webpack_require__(149), - Blitter: __webpack_require__(247), - Container: __webpack_require__(246), + Blitter: __webpack_require__(249), + Container: __webpack_require__(248), DOMElement: __webpack_require__(445), - DynamicBitmapText: __webpack_require__(245), - Graphics: __webpack_require__(117), - Group: __webpack_require__(113), + DynamicBitmapText: __webpack_require__(247), + Graphics: __webpack_require__(118), + Group: __webpack_require__(114), Image: __webpack_require__(69), - Particles: __webpack_require__(905), + Particles: __webpack_require__(910), PathFollower: __webpack_require__(422), - RenderTexture: __webpack_require__(241), - RetroFont: __webpack_require__(896), - Sprite3D: __webpack_require__(156), + RenderTexture: __webpack_require__(243), + RetroFont: __webpack_require__(901), + Sprite3D: __webpack_require__(157), Sprite: __webpack_require__(35), - Text: __webpack_require__(111), - TileSprite: __webpack_require__(240), - Zone: __webpack_require__(165), + Text: __webpack_require__(112), + TileSprite: __webpack_require__(242), + Zone: __webpack_require__(166), // Game Object Factories Factories: { - Blitter: __webpack_require__(890), - Container: __webpack_require__(889), - DOMElement: __webpack_require__(888), - DynamicBitmapText: __webpack_require__(887), + Blitter: __webpack_require__(895), + Container: __webpack_require__(894), + DOMElement: __webpack_require__(893), + DynamicBitmapText: __webpack_require__(892), Graphics: __webpack_require__(413), - Group: __webpack_require__(886), + Group: __webpack_require__(891), Image: __webpack_require__(412), - Particles: __webpack_require__(885), - PathFollower: __webpack_require__(884), - RenderTexture: __webpack_require__(883), - Sprite3D: __webpack_require__(882), + Particles: __webpack_require__(890), + PathFollower: __webpack_require__(889), + RenderTexture: __webpack_require__(888), + Sprite3D: __webpack_require__(887), Sprite: __webpack_require__(411), - StaticBitmapText: __webpack_require__(881), + StaticBitmapText: __webpack_require__(886), Text: __webpack_require__(410), - TileSprite: __webpack_require__(880), - Zone: __webpack_require__(879) + TileSprite: __webpack_require__(885), + Zone: __webpack_require__(884) }, Creators: { - Blitter: __webpack_require__(878), - Container: __webpack_require__(877), - DynamicBitmapText: __webpack_require__(876), + Blitter: __webpack_require__(883), + Container: __webpack_require__(882), + DynamicBitmapText: __webpack_require__(881), Graphics: __webpack_require__(409), - Group: __webpack_require__(875), + Group: __webpack_require__(880), Image: __webpack_require__(408), - Particles: __webpack_require__(874), - RenderTexture: __webpack_require__(873), - Sprite3D: __webpack_require__(872), + Particles: __webpack_require__(879), + RenderTexture: __webpack_require__(878), + Sprite3D: __webpack_require__(877), Sprite: __webpack_require__(407), - StaticBitmapText: __webpack_require__(871), + StaticBitmapText: __webpack_require__(876), Text: __webpack_require__(406), - TileSprite: __webpack_require__(870), - Zone: __webpack_require__(869) + TileSprite: __webpack_require__(875), + Zone: __webpack_require__(874) } }; @@ -145708,25 +147338,25 @@ if (true) { // WebGL only Game Objects GameObjects.Mesh = __webpack_require__(148); - GameObjects.Quad = __webpack_require__(239); + GameObjects.Quad = __webpack_require__(241); - GameObjects.Factories.Mesh = __webpack_require__(865); - GameObjects.Factories.Quad = __webpack_require__(864); + GameObjects.Factories.Mesh = __webpack_require__(870); + GameObjects.Factories.Quad = __webpack_require__(869); - GameObjects.Creators.Mesh = __webpack_require__(863); - GameObjects.Creators.Quad = __webpack_require__(862); + GameObjects.Creators.Mesh = __webpack_require__(868); + GameObjects.Creators.Quad = __webpack_require__(867); GameObjects.Light = __webpack_require__(405); __webpack_require__(404); - __webpack_require__(861); + __webpack_require__(866); } module.exports = GameObjects; /***/ }), -/* 924 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145742,16 +147372,16 @@ module.exports = GameObjects; module.exports = { AddToDOM: __webpack_require__(85), - DOMContentLoaded: __webpack_require__(263), - ParseXML: __webpack_require__(262), - RemoveFromDOM: __webpack_require__(261), - RequestAnimationFrame: __webpack_require__(260) + DOMContentLoaded: __webpack_require__(264), + ParseXML: __webpack_require__(263), + RemoveFromDOM: __webpack_require__(153), + RequestAnimationFrame: __webpack_require__(262) }; /***/ }), -/* 925 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145760,7 +147390,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ComponentToHex = __webpack_require__(514); +var ComponentToHex = __webpack_require__(519); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -145795,7 +147425,7 @@ module.exports = RGBToString; /***/ }), -/* 926 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -145867,7 +147497,7 @@ module.exports = RGBToHSV; /***/ }), -/* 927 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145876,8 +147506,8 @@ module.exports = RGBToHSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Between = __webpack_require__(153); -var Color = __webpack_require__(30); +var Between = __webpack_require__(154); +var Color = __webpack_require__(31); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -145903,7 +147533,7 @@ module.exports = RandomRGB; /***/ }), -/* 928 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145912,7 +147542,7 @@ module.exports = RandomRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(124); +var Linear = __webpack_require__(125); /** * Interpolates color values @@ -146006,7 +147636,7 @@ module.exports = { /***/ }), -/* 929 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146015,7 +147645,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HSVToRGB = __webpack_require__(512); +var HSVToRGB = __webpack_require__(517); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -146047,7 +147677,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 930 */ +/* 935 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146056,8 +147686,8 @@ module.exports = HSVColorWheel; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(30); -var HueToComponent = __webpack_require__(513); +var Color = __webpack_require__(31); +var HueToComponent = __webpack_require__(518); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -146097,7 +147727,7 @@ module.exports = HSLToColor; /***/ }), -/* 931 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -146137,7 +147767,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 932 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -146184,7 +147814,7 @@ module.exports = UserSelect; /***/ }), -/* 933 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -146219,7 +147849,7 @@ module.exports = TouchAction; /***/ }), -/* 934 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146234,17 +147864,17 @@ module.exports = TouchAction; module.exports = { - Interpolation: __webpack_require__(264), - Pool: __webpack_require__(24), + Interpolation: __webpack_require__(265), + Pool: __webpack_require__(22), Smoothing: __webpack_require__(133), - TouchAction: __webpack_require__(933), - UserSelect: __webpack_require__(932) + TouchAction: __webpack_require__(938), + UserSelect: __webpack_require__(937) }; /***/ }), -/* 935 */ +/* 940 */ /***/ (function(module, exports) { /** @@ -146274,7 +147904,7 @@ module.exports = GetOffsetY; /***/ }), -/* 936 */ +/* 941 */ /***/ (function(module, exports) { /** @@ -146304,7 +147934,7 @@ module.exports = GetOffsetX; /***/ }), -/* 937 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146319,18 +147949,18 @@ module.exports = GetOffsetX; module.exports = { - CenterOn: __webpack_require__(601), + CenterOn: __webpack_require__(606), GetBottom: __webpack_require__(51), - GetCenterX: __webpack_require__(92), - GetCenterY: __webpack_require__(89), + GetCenterX: __webpack_require__(93), + GetCenterY: __webpack_require__(90), GetLeft: __webpack_require__(49), - GetOffsetX: __webpack_require__(936), - GetOffsetY: __webpack_require__(935), + GetOffsetX: __webpack_require__(941), + GetOffsetY: __webpack_require__(940), GetRight: __webpack_require__(47), GetTop: __webpack_require__(45), SetBottom: __webpack_require__(50), - SetCenterX: __webpack_require__(91), - SetCenterY: __webpack_require__(90), + SetCenterX: __webpack_require__(92), + SetCenterY: __webpack_require__(91), SetLeft: __webpack_require__(48), SetRight: __webpack_require__(46), SetTop: __webpack_require__(44) @@ -146339,7 +147969,7 @@ module.exports = { /***/ }), -/* 938 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146383,7 +148013,7 @@ module.exports = TopRight; /***/ }), -/* 939 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146427,7 +148057,7 @@ module.exports = TopLeft; /***/ }), -/* 940 */ +/* 945 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146436,10 +148066,10 @@ module.exports = TopLeft; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(92); +var GetCenterX = __webpack_require__(93); var GetTop = __webpack_require__(45); var SetBottom = __webpack_require__(50); -var SetCenterX = __webpack_require__(91); +var SetCenterX = __webpack_require__(92); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -146471,7 +148101,7 @@ module.exports = TopCenter; /***/ }), -/* 941 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146515,7 +148145,7 @@ module.exports = RightTop; /***/ }), -/* 942 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146524,9 +148154,9 @@ module.exports = RightTop; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetRight = __webpack_require__(47); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetLeft = __webpack_require__(48); /** @@ -146559,7 +148189,7 @@ module.exports = RightCenter; /***/ }), -/* 943 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146603,7 +148233,7 @@ module.exports = RightBottom; /***/ }), -/* 944 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146647,7 +148277,7 @@ module.exports = LeftTop; /***/ }), -/* 945 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146656,9 +148286,9 @@ module.exports = LeftTop; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(89); +var GetCenterY = __webpack_require__(90); var GetLeft = __webpack_require__(49); -var SetCenterY = __webpack_require__(90); +var SetCenterY = __webpack_require__(91); var SetRight = __webpack_require__(46); /** @@ -146691,7 +148321,7 @@ module.exports = LeftCenter; /***/ }), -/* 946 */ +/* 951 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146735,7 +148365,7 @@ module.exports = LeftBottom; /***/ }), -/* 947 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146779,7 +148409,7 @@ module.exports = BottomRight; /***/ }), -/* 948 */ +/* 953 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146823,7 +148453,7 @@ module.exports = BottomLeft; /***/ }), -/* 949 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146833,8 +148463,8 @@ module.exports = BottomLeft; */ var GetBottom = __webpack_require__(51); -var GetCenterX = __webpack_require__(92); -var SetCenterX = __webpack_require__(91); +var GetCenterX = __webpack_require__(93); +var SetCenterX = __webpack_require__(92); var SetTop = __webpack_require__(44); /** @@ -146867,7 +148497,7 @@ module.exports = BottomCenter; /***/ }), -/* 950 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146882,24 +148512,24 @@ module.exports = BottomCenter; module.exports = { - BottomCenter: __webpack_require__(949), - BottomLeft: __webpack_require__(948), - BottomRight: __webpack_require__(947), - LeftBottom: __webpack_require__(946), - LeftCenter: __webpack_require__(945), - LeftTop: __webpack_require__(944), - RightBottom: __webpack_require__(943), - RightCenter: __webpack_require__(942), - RightTop: __webpack_require__(941), - TopCenter: __webpack_require__(940), - TopLeft: __webpack_require__(939), - TopRight: __webpack_require__(938) + BottomCenter: __webpack_require__(954), + BottomLeft: __webpack_require__(953), + BottomRight: __webpack_require__(952), + LeftBottom: __webpack_require__(951), + LeftCenter: __webpack_require__(950), + LeftTop: __webpack_require__(949), + RightBottom: __webpack_require__(948), + RightCenter: __webpack_require__(947), + RightTop: __webpack_require__(946), + TopCenter: __webpack_require__(945), + TopLeft: __webpack_require__(944), + TopRight: __webpack_require__(943) }; /***/ }), -/* 951 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146914,22 +148544,22 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(605), - BottomLeft: __webpack_require__(604), - BottomRight: __webpack_require__(603), - Center: __webpack_require__(602), - LeftCenter: __webpack_require__(600), - QuickSet: __webpack_require__(606), - RightCenter: __webpack_require__(599), - TopCenter: __webpack_require__(598), - TopLeft: __webpack_require__(597), - TopRight: __webpack_require__(596) + BottomCenter: __webpack_require__(610), + BottomLeft: __webpack_require__(609), + BottomRight: __webpack_require__(608), + Center: __webpack_require__(607), + LeftCenter: __webpack_require__(605), + QuickSet: __webpack_require__(611), + RightCenter: __webpack_require__(604), + TopCenter: __webpack_require__(603), + TopLeft: __webpack_require__(602), + TopRight: __webpack_require__(601) }; /***/ }), -/* 952 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146947,8 +148577,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(951), - To: __webpack_require__(950) + In: __webpack_require__(956), + To: __webpack_require__(955) }; @@ -146959,7 +148589,7 @@ module.exports = Align; /***/ }), -/* 953 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146974,17 +148604,17 @@ module.exports = Align; module.exports = { - Align: __webpack_require__(952), - Bounds: __webpack_require__(937), - Canvas: __webpack_require__(934), - Color: __webpack_require__(515), - Masks: __webpack_require__(511) + Align: __webpack_require__(957), + Bounds: __webpack_require__(942), + Canvas: __webpack_require__(939), + Color: __webpack_require__(520), + Masks: __webpack_require__(516) }; /***/ }), -/* 954 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147124,7 +148754,7 @@ module.exports = MoveTo; /***/ }), -/* 955 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147136,14 +148766,14 @@ module.exports = MoveTo; // 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__(524); -var EllipseCurve = __webpack_require__(522); +var CubicBezierCurve = __webpack_require__(529); +var EllipseCurve = __webpack_require__(527); var GameObjectFactory = __webpack_require__(9); -var LineCurve = __webpack_require__(521); -var MovePathTo = __webpack_require__(954); -var QuadraticBezierCurve = __webpack_require__(520); +var LineCurve = __webpack_require__(526); +var MovePathTo = __webpack_require__(959); +var QuadraticBezierCurve = __webpack_require__(525); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(518); +var SplineCurve = __webpack_require__(523); var Vector2 = __webpack_require__(4); /** @@ -147950,7 +149580,7 @@ module.exports = Path; /***/ }), -/* 956 */ +/* 961 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147971,19 +149601,19 @@ module.exports = Path; */ module.exports = { - Path: __webpack_require__(955), + Path: __webpack_require__(960), - CubicBezier: __webpack_require__(524), + CubicBezier: __webpack_require__(529), Curve: __webpack_require__(86), - Ellipse: __webpack_require__(522), - Line: __webpack_require__(521), - QuadraticBezier: __webpack_require__(520), - Spline: __webpack_require__(518) + Ellipse: __webpack_require__(527), + Line: __webpack_require__(526), + QuadraticBezier: __webpack_require__(525), + Spline: __webpack_require__(523) }; /***/ }), -/* 957 */ +/* 962 */ /***/ (function(module, exports) { /** @@ -148021,7 +149651,7 @@ module.exports = { /***/ }), -/* 958 */ +/* 963 */ /***/ (function(module, exports) { /** @@ -148059,7 +149689,7 @@ module.exports = { /***/ }), -/* 959 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -148097,7 +149727,7 @@ module.exports = { /***/ }), -/* 960 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -148135,7 +149765,7 @@ module.exports = { /***/ }), -/* 961 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148171,17 +149801,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(267), - C64: __webpack_require__(960), - CGA: __webpack_require__(959), - JMP: __webpack_require__(958), - MSX: __webpack_require__(957) + ARNE16: __webpack_require__(268), + C64: __webpack_require__(965), + CGA: __webpack_require__(964), + JMP: __webpack_require__(963), + MSX: __webpack_require__(962) }; /***/ }), -/* 962 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148196,14 +149826,14 @@ module.exports = { module.exports = { - GenerateTexture: __webpack_require__(268), - Palettes: __webpack_require__(961) + GenerateTexture: __webpack_require__(269), + Palettes: __webpack_require__(966) }; /***/ }), -/* 963 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148213,8 +149843,8 @@ module.exports = { */ var Class = __webpack_require__(0); -var OrthographicCamera = __webpack_require__(526); -var PerspectiveCamera = __webpack_require__(525); +var OrthographicCamera = __webpack_require__(531); +var PerspectiveCamera = __webpack_require__(530); var PluginCache = __webpack_require__(10); /** @@ -148487,7 +150117,7 @@ module.exports = CameraManager; /***/ }), -/* 964 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148502,16 +150132,16 @@ module.exports = CameraManager; module.exports = { - Camera: __webpack_require__(270), - CameraManager: __webpack_require__(963), - OrthographicCamera: __webpack_require__(526), - PerspectiveCamera: __webpack_require__(525) + Camera: __webpack_require__(271), + CameraManager: __webpack_require__(968), + OrthographicCamera: __webpack_require__(531), + PerspectiveCamera: __webpack_require__(530) }; /***/ }), -/* 965 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149000,7 +150630,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 966 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149310,7 +150940,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 967 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149325,14 +150955,14 @@ module.exports = FixedKeyControl; module.exports = { - FixedKeyControl: __webpack_require__(966), - SmoothedKeyControl: __webpack_require__(965) + FixedKeyControl: __webpack_require__(971), + SmoothedKeyControl: __webpack_require__(970) }; /***/ }), -/* 968 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149347,15 +150977,15 @@ module.exports = { module.exports = { - Controls: __webpack_require__(967), - Scene2D: __webpack_require__(573), - Sprite3D: __webpack_require__(964) + Controls: __webpack_require__(972), + Scene2D: __webpack_require__(578), + Sprite3D: __webpack_require__(969) }; /***/ }), -/* 969 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149404,7 +151034,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 970 */ +/* 975 */ /***/ (function(module, exports) { /** @@ -149439,7 +151069,7 @@ module.exports = ToggleVisible; /***/ }), -/* 971 */ +/* 976 */ /***/ (function(module, exports) { /** @@ -149493,7 +151123,7 @@ module.exports = Spread; /***/ }), -/* 972 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149502,7 +151132,7 @@ module.exports = Spread; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmoothStep = __webpack_require__(159); +var MathSmoothStep = __webpack_require__(160); /** * [description] @@ -149549,7 +151179,7 @@ module.exports = SmoothStep; /***/ }), -/* 973 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149605,7 +151235,7 @@ module.exports = SmootherStep; /***/ }), -/* 974 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149614,7 +151244,7 @@ module.exports = SmootherStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArrayShuffle = __webpack_require__(96); +var ArrayShuffle = __webpack_require__(97); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -149638,7 +151268,7 @@ module.exports = Shuffle; /***/ }), -/* 975 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149766,7 +151396,7 @@ module.exports = ShiftPosition; /***/ }), -/* 976 */ +/* 981 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149807,7 +151437,7 @@ module.exports = SetY; /***/ }), -/* 977 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149854,7 +151484,7 @@ module.exports = SetXY; /***/ }), -/* 978 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149895,7 +151525,7 @@ module.exports = SetX; /***/ }), -/* 979 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149933,7 +151563,7 @@ module.exports = SetVisible; /***/ }), -/* 980 */ +/* 985 */ /***/ (function(module, exports) { /** @@ -149972,7 +151602,7 @@ module.exports = SetTint; /***/ }), -/* 981 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150013,7 +151643,7 @@ module.exports = SetScaleY; /***/ }), -/* 982 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150054,7 +151684,7 @@ module.exports = SetScaleX; /***/ }), -/* 983 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150101,7 +151731,7 @@ module.exports = SetScale; /***/ }), -/* 984 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150142,7 +151772,7 @@ module.exports = SetRotation; /***/ }), -/* 985 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150189,7 +151819,7 @@ module.exports = SetOrigin; /***/ }), -/* 986 */ +/* 991 */ /***/ (function(module, exports) { /** @@ -150226,7 +151856,7 @@ module.exports = SetHitArea; /***/ }), -/* 987 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150267,7 +151897,7 @@ module.exports = SetDepth; /***/ }), -/* 988 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150307,7 +151937,7 @@ module.exports = SetBlendMode; /***/ }), -/* 989 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150348,7 +151978,7 @@ module.exports = SetAlpha; /***/ }), -/* 990 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150389,7 +152019,7 @@ module.exports = ScaleY; /***/ }), -/* 991 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150436,7 +152066,7 @@ module.exports = ScaleXY; /***/ }), -/* 992 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150477,7 +152107,7 @@ module.exports = ScaleX; /***/ }), -/* 993 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150526,7 +152156,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 994 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150572,7 +152202,7 @@ module.exports = RotateAround; /***/ }), -/* 995 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150613,7 +152243,7 @@ module.exports = Rotate; /***/ }), -/* 996 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150622,7 +152252,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(160); +var Random = __webpack_require__(161); /** * [description] @@ -150651,7 +152281,7 @@ module.exports = RandomTriangle; /***/ }), -/* 997 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150660,7 +152290,7 @@ module.exports = RandomTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(161); +var Random = __webpack_require__(162); /** * [description] @@ -150689,7 +152319,7 @@ module.exports = RandomRectangle; /***/ }), -/* 998 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150698,7 +152328,7 @@ module.exports = RandomRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(162); +var Random = __webpack_require__(163); /** * [description] @@ -150727,7 +152357,7 @@ module.exports = RandomLine; /***/ }), -/* 999 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150765,7 +152395,7 @@ module.exports = RandomEllipse; /***/ }), -/* 1000 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150774,7 +152404,7 @@ module.exports = RandomEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(164); +var Random = __webpack_require__(165); /** * [description] @@ -150803,7 +152433,7 @@ module.exports = RandomCircle; /***/ }), -/* 1001 */ +/* 1006 */ /***/ (function(module, exports) { /** @@ -150840,7 +152470,7 @@ module.exports = PlayAnimation; /***/ }), -/* 1002 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150850,7 +152480,7 @@ module.exports = PlayAnimation; */ // var GetPointsOnLine = require('../geom/line/GetPointsOnLine'); -var BresenhamPoints = __webpack_require__(576); +var BresenhamPoints = __webpack_require__(581); /** * [description] @@ -150900,7 +152530,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 1003 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150909,7 +152539,7 @@ module.exports = PlaceOnTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MarchingAnts = __webpack_require__(577); +var MarchingAnts = __webpack_require__(582); var RotateLeft = __webpack_require__(293); var RotateRight = __webpack_require__(292); @@ -150961,7 +152591,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 1004 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150970,7 +152600,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoints = __webpack_require__(163); +var GetPoints = __webpack_require__(164); /** * [description] @@ -151005,7 +152635,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 1005 */ +/* 1010 */ /***/ (function(module, exports) { /** @@ -151055,7 +152685,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 1006 */ +/* 1011 */ /***/ (function(module, exports) { /** @@ -151102,7 +152732,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 1007 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151143,7 +152773,7 @@ module.exports = IncY; /***/ }), -/* 1008 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151190,7 +152820,7 @@ module.exports = IncXY; /***/ }), -/* 1009 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151231,7 +152861,7 @@ module.exports = IncX; /***/ }), -/* 1010 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151272,7 +152902,7 @@ module.exports = IncAlpha; /***/ }), -/* 1011 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151281,11 +152911,11 @@ module.exports = IncAlpha; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AlignIn = __webpack_require__(606); +var AlignIn = __webpack_require__(611); var CONST = __webpack_require__(302); var GetFastValue = __webpack_require__(1); var NOOP = __webpack_require__(2); -var Zone = __webpack_require__(165); +var Zone = __webpack_require__(166); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -151396,7 +153026,7 @@ module.exports = GridAlign; /***/ }), -/* 1012 */ +/* 1017 */ /***/ (function(module, exports) { /** @@ -151454,7 +153084,7 @@ module.exports = GetLast; /***/ }), -/* 1013 */ +/* 1018 */ /***/ (function(module, exports) { /** @@ -151512,7 +153142,7 @@ module.exports = GetFirst; /***/ }), -/* 1014 */ +/* 1019 */ /***/ (function(module, exports) { /** @@ -151557,7 +153187,7 @@ module.exports = Call; /***/ }), -/* 1015 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151598,7 +153228,7 @@ module.exports = Angle; /***/ }), -/* 1016 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151607,19 +153237,19 @@ module.exports = Angle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(173); +var Bodies = __webpack_require__(174); var Class = __webpack_require__(0); var Common = __webpack_require__(42); -var Composite = __webpack_require__(227); -var Engine = __webpack_require__(1017); +var Composite = __webpack_require__(229); +var Engine = __webpack_require__(1022); var EventEmitter = __webpack_require__(8); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); var MatterBody = __webpack_require__(74); var MatterEvents = __webpack_require__(304); -var MatterTileBody = __webpack_require__(686); -var MatterWorld = __webpack_require__(681); -var Vector = __webpack_require__(107); +var MatterTileBody = __webpack_require__(691); +var MatterWorld = __webpack_require__(686); +var Vector = __webpack_require__(108); /** * @classdesc @@ -152513,7 +154143,7 @@ module.exports = World; /***/ }), -/* 1017 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152530,14 +154160,14 @@ var Engine = {}; module.exports = Engine; -var World = __webpack_require__(681); +var World = __webpack_require__(686); var Sleeping = __webpack_require__(335); -var Resolver = __webpack_require__(1018); -var Pairs = __webpack_require__(1019); -var Metrics = __webpack_require__(1040); -var Grid = __webpack_require__(1020); +var Resolver = __webpack_require__(1023); +var Pairs = __webpack_require__(1024); +var Metrics = __webpack_require__(1045); +var Grid = __webpack_require__(1025); var Events = __webpack_require__(304); -var Composite = __webpack_require__(227); +var Composite = __webpack_require__(229); var Constraint = __webpack_require__(303); var Common = __webpack_require__(42); var Body = __webpack_require__(74); @@ -153028,7 +154658,7 @@ var Body = __webpack_require__(74); /***/ }), -/* 1018 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153042,7 +154672,7 @@ var Resolver = {}; module.exports = Resolver; var Vertices = __webpack_require__(129); -var Vector = __webpack_require__(107); +var Vector = __webpack_require__(108); var Common = __webpack_require__(42); var Bounds = __webpack_require__(128); @@ -153385,7 +155015,7 @@ var Bounds = __webpack_require__(128); /***/ }), -/* 1019 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153398,7 +155028,7 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(617); +var Pair = __webpack_require__(622); var Common = __webpack_require__(42); (function() { @@ -153550,7 +155180,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1020 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153563,8 +155193,8 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(617); -var Detector = __webpack_require__(685); +var Pair = __webpack_require__(622); +var Detector = __webpack_require__(690); var Common = __webpack_require__(42); (function() { @@ -153877,7 +155507,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1021 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153890,7 +155520,7 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(682); +var Plugin = __webpack_require__(687); var Common = __webpack_require__(42); (function() { @@ -153969,7 +155599,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1022 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153980,7 +155610,7 @@ var Common = __webpack_require__(42); var AnimationComponent = __webpack_require__(306); var Class = __webpack_require__(0); -var Components = __webpack_require__(618); +var Components = __webpack_require__(623); var GameObject = __webpack_require__(15); var GetFastValue = __webpack_require__(1); var Pipeline = __webpack_require__(294); @@ -154112,7 +155742,7 @@ module.exports = MatterSprite; /***/ }), -/* 1023 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154122,7 +155752,7 @@ module.exports = MatterSprite; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(618); +var Components = __webpack_require__(623); var GameObject = __webpack_require__(15); var GetFastValue = __webpack_require__(1); var Image = __webpack_require__(69); @@ -154249,7 +155879,7 @@ module.exports = MatterImage; /***/ }), -/* 1024 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154265,11 +155895,11 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(227); +var Composite = __webpack_require__(229); var Constraint = __webpack_require__(303); var Common = __webpack_require__(42); var Body = __webpack_require__(74); -var Bodies = __webpack_require__(173); +var Bodies = __webpack_require__(174); (function() { @@ -154582,7 +156212,7 @@ var Bodies = __webpack_require__(173); /***/ }), -/* 1025 */ +/* 1030 */ /***/ (function(module, exports) { /** @@ -155193,7 +156823,7 @@ function scalar_eq(a,b,precision){ /***/ }), -/* 1026 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155202,15 +156832,15 @@ function scalar_eq(a,b,precision){ * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(173); +var Bodies = __webpack_require__(174); var Class = __webpack_require__(0); -var Composites = __webpack_require__(1024); +var Composites = __webpack_require__(1029); var Constraint = __webpack_require__(303); -var MatterGameObject = __webpack_require__(1056); -var MatterImage = __webpack_require__(1023); -var MatterSprite = __webpack_require__(1022); -var MatterTileBody = __webpack_require__(686); -var PointerConstraint = __webpack_require__(1042); +var MatterGameObject = __webpack_require__(1061); +var MatterImage = __webpack_require__(1028); +var MatterSprite = __webpack_require__(1027); +var MatterTileBody = __webpack_require__(691); +var PointerConstraint = __webpack_require__(1047); /** * @classdesc @@ -155823,7 +157453,7 @@ module.exports = Factory; /***/ }), -/* 1027 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155832,16 +157462,16 @@ module.exports = Factory; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Body = __webpack_require__(1033); +var Body = __webpack_require__(1038); var Class = __webpack_require__(0); var COLLIDES = __webpack_require__(337); -var CollisionMap = __webpack_require__(1032); +var CollisionMap = __webpack_require__(1037); var EventEmitter = __webpack_require__(8); var GetFastValue = __webpack_require__(1); -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); var Set = __webpack_require__(70); -var Solver = __webpack_require__(1060); -var TILEMAP_FORMATS = __webpack_require__(27); +var Solver = __webpack_require__(1065); +var TILEMAP_FORMATS = __webpack_require__(28); var TYPE = __webpack_require__(336); /** @@ -156869,7 +158499,7 @@ module.exports = World; /***/ }), -/* 1028 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156879,7 +158509,7 @@ module.exports = World; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(688); +var Components = __webpack_require__(693); var Sprite = __webpack_require__(35); /** @@ -157031,7 +158661,7 @@ module.exports = ImpactSprite; /***/ }), -/* 1029 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157041,7 +158671,7 @@ module.exports = ImpactSprite; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(688); +var Components = __webpack_require__(693); var Image = __webpack_require__(69); /** @@ -157190,7 +158820,7 @@ module.exports = ImpactImage; /***/ }), -/* 1030 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157200,7 +158830,7 @@ module.exports = ImpactImage; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(688); +var Components = __webpack_require__(693); /** * @classdesc @@ -157323,7 +158953,7 @@ module.exports = ImpactBody; /***/ }), -/* 1031 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157333,9 +158963,9 @@ module.exports = ImpactBody; */ var Class = __webpack_require__(0); -var ImpactBody = __webpack_require__(1030); -var ImpactImage = __webpack_require__(1029); -var ImpactSprite = __webpack_require__(1028); +var ImpactBody = __webpack_require__(1035); +var ImpactImage = __webpack_require__(1034); +var ImpactSprite = __webpack_require__(1033); /** * @classdesc @@ -157480,7 +159110,7 @@ module.exports = Factory; /***/ }), -/* 1032 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157490,7 +159120,7 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var DefaultDefs = __webpack_require__(1074); +var DefaultDefs = __webpack_require__(1079); /** * @classdesc @@ -157844,7 +159474,7 @@ module.exports = CollisionMap; /***/ }), -/* 1033 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157855,9 +159485,9 @@ module.exports = CollisionMap; var Class = __webpack_require__(0); var COLLIDES = __webpack_require__(337); -var GetVelocity = __webpack_require__(1076); +var GetVelocity = __webpack_require__(1081); var TYPE = __webpack_require__(336); -var UpdateMotion = __webpack_require__(1075); +var UpdateMotion = __webpack_require__(1080); /** * @callback BodyUpdateCallback @@ -158463,12 +160093,12 @@ module.exports = Body; /***/ }), -/* 1034 */, -/* 1035 */, -/* 1036 */ +/* 1039 */, +/* 1040 */, +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(683); +var Matter = __webpack_require__(688); /** * A coordinate wrapping plugin for matter.js. @@ -158647,10 +160277,10 @@ module.exports = MatterWrap; */ /***/ }), -/* 1037 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(683); +var Matter = __webpack_require__(688); /** * An attractors plugin for matter.js. @@ -158789,7 +160419,7 @@ module.exports = MatterAttractors; /***/ }), -/* 1038 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158799,16 +160429,16 @@ module.exports = MatterAttractors; */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(1026); +var Factory = __webpack_require__(1031); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(3); -var MatterAttractors = __webpack_require__(1037); -var MatterLib = __webpack_require__(1021); -var MatterWrap = __webpack_require__(1036); -var Merge = __webpack_require__(95); -var Plugin = __webpack_require__(682); +var MatterAttractors = __webpack_require__(1042); +var MatterLib = __webpack_require__(1026); +var MatterWrap = __webpack_require__(1041); +var Merge = __webpack_require__(96); +var Plugin = __webpack_require__(687); var PluginCache = __webpack_require__(10); -var World = __webpack_require__(1016); +var World = __webpack_require__(1021); /** * @classdesc @@ -159124,7 +160754,7 @@ module.exports = MatterPhysics; /***/ }), -/* 1039 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159349,7 +160979,7 @@ var Bounds = __webpack_require__(128); })(); /***/ }), -/* 1040 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -159362,7 +160992,7 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(227); +var Composite = __webpack_require__(229); var Common = __webpack_require__(42); (function() { @@ -159448,7 +161078,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1041 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159463,10 +161093,10 @@ var Query = {}; module.exports = Query; -var Vector = __webpack_require__(107); -var SAT = __webpack_require__(684); +var Vector = __webpack_require__(108); +var SAT = __webpack_require__(689); var Bounds = __webpack_require__(128); -var Bodies = __webpack_require__(173); +var Bodies = __webpack_require__(174); var Vertices = __webpack_require__(129); (function() { @@ -159566,7 +161196,7 @@ var Vertices = __webpack_require__(129); /***/ }), -/* 1042 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159577,11 +161207,11 @@ var Vertices = __webpack_require__(129); var Bounds = __webpack_require__(128); var Class = __webpack_require__(0); -var Composite = __webpack_require__(227); +var Composite = __webpack_require__(229); var Constraint = __webpack_require__(303); -var Detector = __webpack_require__(685); +var Detector = __webpack_require__(690); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(95); +var Merge = __webpack_require__(96); var Sleeping = __webpack_require__(335); var Vector2 = __webpack_require__(4); var Vertices = __webpack_require__(129); @@ -159857,7 +161487,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1043 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159957,7 +161587,7 @@ module.exports = Velocity; /***/ }), -/* 1044 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159968,8 +161598,8 @@ module.exports = Velocity; var Body = __webpack_require__(74); var MATH_CONST = __webpack_require__(16); -var WrapAngle = __webpack_require__(218); -var WrapAngleDegrees = __webpack_require__(217); +var WrapAngle = __webpack_require__(220); +var WrapAngleDegrees = __webpack_require__(219); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -160249,7 +161879,7 @@ module.exports = Transform; /***/ }), -/* 1045 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160370,7 +162000,7 @@ module.exports = Sleep; /***/ }), -/* 1046 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160379,12 +162009,12 @@ module.exports = Sleep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(173); +var Bodies = __webpack_require__(174); var Body = __webpack_require__(74); var Bounds = __webpack_require__(128); var Common = __webpack_require__(42); var GetFastValue = __webpack_require__(1); -var Vector = __webpack_require__(107); +var Vector = __webpack_require__(108); var Vertices = __webpack_require__(129); /** @@ -160547,7 +162177,7 @@ module.exports = PhysicsEditorParser; /***/ }), -/* 1047 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160556,10 +162186,10 @@ module.exports = PhysicsEditorParser; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(173); +var Bodies = __webpack_require__(174); var Body = __webpack_require__(74); var GetFastValue = __webpack_require__(1); -var PhysicsEditorParser = __webpack_require__(1046); +var PhysicsEditorParser = __webpack_require__(1051); /** * [description] @@ -160776,7 +162406,7 @@ module.exports = SetBody; /***/ }), -/* 1048 */ +/* 1053 */ /***/ (function(module, exports) { /** @@ -160829,7 +162459,7 @@ module.exports = Sensor; /***/ }), -/* 1049 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160884,7 +162514,7 @@ module.exports = Static; /***/ }), -/* 1050 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160961,7 +162591,7 @@ module.exports = Mass; /***/ }), -/* 1051 */ +/* 1056 */ /***/ (function(module, exports) { /** @@ -161001,7 +162631,7 @@ module.exports = Gravity; /***/ }), -/* 1052 */ +/* 1057 */ /***/ (function(module, exports) { /** @@ -161087,7 +162717,7 @@ module.exports = Friction; /***/ }), -/* 1053 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161234,7 +162864,7 @@ module.exports = Force; /***/ }), -/* 1054 */ +/* 1059 */ /***/ (function(module, exports) { /** @@ -161322,7 +162952,7 @@ module.exports = Collision; /***/ }), -/* 1055 */ +/* 1060 */ /***/ (function(module, exports) { /** @@ -161362,7 +162992,7 @@ module.exports = Bounce; /***/ }), -/* 1056 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161371,7 +163001,7 @@ module.exports = Bounce; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Components = __webpack_require__(618); +var Components = __webpack_require__(623); var GetFastValue = __webpack_require__(1); var Vector2 = __webpack_require__(4); @@ -161472,7 +163102,7 @@ module.exports = MatterGameObject; /***/ }), -/* 1057 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161487,14 +163117,14 @@ module.exports = MatterGameObject; module.exports = { - Factory: __webpack_require__(1026), - Image: __webpack_require__(1023), - Matter: __webpack_require__(683), - MatterPhysics: __webpack_require__(1038), - PolyDecomp: __webpack_require__(1025), - Sprite: __webpack_require__(1022), - TileBody: __webpack_require__(686), - World: __webpack_require__(1016) + Factory: __webpack_require__(1031), + Image: __webpack_require__(1028), + Matter: __webpack_require__(688), + MatterPhysics: __webpack_require__(1043), + PolyDecomp: __webpack_require__(1030), + Sprite: __webpack_require__(1027), + TileBody: __webpack_require__(691), + World: __webpack_require__(1021) }; @@ -161552,7 +163182,7 @@ module.exports = { /***/ }), -/* 1058 */ +/* 1063 */ /***/ (function(module, exports) { /** @@ -161637,7 +163267,7 @@ module.exports = SeperateY; /***/ }), -/* 1059 */ +/* 1064 */ /***/ (function(module, exports) { /** @@ -161693,7 +163323,7 @@ module.exports = SeperateX; /***/ }), -/* 1060 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161703,8 +163333,8 @@ module.exports = SeperateX; */ var COLLIDES = __webpack_require__(337); -var SeperateX = __webpack_require__(1059); -var SeperateY = __webpack_require__(1058); +var SeperateX = __webpack_require__(1064); +var SeperateY = __webpack_require__(1063); /** * Impact Physics Solver @@ -161767,7 +163397,7 @@ module.exports = Solver; /***/ }), -/* 1061 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161777,11 +163407,11 @@ module.exports = Solver; */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(1031); +var Factory = __webpack_require__(1036); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(95); +var Merge = __webpack_require__(96); var PluginCache = __webpack_require__(10); -var World = __webpack_require__(1027); +var World = __webpack_require__(1032); /** * @classdesc @@ -161983,7 +163613,7 @@ module.exports = ImpactPhysics; /***/ }), -/* 1062 */ +/* 1067 */ /***/ (function(module, exports) { /** @@ -162082,7 +163712,7 @@ module.exports = Velocity; /***/ }), -/* 1063 */ +/* 1068 */ /***/ (function(module, exports) { /** @@ -162157,7 +163787,7 @@ module.exports = SetGameObject; /***/ }), -/* 1064 */ +/* 1069 */ /***/ (function(module, exports) { /** @@ -162206,7 +163836,7 @@ module.exports = Offset; /***/ }), -/* 1065 */ +/* 1070 */ /***/ (function(module, exports) { /** @@ -162267,7 +163897,7 @@ module.exports = Gravity; /***/ }), -/* 1066 */ +/* 1071 */ /***/ (function(module, exports) { /** @@ -162343,7 +163973,7 @@ module.exports = Friction; /***/ }), -/* 1067 */ +/* 1072 */ /***/ (function(module, exports) { /** @@ -162467,7 +164097,7 @@ module.exports = Debug; /***/ }), -/* 1068 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162622,7 +164252,7 @@ module.exports = Collides; /***/ }), -/* 1069 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162743,7 +164373,7 @@ module.exports = CheckAgainst; /***/ }), -/* 1070 */ +/* 1075 */ /***/ (function(module, exports) { /** @@ -162821,7 +164451,7 @@ module.exports = Bounce; /***/ }), -/* 1071 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162904,7 +164534,7 @@ module.exports = BodyType; /***/ }), -/* 1072 */ +/* 1077 */ /***/ (function(module, exports) { /** @@ -162977,7 +164607,7 @@ module.exports = BodyScale; /***/ }), -/* 1073 */ +/* 1078 */ /***/ (function(module, exports) { /** @@ -163053,7 +164683,7 @@ module.exports = Acceleration; /***/ }), -/* 1074 */ +/* 1079 */ /***/ (function(module, exports) { /** @@ -163124,7 +164754,7 @@ module.exports = { /***/ }), -/* 1075 */ +/* 1080 */ /***/ (function(module, exports) { /** @@ -163219,7 +164849,7 @@ module.exports = UpdateMotion; /***/ }), -/* 1076 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163275,7 +164905,7 @@ module.exports = GetVelocity; /***/ }), -/* 1077 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163301,22 +164931,22 @@ module.exports = GetVelocity; */ module.exports = { - Body: __webpack_require__(1033), + Body: __webpack_require__(1038), COLLIDES: __webpack_require__(337), - CollisionMap: __webpack_require__(1032), - Factory: __webpack_require__(1031), - Image: __webpack_require__(1029), - ImpactBody: __webpack_require__(1030), - ImpactPhysics: __webpack_require__(1061), - Sprite: __webpack_require__(1028), + CollisionMap: __webpack_require__(1037), + Factory: __webpack_require__(1036), + Image: __webpack_require__(1034), + ImpactBody: __webpack_require__(1035), + ImpactPhysics: __webpack_require__(1066), + Sprite: __webpack_require__(1033), TYPE: __webpack_require__(336), - World: __webpack_require__(1027) + World: __webpack_require__(1032) }; /***/ }), -/* 1078 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163331,15 +164961,15 @@ module.exports = { module.exports = { - Arcade: __webpack_require__(710), - Impact: __webpack_require__(1077), - Matter: __webpack_require__(1057) + Arcade: __webpack_require__(715), + Impact: __webpack_require__(1082), + Matter: __webpack_require__(1062) }; /***/ }), -/* 1079 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -163348,9 +164978,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(616); +__webpack_require__(621); -var CONST = __webpack_require__(22); +var CONST = __webpack_require__(23); var Extend = __webpack_require__(17); /** @@ -163359,36 +164989,36 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(607), - Animation: __webpack_require__(575), - Cache: __webpack_require__(574), - Cameras: __webpack_require__(968), + Actions: __webpack_require__(612), + Animation: __webpack_require__(580), + Cache: __webpack_require__(579), + Cameras: __webpack_require__(973), Class: __webpack_require__(0), - Create: __webpack_require__(962), - Curves: __webpack_require__(956), - Data: __webpack_require__(517), - Display: __webpack_require__(953), - DOM: __webpack_require__(924), - Events: __webpack_require__(509), + Create: __webpack_require__(967), + Curves: __webpack_require__(961), + Data: __webpack_require__(522), + Display: __webpack_require__(958), + DOM: __webpack_require__(929), + Events: __webpack_require__(514), FBInstant: __webpack_require__(305), - Game: __webpack_require__(506), - GameObjects: __webpack_require__(923), + Game: __webpack_require__(507), + GameObjects: __webpack_require__(928), Geom: __webpack_require__(403), Input: __webpack_require__(388), - Loader: __webpack_require__(764), - Math: __webpack_require__(749), - Physics: __webpack_require__(1078), + Loader: __webpack_require__(769), + Math: __webpack_require__(754), + Physics: __webpack_require__(1083), Plugins: __webpack_require__(334), - Renderer: __webpack_require__(680), - Scene: __webpack_require__(200), + Renderer: __webpack_require__(685), + Scene: __webpack_require__(201), Scenes: __webpack_require__(332), Sound: __webpack_require__(330), Structs: __webpack_require__(329), Textures: __webpack_require__(328), - Tilemaps: __webpack_require__(675), + Tilemaps: __webpack_require__(680), Time: __webpack_require__(312), Tweens: __webpack_require__(310), - Utils: __webpack_require__(626) + Utils: __webpack_require__(631) }; @@ -163408,7 +165038,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(221))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(223))) /***/ }) /******/ ]); diff --git a/dist/phaser.min.js b/dist/phaser.min.js index 3e2d40000..c3190947d 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,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=1079)}([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,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),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=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),a=s?s+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);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=l},function(t,e,i){var n=i(16),s=i(3);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(10),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){t.exports={Alpha:i(595),Animation:i(306),BlendMode:i(594),ComputedSize:i(593),Crop:i(592),Depth:i(591),Flip:i(590),GetBounds:i(589),Mask:i(588),Origin:i(587),Pipeline:i(294),ScaleMode:i(586),ScrollFactor:i(585),Size:i(584),Texture:i(583),TextureCrop:i(582),Tint:i(581),ToJSON:i(580),Transform:i(579),TransformMatrix:i(32),Visible:i(578)}},function(t,e,i){var n=i(0),s=i(14),r=i(59),o=i(8),a=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,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(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=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.ToJSON(this)},willRender:function(t){return!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter>0&&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(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,t.exports=a},function(t,e,i){var n=i(300),s={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:new n};t.exports=s},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&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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("fileprogress",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("filecomplete",e,i,t),this.loader.emit("filecomplete-"+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}});u.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)}},u.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=u},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>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;no.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){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n=i(0),s=i(18),r=i(19),o=i(6),a=i(1),h=i(3),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;ss||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(158),r=i(287),o=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.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,n){return void 0===n&&(n=255),this.red=t,this.green=e,this.blue=i,this.alpha=n,this.update()},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this.update()},setFromRGB:function(t){return this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this.update()},update:function(){return this._color=s(this.r,this.g,this.b),this._color32=r(this.r,this.g,this.b,this.a),this._rgba="rgba("+this.r+","+this.g+","+this.b+","+this.a/255+")",this},clone:function(){return new o(this.r,this.g,this.b,this.a)},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()}},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()}},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()}},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()}},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()}},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()}},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()}}});t.exports=o},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){var n=new(i(0))({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)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+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*i,a=n*n,h=s*s,l=r*r,u=Math.sqrt(o+h),c=Math.sqrt(a+l);return t.translateX=e[4],t.translateY=e[5],t.scaleX=u,t.scaleY=c,t.rotation=Math.acos(i/u)*(Math.atan(-s/i)<0?-1:1),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},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=n},function(t,e){t.exports=function(t,e,i){return t.radius>0&&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){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,i){var n=i(0),s=i(14),r=i(15),o=i(529),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")},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)}});t.exports=a},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=new(i(0))({initialize:function(t,e,i,n){this.loader=t,this.type=e,this.key=i,this.files=n,this.complete=!1,this.pending=n.length,this.failed=0,this.config={};for(var s=0;s0;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 t instanceof HTMLElement},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(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.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n=t.length)){for(var i=t.length-1,n=t[e],s=e;s=0&&y>=0&&v+y<1}},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){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e,i){var n=i(125);t.exports=function(t,e){if("string"==typeof t&&n.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,n[t].apply(this,i)}}return n[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,n.Power0)}},function(t,e,i){var n=i(20);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(14),r=i(393),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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/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.height-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.tilemapLayer;return t?t.tileset: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,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var n=i(0),s=i(61),r=i(233),o=i(232),a=i(97),h=i(160),l=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},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,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=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}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=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=l},function(t,e,i){var n=i(0),s=i(14),r=i(15),o=i(432),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=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 this.entries.length=t}}});t.exports=n},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,i){var n=i(101),s=i(12),r=i(63),o=i(64),a=i(73),h=i(170),l=i(103),u=i(3),c=i(102),d=i(100),f=i(99);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),y=a(e,"duration",i.duration),m=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),m),w=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),T=a(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),A=r(e,"flipX",i.flipX),C=r(e,"flipY",i.flipY),_=[],M=0;M0&&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,i,r,o){o=o||t.position;for(var a=0;a0&&(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};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0: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("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:o,onBlur:o,onFocus:o,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("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.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("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("detune",this,t)}}});t.exports=a},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,s=i(57),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){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var s=new Array(i),r=1;rl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;if(void 0===i&&(i=!0),e)"string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e);else if(t.parentElement)return t;return n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},function(t,e,i){var n=i(0),s=i(266),r=i(11),o=i(4),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(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){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(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],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*w,this.y=(e*o+i*u+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,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}});t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(301),o=i(299),a=i(164),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},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 a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},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){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e,i){var n=i(151),s=i(0),r=i(2),o=i(83),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){return t&&(this._sortKey=t,o.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},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.GetFirstElement(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(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,w=e+n,b=i+r;if(!(x.rw||x.y>b)){var T=Math.max(x.x,e),S=Math.max(x.y,i),A=Math.min(x.r,w)-T,C=Math.min(x.b,b)-S;v=A,y=C,p=o?h+(u-(T-x.x)-A):h+(T-x.x),g=a?l+(c-(S-x.y)-C):l+(S-x.y),e=T,i=S,n=A,r=C}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,M=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/M),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+y)/M),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.texture=null,this.source=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(34);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){t.exports=function(t){for(var e=t.length-1;e>0;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(0),s=i(296),r=i(163),o=i(162),a=i(4),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=0),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 o(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 a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),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=h},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(0),s=i(13),r=i(9),o=i(62),a=new n({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var n=0;n0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},stop:function(t){this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state=o.PENDING_REMOVE)},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.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 o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function n(t){return!!t.getEnd&&"function"==typeof t.getEnd}var s=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},l=typeof e;if("number"===l)a=function(){return e};else if("string"===l){var u=e[0],c=parseFloat(e.substr(2));switch(u){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===l?a=e:"object"===l&&(i(o=e)||n(o))?(n(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(3);t.exports=function(t){var e=n(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation","orthogonal"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[])}});t.exports=r},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",{}),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null)}});t.exports=r},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&el){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=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h],h0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},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){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(607),s=i(0),r=i(1),o=i(3),a=i(7),h=i(248),l=i(70),u=i(35),c=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?a(e[0])&&(i=e,e=null):a(e)&&(i=e,e=null),this.scene=t,this.children=new l(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=0&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<-a&&(s=h+s%h-a)),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this},slice:function(t,e,i,n,s,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?s<-h?s=-h-a:s>=0&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<=-a&&(s=h+s%h-a)),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-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;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.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(r.game.renderer,this,0,f.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture))),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new n(0,0,0,0),t.exports=f},function(t,e){t.exports=function(t,e,i,n,s){var r=n.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(n.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return s?(o.multiplyWithOffset(s,-n.scrollX*i.scrollFactorX,-n.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=n.scrollX*i.scrollFactorX,a.f-=n.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),!0}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i0},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("start",this),this.events.emit("ready",this,t)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(t){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("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;ef.right&&(p=h(p,p+(v-f.right),this.lerp.x)),yf.bottom&&(g=h(g,g+(y-f.bottom),this.lerp.y))):(p=h(p,v-u,this.lerp.x),g=h(g,y-c,this.lerp.y))}this.useBounds&&(p=this.clampX(p),g=this.clampY(g)),this.roundPixels&&(u=Math.round(u),c=Math.round(c)),this.scrollX=p,this.scrollY=g;var m=p+r,x=g+o;this.midPoint.set(m,x);var w=i/a,b=n/a;this.worldView.setTo(m-w/2,x-b/2,w,b),l.loadIdentity(),l.scale(e,e),l.translate(this.x+u,this.y+c),l.rotate(this.rotation),l.scale(a,a),l.translate(-u,-c),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,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===o&&(o=s),this._follow=t,this.roundPixels=e,i=r(i,0,1),n=r(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,o);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,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(){n.prototype.destroy.call(this),this.resetFX(),this._follow=null,this.deadzone=null}});t.exports=c},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;et.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={};t.exports=n;var s=i(107),r=i(42);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(12);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0),o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),l=n(i,"repeatDelay",0),u=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0);s.setDelay(a),s.setRepeat(h),s.setRepeatDelay(l),s.setYoyo(u),c?s.play(r,o):d>0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(253),r=i(1),o=i(499),a=i(498),h=i(497),l=i(32),u=i(21),c=i(132),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._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=null,this.firstQuad=[0,0,0,0],this.prevQuad=[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 this.renderer.setTexture2D(t,e),this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize,s=this.renderer;if(0!==e)return s.setBlankTexture(),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},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.width,v=o.height,y=-t.displayOriginX+f,m=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,d=x.v1,g=x.width,v=x.height,f=x.x,p=x.y,y=-t.displayOriginX+f,m=-t.displayOriginY+p}t.flipX&&(y+=g,g*=-1),t.flipY&&(m+=v,v*=-1);var w=y+g,b=m+v;s.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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=r.getX(y,m),S=r.getY(y,m),A=r.getX(y,b),C=r.getY(y,b),_=r.getX(w,b),M=r.getY(w,b),P=r.getX(w,m),E=r.getY(w,m),k=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),L=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),F=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),R=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(T|=0,S|=0,A|=0,C|=0,_|=0,M|=0,P|=0,E|=0),this.setTexture2D(a,0);var O=t._isTinted&&t.tintFill;this.batchQuad(T,S,A,C,_,M,P,E,h,l,c,d,k,L,F,R,O)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v){var y=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),y=!0);var m=this.vertexViewF32,x=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount-1;return m[++w]=t,m[++w]=e,m[++w]=h,m[++w]=l,m[++w]=v,x[++w]=d,m[++w]=i,m[++w]=n,m[++w]=h,m[++w]=c,m[++w]=v,x[++w]=p,m[++w]=s,m[++w]=r,m[++w]=u,m[++w]=c,m[++w]=v,x[++w]=g,m[++w]=t,m[++w]=e,m[++w]=h,m[++w]=l,m[++w]=v,x[++w]=d,m[++w]=s,m[++w]=r,m[++w]=u,m[++w]=c,m[++w]=v,x[++w]=g,m[++w]=o,m[++w]=a,m[++w]=u,m[++w]=l,m[++w]=v,x[++w]=f,this.vertexCount+=6,y},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f){var p=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),p=!0);var g=this.vertexViewF32,v=this.vertexViewU32,y=this.vertexCount*this.vertexComponentCount-1;return g[++y]=t,g[++y]=e,g[++y]=o,g[++y]=a,g[++y]=f,v[++y]=u,g[++y]=i,g[++y]=n,g[++y]=o,g[++y]=l,g[++y]=f,v[++y]=c,g[++y]=s,g[++y]=r,g[++y]=h,g[++y]=l,g[++y]=f,v[++y]=d,this.vertexCount+=3,p},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,w,b,T,S,A,C,_,M,P,E){this.renderer.setPipeline(this,t);var k=this._tempMatrix1,L=this._tempMatrix2,F=this._tempMatrix3,R=y/i+_,O=m/n+M,B=(y+x)/i+_,D=(m+w)/n+M,I=o,Y=a,z=-g,X=-v;if(t.isCropped){var N=t._crop;I=N.width,Y=N.height,o=N.width,a=N.height;var V=y=N.x,U=m=N.y;c&&(V=x-N.x-N.width),d&&!e.isRenderTexture&&(U=w-N.y-N.height),R=V/i+_,O=U/n+M,B=(V+N.width)/i+_,D=(U+N.height)/n+M,z=-g+y,X=-v+m}d^=e.isRenderTexture?1:0,c&&(I*=-1,z+=o),d&&(Y*=-1,X+=a);var G=z+I,W=X+Y;L.applyITRS(s,r,u,h,l),k.copyFrom(P.matrix),E?(k.multiplyWithOffset(E,-P.scrollX*f,-P.scrollY*p),L.e=s,L.f=r,k.multiply(L,F)):(L.e-=P.scrollX*f,L.f-=P.scrollY*p,k.multiply(L,F));var H=F.getX(z,X),j=F.getY(z,X),q=F.getX(z,W),K=F.getY(z,W),J=F.getX(G,W),Z=F.getY(G,W),Q=F.getX(G,X),$=F.getY(G,X);P.roundPixels&&(H|=0,j|=0,q|=0,K|=0,J|=0,Z|=0,Q|=0,$|=0),this.setTexture2D(e,0),this.batchQuad(H,j,q,K,J,Z,Q,$,R,O,B,D,b,T,S,A,C)},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)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n,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.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,w=y.u1,b=y.v1;this.batchQuad(l,u,c,d,f,p,g,v,m,x,w,b,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.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.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;fthis.vertexCapacity&&this.flush();var d=i-t,f=n-e,p=Math.sqrt(d*d+f*f),g=s*(n-e)/p,v=s*(t-i)/p,y=r*(n-e)/p,m=r*(t-i)/p,x=i-y,w=n-m,b=t-g,T=e-v,S=i+y,A=n+m,C=t+g,_=e+v,M=c.getX(x,w),P=c.getY(x,w),E=c.getX(b,T),k=c.getY(b,T),L=c.getX(S,A),F=c.getY(S,A),R=c.getX(C,_),O=c.getY(C,_),B=this.strokeTint,D=this.tintEffect,I=B.TL,Y=B.TR,z=B.BL,X=B.BR,N=this.currentFrame,V=N.u0,U=N.v0,G=N.u1,W=N.v1;if(this.batchQuad(R,O,E,k,M,P,L,F,V,U,G,W,I,Y,z,X,D),!(o<=1)){var H=this.prevQuad,j=this.firstQuad;a>0?this.batchQuad(R,O,E,k,H[0],H[1],H[2],H[3],V,U,G,W,I,Y,z,X,D):(j[0]=E,j[1]=k,j[2]=R,j[3]=O),h?this.batchQuad(j[0],j[1],j[2],j[3],M,P,L,F,V,U,G,W,I,Y,z,X,D):(H[0]=M,H[1]=P,H[2]=L,H[3]=F)}}});t.exports=d},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,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,s){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:s}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*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)):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},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){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;i=(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(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},function(t,e,i){var n=i(98),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=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(5);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=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&&t=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e,i){var n=i(0),s=i(14),r=i(15),o=i(868),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var n=i.cull(e),s=Math.min(n.length,10);if(0===s)return this;this.active=!0;var r,o=this.renderer,a=this.program,h=e.matrix,l={x:0,y:0},u=o.height;for(r=0;r<10;++r)o.setFloat1(a,"uLights["+r+"].radius",0);for(o.setFloat4(a,"uCamera",e.x,e.y,e.rotation,e.zoom),o.setFloat3(a,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(u.texture,0),n.drawArrays(o,u.first,l)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,w,b,T,S,A,C,_,M,P,E){if(this.active){var k;this.renderer.setPipeline(this),t.texture?k=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(k=t.tileset.image.dataSource[0]),k||(k=this.defaultNormalMap),this.setTexture2D(k.glTexture,1);var L=this._tempMatrix1,F=this._tempMatrix2,R=this._tempMatrix3,O=o,B=a,D=-g,I=-v;d^=e.isRenderTexture?1:0,c&&(O*=-1,D+=o),d&&(B*=-1,I+=a),P.roundPixels&&(D|=0,I|=0);var Y=D+O,z=I+B;F.applyITRS(s,r,u,h,l),L.copyFrom(P.matrix),E?(L.multiplyWithOffset(E,-P.scrollX*f,-P.scrollY*p),F.e=s,F.f=r,L.multiply(F,R)):(F.e-=P.scrollX*f,F.f-=P.scrollY*p,L.multiply(F,R));var X=D*R.a+I*R.c+R.e,N=D*R.b+I*R.d+R.f,V=D*R.a+z*R.c+R.e,U=D*R.b+z*R.d+R.f,G=Y*R.a+z*R.c+R.e,W=Y*R.b+z*R.d+R.f,H=Y*R.a+I*R.c+R.e,j=Y*R.b+I*R.d+R.f;P.roundPixels&&(X|=0,N|=0,V|=0,U|=0,G|=0,W|=0,H|=0,j|=0);var q=y/i+_,K=m/n+M,J=(y+x)/i+_,Z=(m+w)/n+M;this.setTexture2D(e,0),this.batchVertices(X,N,V,U,G,W,H,j,q,K,J,Z,b,T,S,A,C)}},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},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),r.prototype.batchSprite.call(this,t,e,i))}}});o.LIGHT_COUNT=10,t.exports=o},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(16);t.exports=function(t){return t*n.RAD_TO_DEG}},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=i(0),s=i(15),r=i(35),o=i(4),a=i(155),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},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}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},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=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=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,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var n=i(71),s=i(5);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;u1?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(52),s=i(88),r=i(33),o=i(0),a=i(14),h=i(15),l=i(11),u=i(31),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.ScaleMode,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){return void 0===i&&(i=!0),this.width=t,this.height=e,i&&this.input&&this.input.hitArea instanceof l&&(this.input.hitArea.width=t,this.input.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){var i=-t/2,n=-e/2;return this.setDropZone(new l(i,n,t,e),u)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(8),r=i(72),o=i(62),a=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},add:function(t){return this.queue(r(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),s=e;switch(i){case"+":s+=n;break;case"-":s-=n}return Math.max(0,s)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n0?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=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;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 o.ACTIVE:for(var n=this.totalData,s=0;s0?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){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=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(129),r=i(42),o=i(74),a=i(128),h=i(107),l=i(1025);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(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n=i(0),s=i(19),r=i(1),o=i(109),a=i(7),h=new n({Extends:s,initialize:function(t,e,i,n){if(a(e)){var o=e;e=r(o,"key"),n=r(o,"config",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,h),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t=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=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",e,this,t),this.pad.emit("down",i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit("up",e,this,t),this.pad.emit("up",i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)>>16,m=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+y+","+m+","+x+","+d+")",c.lineWidth=v,w+=3;break;case n.FILL_STYLE:g=l[w+1],f=l[w+2],y=(16711680&g)>>>16,m=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+y+","+m+","+x+","+f+")",w+=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[w+1],l[w+2],l[w+3],l[w+4]):c.fillRect(l[w+1],l[w+2],l[w+3],l[w+4]),w+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[w+1],l[w+2]),c.lineTo(l[w+3],l[w+4]),c.lineTo(l[w+5],l[w+6]),c.closePath(),h||c.fill(),w+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[w+1],l[w+2]),c.lineTo(l[w+3],l[w+4]),c.lineTo(l[w+5],l[w+6]),c.closePath(),h||c.stroke(),w+=6;break;case n.LINE_TO:c.lineTo(l[w+1],l[w+2]),w+=2;break;case n.MOVE_TO:c.moveTo(l[w+1],l[w+2]),w+=2;break;case n.LINE_FX_TO:c.lineTo(l[w+1],l[w+2]),w+=5;break;case n.MOVE_FX_TO:c.moveTo(l[w+1],l[w+2]),w+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[w+1],l[w+2]),w+=2;break;case n.SCALE:c.scale(l[w+1],l[w+2]),w+=2;break;case n.ROTATE:c.rotate(l[w+1]),w+=1;break;case n.GRADIENT_FILL_STYLE:w+=5;break;case n.GRADIENT_LINE_STYLE:w+=6;break;case n.SET_TEXTURE:w+=2}c.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},function(t,e,i){var n=i(184),s=i(114),r=i(65),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;hr;){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));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),s=0;s-1;r--)n[s][r]=t[r][s]}return n}},function(t,e,i){t.exports={AtlasXML:i(486),Canvas:i(485),Image:i(484),JSONArray:i(483),JSONHash:i(482),SpriteSheet:i(481),SpriteSheetFromAtlas:i(480),UnityYAML:i(479)}},function(t,e,i){var n=i(24),s=i(0),r=i(84),o=i(60),a=new s({initialize:function(t,e,i,n){var s=t.manager.game;this.renderer=s.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=n||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isRenderTexture="RenderTexture"===e.type,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&this.renderer.canvasToTexture(this.image,this.glTexture)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){var n=i(24),s=i(487),r=i(0),o=i(30),a=i(22),h=i(8),l=i(268),u=i(3),c=i(189),d=i(120),f=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once("boot",this.boot,this)},boot:function(){this._pending=2,this.on("onload",this.updatePending,this),this.on("onerror",this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once("destroy",this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off("onload"),this.off("onerror"),this.game.events.emit("texturesready"))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit("removetexture",t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit("onerror",t)},n.onload=function(){var e=i.create(t,n);c.Image(e,0),i.emit("addtexture",t,e),i.emit("onload",t,e)},n.src=e}},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var r="",o=this.getFrame(t,e);if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,s),n.remove(h)}return r},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),c.Image(n,0),i&&n.setDataSource(i),this.emit("addtexture",t,n)),n},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit("addtexture",t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,l(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var s=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,s)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new s(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new s(this,t,e,e.width,e.height),this.list[t]=n,this.emit("addtexture",t,n)),n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var s=null;if(this.checkKey(t)){if(s=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var s=this.getFrame(i,n);if(s){var r=s.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],n=1;n0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("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("ended",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.emit("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.emit("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,"rate",t)||(this.calculateRate(),this.emit("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,"detune",t)||(this.calculateRate(),this.emit("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("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("loop",this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=s},function(t,e,i){var n=i(79),s=i(0),r=i(196),o=new s({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var n=0;n-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("transitioninit",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("complete",this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;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)}},resize:function(t,e){for(var i=0;i=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=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,i){var n=i(0),s=i(8),r=i(6),o=i(13),a=i(9),h=i(1),l=i(10),u=i(202),c=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once("boot",this.boot,this)},boot:function(){var t,e,i,n,s,r,o,a=this.game.config,l=a.installGlobalPlugins;for(l=l.concat(this._pendingGlobal),t=0;t10&&(t=10-this.pointersTotal);for(var i=0;i0},queueTouchStart:function(t){if(this.queue.push(s.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueTouchMove:function(t){if(this.queue.push(s.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueTouchEnd:function(t){if(this.queue.push(s.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},queueMouseDown:function(t){if(this.queue.push(s.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueMouseMove:function(t){if(this.queue.push(s.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueMouseUp:function(t){if(this.queue.push(s.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t){var e=t.input;if(!e||!e.enabled||!t.willRender())return!1;var i=!0,n=t.parentContainer;if(n)do{if(!n.visible){i=!1;break}n=n.parentContainer}while(n);return i},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var s=this._tempPoint,r=i._cx,o=i._cy,a=i._cw,h=i._ch,l=i.scrollX,u=i.scrollY;n.length=0;var d=t.x,f=t.y;if(!(d>=r&&f>=o&&d<=r+a&&f<=o+h))return n;i.getWorldPoint(d,f,s),t.worldX=s.x,t.worldY=s.y;for(var p={x:0,y:0},g=this._tempMatrix,v=0;ve.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=i(20),s=i(0),r=i(215),o=i(214),a=i(3),h=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,a(i,"frames",[]),a(i,"defaultTextureKey",null)),this.frameRate=a(i,"frameRate",null),this.duration=a(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=a(i,"skipMissedFrames",!0),this.delay=a(i,"delay",0),this.repeat=a(i,"repeat",0),this.repeatDelay=a(i,"repeatDelay",0),this.yoyo=a(i,"yoyo",!1),this.showOnStart=a(i,"showOnStart",!1),this.hideOnComplete=a(i,"hideOnComplete",!1),this.paused=!1,this.manager.on("pauseall",this.pause,this),this.manager.on("resumeall",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=l[0],l[0].prevFrame=s;var v=1/(l.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._timeScale=1,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),r(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?(t.forward=!1,this._updateAndGetNextTick(t,e.prevFrame)):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this._updateAndGetNextTick(t,e.nextFrame)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?(t.forward=!0,this._updateAndGetNextTick(t,e.nextFrame)):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this._updateAndGetNextTick(t,t.currentFrame)):(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);t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,t.parent.emit("animationrepeat",this,t.currentFrame,t.repeatCounter)))},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=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off("pauseall",this.pause,this),this.manager.off("resumeall",this.resume,this),this.manager.remove(this.key);for(var t=0;t=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,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;tl+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,i){var n=i(5),s=i(71);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=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){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(0),s=i(148),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,t=this.frame,this.uv[0]=t.u0,this.uv[1]=t.v0,this.uv[2]=t.u0,this.uv[3]=t.v1,this.uv[4]=t.u1,this.uv[5]=t.v1,this.uv[6]=t.u0,this.uv[7]=t.v0,this.uv[8]=t.u1,this.uv[9]=t.v1,this.uv[10]=t.u1,this.uv[11]=t.v0,this},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e,i){var n=i(24),s=i(0),r=i(14),o=i(22),a=i(15),h=i(414),l=i(893),u=i(4),c=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.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,s,r,l,c){var d=t.sys.game.renderer;a.call(this,t,"TileSprite"),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=null,this.displayFrame=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.setTexture(l,c),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.displayFrame.width),this.potHeight=h(this.displayFrame.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.dirty=!0,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(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,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.displayFrame=this.displayTexture.get(t),this.displayFrame.cutWidth&&this.displayFrame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.displayFrame.customPivot?this.setOrigin(this.displayFrame.pivotX,this.displayFrame.pivotY):this.updateDisplayOrigin()),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&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){if(this.dirty){var t=this.displayFrame,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.resize(this.width,this.height)),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context,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=c},function(t,e,i){var n=i(289),s=i(24),r=i(0),o=i(14),a=i(22),h=i(94),l=i(15),u=i(899),c=i(421),d=new r({Extends:l,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,u],initialize:function(t,e,i,r,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=32),void 0===o&&(o=32),l.call(this,t,"RenderTexture"),this.renderer=t.sys.game.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=s.create2D(this,r,o),this.context=this.canvas.getContext("2d"),this.framebuffer=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(c(),this.canvas),this.frame=this.texture.get(),this.camera=new n(0,0,r,o),this.dirty=!1,this.gl=null;var h=this.renderer;if(h.type===a.WEBGL){var u=h.gl;this.gl=u,this.drawGameObject=this.batchGameObjectWebGL,this.framebuffer=h.createFramebuffer(r,o,this.frame.source.glTexture,!1)}else h.type===a.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas);this.camera.setScene(t),this.setPosition(e,i),this.setSize(r,o),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline")},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){if(void 0===e&&(e=t),t!==this.width||e!==this.height){if(this.canvas)this.canvas.width=t,this.canvas.height=e;else{var i=this.gl;this.renderer.deleteTexture(this.frame.source.glTexture),this.renderer.deleteFramebuffer(this.framebuffer),this.frame.source.glTexture=this.renderer.createTexture2D(0,i.NEAREST,i.NEAREST,i.CLAMP_TO_EDGE,i.CLAMP_TO_EDGE,i.RGBA,null,t,e,!1),this.framebuffer=this.renderer.createFramebuffer(t,e,this.texture,!1),this.frame.glTexture=this.frame.source.glTexture}this.camera.setSize(t,e),this.frame.setSize(t,e),this.width=t,this.height=e}return 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.texture},fill:function(t,e){void 0===e&&(e=1);var i=255&(t>>16|0),n=255&(t>>8|0),s=255&(0|t);if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var r=this.gl;r.clearColor(i/255,n/255,s/255,e),r.clear(r.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else this.context.fillStyle="rgb("+i+","+n+","+s+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height);return this},clear:function(){if(this.dirty){if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,this.canvas.width,this.canvas.height),e.restore()}this.dirty=!1}return 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,1),r){this.renderer.setFramebuffer(this.framebuffer);var o=this.pipeline;o.projOrtho(0,this.width,0,this.height,-1e3,1e3),this.batchList(t,e,i,n,s),o.flush(),this.renderer.setFramebuffer(null),o.projOrtho(0,o.width,o.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,1),o){this.renderer.setFramebuffer(this.framebuffer);var h=this.pipeline;h.projOrtho(0,this.width,0,this.height,-1e3,1e3),h.batchTextureFrame(a,i,n,r,s,this.camera.matrix,null),h.flush(),this.renderer.setFramebuffer(null),h.projOrtho(0,h.width,h.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i,n,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;r0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;s0)for(var e=this.list,i=new a,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=c},function(t,e,i){var n=i(917),s=i(914),r=i(0),o=i(14),a=i(94),h=i(15),l=i(93),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},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(3),s=i(96),r=function(t,e,i){for(var n=[],s=0;s0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(4);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=c*p-d*f,v=p/g,y=-d/g,m=-f/g,x=c/g,w=(f*s-p*i)/g,b=-(c*s-d*i)/g;return h.x=t*v+e*m+w,h.y=t*y+e*x+b,h}},function(t,e,i){var n=i(159);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var w=i;wh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(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.nextZ;p&&p.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;p=p.nextZ}for(p=t.prevZ;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}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)&&w(s,r)&&w(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),S(n),S(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=b(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)&&w(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(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)&&w(t,e)&&w(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 w(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 b(t,e){var i=new A(t.i,t.x,t.y),n=new A(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 T(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(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 C(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,i){var n=i(0),s=i(502),r=i(501),o=i(132),a=new n({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:s,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var n=t.bitmapMask,s=this.renderer,r=this.gl,o=n.visible;n&&r&&(s.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.visible=!0,n.renderWebGL(s,n,0,i),n.visible=o,s.flush(),s.setFramebuffer(t.mainFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT))},endMask:function(t){var e=t.bitmapMask,i=this.renderer,n=this.gl;e&&(i.setFramebuffer(null),i.setPipeline(this),i.setTexture2D(t.maskTexture,1),i.setTexture2D(t.mainTexture,0),i.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),n.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var n=t.getContext("experimental-webgl"),s=new Uint8Array(n.drawingBufferWidth*n.drawingBufferHeight*4);n.readPixels(0,0,n.drawingBufferWidth,n.drawingBufferHeight,n.RGBA,n.UNSIGNED_BYTE,s);var r,o=document.createElement("canvas"),a=o.getContext("2d");o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;for(var h=(r=a.getImageData(0,0,o.width,o.height)).data,l=0;l2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.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>16&&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){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl,i=this.width,n=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture&&(i=t.renderTexture.width,n=t.renderTexture.height),e.bindFramebuffer(e.FRAMEBUFFER,t),e.viewport(0,0,i,n),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 o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR&&this.config.antialias&&(a=o.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=void 0===l||null===l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},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&&o(this.nativeTextures,e),this.gl.deleteTexture(t),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,s=t._ch;if(this.pushScissor(e,i,n,s),t.backgroundColor.alphaGL>0){var r=t.backgroundColor;this.pipelines.TextureTintPipeline.drawFillRect(e,i,n,s,a.getTintFromFloats(r.redGL,r.greenGL,r.blueGL,1),r.alphaGL)}},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;t.flashEffect.postRenderWebGL(e,a.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,a.getTintFromFloats),t.dirty=!1,this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&(t.enable(t.SCISSOR_TEST),t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height)),this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;l=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===m&&(v>=0?v=-(v+f):v<0&&(v=Math.abs(v)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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.scale(y,m),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.drawImage(e.source.image,u,c,d,f,g,v,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},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;var t=this;this.step=function e(i){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.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,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){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},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(57);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&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","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=function(t,e,i,n,s){var r=.5*(n-e),o=.5*(s-i),a=t*t;return(2*i-2*n+r+o)*(t*a)+(-3*i+3*n-2*r-o)*a+r*t+i}},function(t,e,i){var n=i(11);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,r,o=Number.MAX_VALUE,a=Number.MAX_VALUE,h=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,u=0;u16777215?{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(30),s=i(285);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e,i){var n=i(30);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,i){var n=i(0),s=i(39),r=i(8),o=i(11),a=i(32),h=i(134),l=i(4),u=new n({Extends:r,initialize:function(t,e,i,n){r.call(this),this.scene,this.sceneManager,this.config,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.visible=!0,this.useBounds=!1,this.worldView=new o,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 o,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new a,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.alpha=1,this.disableCull=!1,this.culledObjects=[],this.midPoint=new l(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},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 l);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},centerOn:function(t,e){var i=.5*this.width,n=.5*this.height;return this.midPoint.set(t,e),this.scrollX=t-i,this.scrollY=e-n,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),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;g-y&&T>-m&&b-y&&A>-m&&Ss&&(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=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=h(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return 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},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=t,this.config=t.sys.game.config,this.sceneManager=t.sys.game.scene;var e=this.config.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,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},setVisible:function(t){return this.visible=t,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(){var t=!1;if(0!==this._x||0!==this._y)t=!0;else{var e=this.config.width,i=this.config.height;e===this._width&&i===this._height||(t=!0)}var n=this.sceneManager;t&&!this._customViewport?n.customViewports++:!t&&this._customViewport&&n.customViewports--,this.dirty=!0,this._customViewport=t},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.config=null,this.sceneManager=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=u},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,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){void 0===e&&(e=1);for(var i=null,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;i--){var n=Math.floor(this.frac()*(e+1)),s=t[n];t[n]=t[i],t[i]=s}return t}});t.exports=n},function(t,e,i){var n=i(138),s=i(65),r=i(16),o=i(5);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){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n={};t.exports=n;var s=i(129),r=i(107),o=i(335),a=i(128),h=i(687),l=i(42);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,s=r.magnitude(r.sub(i,n));e.length=void 0!==e.length?e.length:s,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e,i){var n={};t.exports=n;var s=i(42);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r=2&&t.length<=40&&FBInstant.logEvent(t,parseFloat(e),i),this},destroy:function(){FBInstant.quit(),this.game=null}}));t.exports=o},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once("remove",this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,this._timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this._delay=0,this._repeat=0,this._repeatDelay=0,this._yoyo=!1,this.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,i){return this.play(e,!0,i),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._startAnimation(t,i))},playReverse:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=0),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,i))},_startAnimation:function(t,e){this.load(t,e);var i=this.currentAnim,n=this.parent;return this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,i.showOnStart&&(n.visible=!0),n.emit("animationstart",this.currentAnim,this.currentFrame),n},reverse:function(t){return this.isPlaying&&this.currentAnim.key===t?(this._reverse=!this._reverse,this.forward=!this.forward,this.parent):this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=0,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){return void 0===t&&(t=!1),this.currentAnim.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(this.currentAnim.frames[0]),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t=this.parent;return t.emit("animationcomplete",this.currentAnim,this.currentFrame),t},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=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.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("animationupdate",i,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(168),r=i(10),o=i(167),a=i(62),h=i(72),l=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.timeScale=1},createTimeline:function(t){return o(this,t)},timeline:function(t){var e=o(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return h(this,t)},add:function(t){var e=h(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=s(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active;for(t=0;t-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;ta&&(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(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","object layer"),this.opacity=s(t,"opacity",1),this.properties=s(t,"properties",{}),this.propertyTypes=s(t,"propertytypes",{}),this.type=s(t,"type","objectgroup"),this.visible=s(t,"visible",!0),this.objects=s(t,"objects",[])}});t.exports=r},function(t,e,i){var n=i(640),s=i(320),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=s(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?(a.ellipse=t.ellipse,a.width=t.width,a.height=t.height):t.text?(a.width=t.width,a.height=t.height,a.text=t.text):(a.rectangle=!0,a.width=t.width,a.height=t.height);return a}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t-1}return!1}},function(t,e,i){var n=i(23);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off("update",this.step,this),t.events.emit("transitioncomplete",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){return this.manager.add(t,e,i),this},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){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),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)},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("shutdown",this.shutdown,this),t.off("postupdate",this.step,this),t.off("transitionout")},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),t.exports=a},function(t,e,i){var n=i(80),s=i(17),r={SceneManager:i(201),ScenePlugin:i(331),Settings:i(199),Systems:i(121)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(172),s=new(i(0))({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this)},boot:function(){}});t.exports=s},function(t,e,i){t.exports={BasePlugin:i(172),DefaultPlugins:i(123),PluginCache:i(10),PluginManager:i(203),ScenePlugin:i(333)}},function(t,e,i){var n={};t.exports=n;var s=i(304);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){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e,i){var n=i(33),s=i(0),r=i(43),o=i(31),a=i(4),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,n){void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y);var s=this.gameObject;return!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.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),this.offset.set(i,n),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.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)},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;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),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=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(43);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(43);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=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(33),s=i(0),r=i(43),o=i(154),a=i(11),h=i(31),l=i(32),u=i(4),c=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.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(e.x,e.y),this.prev=new u(e.x,e.y),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new u(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=new u,this.newVelocity=new u,this.deltaMax=new u,this.acceleration=new u,this.allowDrag=!0,this.drag=new u,this.allowGravity=!0,this.gravity=new u,this.bounce=new u,this.worldBounce=null,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new u(1e4,1e4),this.friction=new u(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=r.FACING_NONE,this.immovable=!1,this.moves=!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.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.physicsType=r.DYNAMIC_BODY,this._reset=!0,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._bounds=new a,this._tempMatrix=new l},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this._tempMatrix);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY;var n=!1;if(this.syncBounds){var s=t.getBounds(this._bounds);this.width=s.width,this.height=s.height,n=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},update:function(t){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,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.none=!0,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1,this.updateBounds();var e=this.transform;if(this.position.x=e.x+e.scaleX*(this.offset.x-e.displayOriginX),this.position.y=e.y+e.scaleY*(this.offset.y-e.displayOriginY),this.updateCenter(),this.rotation=e.rotation,this.preRotation=this.rotation,this._reset&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves){this.world.updateMotion(this,t);var i=this.velocity.x,n=this.velocity.y;this.newVelocity.set(i*t,n*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(n,i),this.speed=Math.sqrt(i*i+n*n),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit("worldbounds",this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.deltaX(),this._dy=this.deltaY()},postUpdate:function(){this._dx=this.deltaX(),this._dy=this.deltaY(),this.moves&&(0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this._dx<0?this.facing=r.FACING_LEFT:this._dx>0&&(this.facing=r.FACING_RIGHT),this._dy<0?this.facing=r.FACING_UP:this._dy>0&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),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(this.position),this.prev.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?n(this,t,e):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.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},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(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,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){return void 0===t&&(t=!0),this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),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},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=c},function(t,e,i){var n=i(343),s=i(20),r=i(0),o=i(342),a=i(43),h=i(58),l=i(8),u=i(356),c=i(355),d=i(354),f=i(341),p=i(340),g=i(3),v=i(229),y=i(696),m=i(11),x=i(228),w=i(695),b=i(690),T=i(689),S=i(70),A=i(338),C=i(339),_=i(4),M=i(40),P=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.bodies=new S,this.staticBodies=new S,this.pendingDestroy=new S,this.colliders=new v,this.gravity=new _(g(e,"gravity.x",0),g(e,"gravity.y",0)),this.bounds=new m(g(e,"x",0),g(e,"y",0),g(e,"width",t.sys.game.config.width),g(e,"height",t.sys.game.config.height)),this.checkCollision={up:g(e,"checkCollision.up",!0),down:g(e,"checkCollision.down",!0),left:g(e,"checkCollision.left",!0),right:g(e,"checkCollision.right",!0)},this.fps=g(e,"fps",60),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(e,"timeScale",1),this.OVERLAP_BIAS=g(e,"overlapBias",4),this.TILE_BIAS=g(e,"tileBias",16),this.forceX=g(e,"forceX",!1),this.isPaused=g(e,"isPaused",!1),this._total=0,this.drawDebug=g(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(e,"debugShowBody",!0),debugShowStaticBody:g(e,"debugShowStaticBody",!0),debugShowVelocity:g(e,"debugShowVelocity",!0),bodyDebugColor:g(e,"debugBodyColor",16711935),staticBodyDebugColor:g(e,"debugStaticBodyColor",255),velocityDebugColor:g(e,"debugVelocityColor",65280)},this.maxEntries=g(e,"maxEntries",16),this.useTree=g(e,"useTree",!0),this.tree=new x(this.maxEntries),this.staticTree=new x(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=a.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=s;)this._elapsed-=s,i++,this.step(n);this.stepsLastFrame=i}},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(o=(r=s.entries).length,t=0;ta.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(u.x,u.y,l.right,l.y)-u.radius):u.y>l.bottom&&(u.xl.right&&(a=h(u.x,u.y,l.right,l.bottom)-u.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=c*Math.cos(o)+d*Math.sin(o),w=c*Math.sin(o)-d*Math.cos(o),b=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),S=((g-m)*x+2*m*b)/(g+m),A=(2*g*x+(m-g)*b)/(g+m);t.immovable||(t.velocity.x=(S*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+S*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(A*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+A*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>c?t.velocity.x*=-1:v<0&&!e.immovable&&c0&&!t.immovable&&y>d?t.velocity.y*=-1:y<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&v0&&!e.immovable&&c>v?e.velocity.x*=-1:d<0&&!t.immovable&&y0&&!e.immovable&&c>y&&(e.velocity.y*=-1));var C=this._frameTime;return t.immovable||(t.x+=t.velocity.x*C-a*Math.cos(o),t.y+=t.velocity.y*C-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*C+a*Math.cos(o),e.y+=e.velocity.y*C+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("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;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)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,p=e.getTilesWithinWorldXY(a,h,l,u);if(0===p.length)return!1;for(var g={left:0,right:0,top:0,bottom:0},v=0;ve-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=0?t:t+2*Math.PI}},function(t,e,i){var n=i(0),s=i(18),r=i(70),o=i(8),a=i(6),h=i(1),l=i(10),u=i(75),c=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=u(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=s.LOADER_IDLE,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this.systems.events.once("shutdown",this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},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("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("update",this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit("progress",this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.size0&&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,i){var n=i(0),s=i(8),r=i(3),o=i(76),a=i(178),h=i(110),l=i(177),u=i(374),c=i(373),d=i(372),f=i(146),p=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.keys=[],this.combos=[],this.queue=[],this.onKeyHandler,this.time=0,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.settings.input,e=this.scene.sys.game.config;this.enabled=r(t,"keyboard",e.inputKeyboard),this.target=r(t,"keyboard.target",e.inputKeyboardEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=function(e){if(!e.defaultPrevented&&t.isActive()){t.queue.push(e);var i=t.keys[e.keyCode];i&&i.preventDefault&&e.preventDefault()}};this.onKeyHandler=e,this.target.addEventListener("keydown",e,!1),this.target.addEventListener("keyup",e,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("keydown",this.onKeyHandler),this.target.removeEventListener("keyup",this.onKeyHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},createCursorKeys:function(){return this.addKeys({up:h.UP,down:h.DOWN,left:h.LEFT,right:h.RIGHT,space:h.SPACE,shift:h.SHIFT})},addKeys:function(t){var e={};if("string"==typeof t){t=t.split(",");for(var i=0;i-1?e[i]=t:e[t.keyCode]=t,t}return"string"==typeof t&&(t=h[t.toUpperCase()]),e[t]||(e[t]=new a(t)),e[t]},removeKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=h[t.toUpperCase()]);e[t]&&(e[t]=void 0)},createCombo:function(t,e){return new l(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=f(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.queue.length;if(this.enabled&&0!==e)for(var i=this.queue.splice(0,e),n=this.keys,s=0;s=e}}},function(t,e,i){var n=i(88),s=i(33),r=i(0),o=i(182),a=i(380),h=i(58),l=i(115),u=i(55),c=i(8),d=i(1),f=i(76),p=i(7),g=i(10),v=i(11),y=i(31),m=i(68),x=i(61),w=new r({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,f.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once("destroy",this.destroy,this),this.pluginEvents.emit("boot")},start:function(){var t=this.systems.events;t.on("transitionstart",this.transitionIn,this),t.on("transitionout",this.transitionOut,this),t.on("transitioncomplete",this.transitionComplete,this),t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.enabled=!0,this.pluginEvents.emit("start")},preUpdate:function(){this.pluginEvents.emit("preUpdate");var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){this.pluginEvents.emit("update",t,e);var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(n=!0,this._pollTimer=this.pollRate)),n)for(var s=this.manager.pointers,r=0;r0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,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=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var a=[];for(i=0;i1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3===t.dragState){for(s=this._drag[t.id],i=0;i0?(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),r.target=l[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),l[0]?(r.target=l[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):r.target=null)}else!r.target&&l[0]&&(r.target=l[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target));var c=t.x-n.input.dragX,d=t.y-n.input.dragY;n.emit("drag",t,c,d),this.emit("drag",t,n,c,d)}return s.length}if(5===t.dragState){for(s=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,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 a(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,a=!1;if(p(e)){var h=e;e=d(h,"hitArea",null),i=d(h,"hitAreaCallback",null),n=d(h,"draggable",!1),s=d(h,"dropZone",!1),r=d(h,"cursor",!1),a=d(h,"useHandCursor",!1);var l=d(h,"pixelPerfect",!1),u=d(h,"alphaTolerance",1);l&&(e={},i=this.makePixelPerfect(u)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;ct.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom0){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){t.exports={CircleToCircle:i(850),CircleToRectangle:i(849),GetRectangleIntersection:i(848),LineToCircle:i(401),LineToLine:i(147),LineToRectangle:i(847),PointToLine:i(400),PointToLineSegment:i(846),RectangleToRectangle:i(238),RectangleToTriangle:i(845),RectangleToValues:i(844),TriangleToCircle:i(843),TriangleToLine:i(842),TriangleToTriangle:i(841)}},function(t,e,i){t.exports={Circle:i(860),Ellipse:i(244),Intersects:i(402),Line:i(840),Point:i(822),Polygon:i(808),Rectangle:i(393),Triangle:i(779)}},function(t,e,i){var n=i(0),s=i(405),r=i(152),o=i(21),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},l=t.matrix,u=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),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=a},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(111);s.register("text",function(t,e){void 0===t&&(t={});var i=r(t,"text",""),s=r(t,"style",null),a=r(t,"padding",null);null!==a&&(s.padding=a);var h=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h})},function(t,e,i){var n=i(25),s=i(130),r=i(13),o=i(12),a=i(35);r.register("sprite",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),s(h,t),h})},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(69);s.register("image",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},function(t,e,i){var n=i(13),s=i(117);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new s(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(111);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(35);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(69);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(117);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<r;h--){for(l=0;l0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e){t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}},function(t,e,i){var n=i(0),s=i(39),r=i(63),o=i(3),a=i(35),h=i(62),l=i(4),u=new n({Extends:a,initialize:function(t,e,i,n,s,r){a.call(this,t,i,n,s,r),this.path=e,this.rotateToPath=!1,this.pathRotationVerticalAdjust=!1,this.pathRotationOffset=0,this.pathOffset=new l(i,n),this.pathVector=new l,this.pathTween,this.pathConfig=null,this._prevDirection=h.PLAYING_FORWARD},setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=!1),this.rotateToPath=t,this.pathRotationOffset=e,this.pathRotationVerticalAdjust=i,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=0,t.to=1;var n=r(t,"positionOnPath",!1);if(this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0),this.pathRotationVerticalAdjust=r(t,"verticalAdjust",!1),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),n&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=h.PLAYING_FORWARD,this.rotateToPath){var a=this.path.getPoint(.1);this.rotation=Math.atan2(a.y-this.y,a.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},preUpdate:function(t,e){this.anims.update(t,e);var i=this.pathTween;if(i){var n=i.data[0];if(n.state!==h.PLAYING_FORWARD&&n.state!==h.PLAYING_BACKWARD)return;var r=this.pathVector;this.path.getPoint(i.getValue(),r),r.add(this.pathOffset);var o=this.x,a=this.y;this.setPosition(r.x,r.y);var l=this.x-o,u=this.y-a;if(0===l&&0===u)return;if(n.state!==this._prevDirection)return void(this._prevDirection=n.state);this.rotateToPath&&(this.rotation=Math.atan2(u,l)+s(this.pathRotationOffset),this.pathRotationVerticalAdjust&&(this.flipY=0!==this.rotation&&n.state===h.PLAYING_BACKWARD))}}});t.exports=u},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e){t.exports=function(t,e){for(var i=0;ithis._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,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=i(52),s=i(0),r=i(14),o=i(426),a=i(425),h=i(904),l=i(1),u=i(150),c=i(424),d=i(112),f=i(428),p=i(423),g=i(11),v=i(83),y=i(4),m=i(40),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),this.y=new h(e,"y",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),this.angle=new h(e,"angle",{min:0,max:360}),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?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(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},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=i(0),s=i(39),r=i(58),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>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"),this.index=i.alive.length},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(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&&e.cameraFilter&r.id)o&&(o.style.display="none");else{var a=t.pipelines.TextureTintPipeline._tempMatrix1,h=t.pipelines.TextureTintPipeline._tempMatrix2,l=t.pipelines.TextureTintPipeline._tempMatrix3,u=e.originX*e.width,c=e.originY*e.height;h.applyITRS(e.x-u-r.scrollX*e.scrollFactorX,e.y-c-r.scrollY*e.scrollFactorY,e.rotation,e.scaleX,e.scaleY),a.copyFrom(r.matrix),a.multiply(h,l),o.style.display="block",o.style.opacity=e.alpha,o.style.zIndex=e._depth,o.style.pointerEvents="auto",o.style.mixBlendMode=n[e._blendMode],o.style.transform=l.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",o.style.transformOrigin=100*e.originX+"% "+100*e.originY+"%"}}},function(t,e,i){var n=i(0),s=i(14),r=i(910),o=i(15),a=i(155),h=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.skewX=0,this.skewY=0,this.rotate3d=new a,this.rotate3dAngle="deg",this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),n&&this.setElement(n)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e,i){var n=i(56);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return n(t,s)}},function(t,e,i){var n=i(29);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;ht.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(249);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),o=0;o=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(i>0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e,i){var n=i(29);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){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,i,n,s){if(void 0===s&&(s=t),i>0){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.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t},tick:function(){this.step(window.performance.now())},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(window.performance.now())},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){var i=0,n=function(t,e,n,s){var r=i-s.y-s.height;t.add(n,e,s.x,r,s.width,s.height)};t.exports=function(t,e,s){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=s.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;cx||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var _=l,M=l,P=0,E=e.sourceIndex,k=0;kg||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,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,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(34);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=n(h)}for(var l in i)"frames"!==l&&(Array.isArray(i[l])?t.customData[l]=i[l].slice(0):t.customData[l]=i[l]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var n=i(34);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a=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,i){var n=i(57),s=i(81),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(57),browser:i(81),features:i(122),input:i(494),audio:i(493),video:i(492),fullscreen:i(491),canvasFeatures:i(209)}},function(t,e,i){var n=i(22);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){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){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 tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid texture-based tint"," color.rgb = mix(texture.rgb, outTint.rgb, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},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){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];","","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(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_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_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,i){var n=i(264),s=i(24),r=i(22),o=i(122);t.exports=function(t){var e,a,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.antialias||s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width*h.resolution,h.height*h.resolution,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||n.setCrisp(t.canvas),t.canvas.style.width=(h.width*h.zoom).toString()+"px",t.canvas.style.height=(h.height*h.zoom).toString()+"px",h.renderType!==r.HEADLESS&&(e=i(259),a=i(256),h.renderType===r.WEBGL?(t.renderer=new a(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(85);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style=["display: block;","width: "+t.canvas.width+"px;","height: "+t.canvas.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e,i){var n=i(0),s=i(22),r=i(1),o=i(3),a=i(7),h=i(16),l=i(2),u=i(123),c=i(134),d=new n({initialize:function(t){void 0===t&&(t={});this.width=o(t,"width",1024),this.height=o(t,"height",768),this.zoom=o(t,"zoom",1),this.resolution=o(t,"resolution",1),this.renderType=o(t,"type",s.AUTO),this.parent=o(t,"parent",null),this.canvas=o(t,"canvas",null),this.context=o(t,"context",null),this.canvasStyle=o(t,"canvasStyle",null),this.sceneConfig=o(t,"scene",null),this.seed=o(t,"seed",[(Date.now()*Math.random()).toString()]),h.RND.init(this.seed),this.gameTitle=o(t,"title",""),this.gameURL=o(t,"url","https://phaser.io"),this.gameVersion=o(t,"version",""),this.autoFocus=o(t,"autoFocus",!0),this.domCreateContainer=o(t,"dom.createContainer",!1),this.domBehindCanvas=o(t,"dom.behindCanvas",!1),this.inputKeyboard=o(t,"input.keyboard",!0),this.inputKeyboardEventTarget=o(t,"input.keyboard.target",window),this.inputMouse=o(t,"input.mouse",!0),this.inputMouseEventTarget=o(t,"input.mouse.target",null),this.inputMouseCapture=o(t,"input.mouse.capture",!0),this.inputTouch=o(t,"input.touch",!0),this.inputTouchEventTarget=o(t,"input.touch.target",null),this.inputTouchCapture=o(t,"input.touch.capture",!0),this.inputActivePointers=o(t,"input.activePointers",1),this.inputGamepad=o(t,"input.gamepad",!1),this.inputGamepadEventTarget=o(t,"input.gamepad.target",window),this.disableContextMenu=o(t,"disableContextMenu",!1),this.audio=o(t,"audio"),this.hideBanner=!1===o(t,"banner",null),this.hidePhaser=o(t,"banner.hidePhaser",!1),this.bannerTextColor=o(t,"banner.text","#ffffff"),this.bannerBackgroundColor=o(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(t,"fps",null);var e=o(t,"render",t);this.autoResize=o(e,"autoResize",!1),this.antialias=o(e,"antialias",!0),this.roundPixels=o(e,"roundPixels",!1),this.pixelArt=o(e,"pixelArt",!1),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(e,"transparent",!1),this.clearBeforeRender=o(e,"clearBeforeRender",!0),this.premultipliedAlpha=o(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=o(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=o(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(e,"powerPreference","default"),this.batchSize=o(e,"batchSize",2e3);var i=o(t,"backgroundColor",0);this.backgroundColor=c(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(t,"callbacks.preBoot",l),this.postBoot=o(t,"callbacks.postBoot",l),this.physics=o(t,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(t,"loader.baseURL",""),this.loaderPath=o(t,"loader.path",""),this.loaderMaxParallelDownloads=o(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(t,"loader.crossOrigin",void 0),this.loaderResponseType=o(t,"loader.responseType",""),this.loaderAsync=o(t,"loader.async",!0),this.loaderUser=o(t,"loader.user",""),this.loaderPassword=o(t,"loader.password",""),this.loaderTimeout=o(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var n=o(t,"plugins",null),d=u.DefaultScene;n&&(Array.isArray(n)?this.defaultPlugins=n:a(n)&&(this.installGlobalPlugins=r(n,"global",[]),this.installScenePlugins=r(n,"scene",[]),Array.isArray(n.default)?d=n.default:Array.isArray(n.defaultMerge)&&(d=d.concat(n.defaultMerge)))),this.defaultPlugins=d;var f="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(t,"images.default",f+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(t,"images.missing",f+"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=d},function(t,e,i){var n=i(85),s=i(213),r=i(211),o=i(24),a=i(0),h=i(505),l=i(504),u=i(503),c=i(59),d=i(496),f=i(495),p=i(263),g=i(8),v=i(305),y=i(208),m=i(10),x=i(203),w=i(201),b=i(198),T=i(191),S=i(478),A=i(477),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 T(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.sound=b.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new v(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isOver=!0,p(this.boot.bind(this))},boot:function(){m.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("texturesready",this.texturesReady,this)):console.warn("Core Phaser Plugins missing. Cannot start.")},texturesReady:function(){this.events.emit("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("hidden",this.onHidden,this),t.on("visible",this.onVisible,this),t.on("blur",this.onBlur,this),t.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e);var n=this.renderer;n.preRender(),i.emit("prerender",n,t,e),this.scene.render(n),n.postRender(),i.emit("postrender",n,t,e)},headlessStep:function(t,e){var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e),i.emit("prerender"),i.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.domContainer&&(this.domContainer.style.width=t+"px",this.domContainer.style.height=e+"px"),this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=new(i(0))({initialize:function(){this.value,this.valueFormatted,this.timestamp,this.rank,this.data}});t.exports=n},function(t,e,i){var n=i(0),s=i(8),r=i(10),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){t.exports={EventEmitter:i(508)}},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,l=[],u=!1,c=-1;function d(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&f())}function f(){if(!u){var t=a(d);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c1)for(var i=1;i1&&(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){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e,i){var n=i(30);n.ColorToRGBA=i(931),n.ComponentToHex=i(514),n.GetColor=i(158),n.GetColor32=i(287),n.HexStringToColor=i(288),n.HSLToColor=i(930),n.HSVColorWheel=i(929),n.HSVToRGB=i(512),n.HueToComponent=i(513),n.IntegerToColor=i(286),n.IntegerToRGB=i(285),n.Interpolate=i(928),n.ObjectToColor=i(284),n.RandomRGB=i(927),n.RGBStringToColor=i(283),n.RGBToHSV=i(926),n.RGBToString=i(925),n.ValueToColor=i(134),t.exports=n},function(t,e,i){var n=i(0),s=i(59),r=i(10),o=new n({Extends:s,initialize:function(t){s.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.events=this.systems.events,this.events.once("destroy",this.destroy,this)},start:function(){this.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",o,"data"),t.exports=o},function(t,e,i){t.exports={DataManager:i(59),DataManagerPlugin:i(516)}},function(t,e,i){var n=i(265),s=i(0),r=i(86),o=i(4),a=new s({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.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;ei;)n-=i;n0&&(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(87),s=i(269),r=i(531),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=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){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,i){var n=i(126),s=i(0),r=i(1),o=i(10),a=i(31),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.baseScale=1,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.systems.events.once("destroy",this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on("update",this.update,this),e.once("shutdown",this.shutdown,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new n(t,e,i,s);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,s=0;s0&&(h.preRender(r,o),t.render(n,e,i,h))}},resetAll:function(){for(var t=0;t=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var n=i(20),s=i(0),r=i(4),o=i(125),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,a){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===s&&(s=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning?h:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(h.scrollX,h.scrollY),this.destination.set(t,e),h.getScroll(t,e,this.current),"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("camerapanstart",this.camera,this,i,t,e),h)},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-h&&(c-=h,n+=l),f=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){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){var n=i(16),s=i(32),r=i(218),o=i(217),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t){void 0===t&&(t=new s);var e=this.parentContainer;if(!e)return this.getLocalTransformMatrix(t);for(var i=[];e;)i.unshift(e),e=e.parentContainer;t.loadIdentity();for(var n=i.length,r=0;r>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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(60),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(220),s=i(219),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new s(this.scene,t)}};t.exports=r},function(t,e,i){var n=i(11),s=i(295),r=i(4),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,s,r,o,a,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},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)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e,i){var n=i(20),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},function(t,e,i){var n=i(47),s=i(45),r=i(46),o=i(44);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(45),r=i(48),o=i(44);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(92),s=i(45),r=i(91),o=i(44);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(89),s=i(47),r=i(90),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(89),s=i(49),r=i(90),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(91),s=i(90);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(601),s=i(92),r=i(89);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(51),s=i(47),r=i(50),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(49),r=i(50),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(51),s=i(92),r=i(50),o=i(91);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(302),s=[];s[n.BOTTOM_CENTER]=i(605),s[n.BOTTOM_LEFT]=i(604),s[n.BOTTOM_RIGHT]=i(603),s[n.CENTER]=i(602),s[n.LEFT_CENTER]=i(600),s[n.RIGHT_CENTER]=i(599),s[n.TOP_CENTER]=i(598),s[n.TOP_LEFT]=i(597),s[n.TOP_RIGHT]=i(596);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(1015),Call:i(1014),GetFirst:i(1013),GetLast:i(1012),GridAlign:i(1011),IncAlpha:i(1010),IncX:i(1009),IncXY:i(1008),IncY:i(1007),PlaceOnCircle:i(1006),PlaceOnEllipse:i(1005),PlaceOnLine:i(1004),PlaceOnRectangle:i(1003),PlaceOnTriangle:i(1002),PlayAnimation:i(1001),PropertyValueInc:i(36),PropertyValueSet:i(26),RandomCircle:i(1e3),RandomEllipse:i(999),RandomLine:i(998),RandomRectangle:i(997),RandomTriangle:i(996),Rotate:i(995),RotateAround:i(994),RotateAroundDistance:i(993),ScaleX:i(992),ScaleXY:i(991),ScaleY:i(990),SetAlpha:i(989),SetBlendMode:i(988),SetDepth:i(987),SetHitArea:i(986),SetOrigin:i(985),SetRotation:i(984),SetScale:i(983),SetScaleX:i(982),SetScaleY:i(981),SetTint:i(980),SetVisible:i(979),SetX:i(978),SetXY:i(977),SetY:i(976),ShiftPosition:i(975),Shuffle:i(974),SmootherStep:i(973),SmoothStep:i(972),Spread:i(971),ToggleVisible:i(970),WrapInRectangle:i(969)}},function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s0){var s=t.gl,r=this.pipeline,o=r.vertexBuffer,a=e.tileset.glTexture;t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer,t.setPipeline(r),t.setTexture2D(a,0),s.drawArrays(r.topology,0,e.vertexCount),r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}}},function(t,e,i){var n=i(2),s=i(2);n=i(630),s=i(629),t.exports={renderWebGL:n,renderCanvas:s}},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),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,a.multiply(h,l));var u=e.tileset,c=t.currentContext,d=u.image.getSourceImage();c.save(),l.copyToContext(c);for(var f=n.alpha*e.alpha,p=0;p-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(17);t.exports=function(t){for(var e,i,s,r,o,a=0;a>>0;return n}},function(t,e,i){var n=i(643),s=i(1),r=i(105),o=i(320),a=i(66);t.exports=function(t,e){for(var i=[],h=0;h0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e,i){t.exports={Parse:i(323),Parse2DArray:i(223),ParseCSV:i(322),Impact:i(316),Tiled:i(321)}},function(t,e,i){var n=i(54),s=i(53),r=i(4);t.exports=function(t,e,i,o,a,h){return void 0===o&&(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e,i){var n=i(23);t.exports=function(t,e,i,s,r,o){if(void 0!==r){var a,h=n(t,e,i,s,null,o),l=0;for(a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e,i){var n=i(67),s=i(41),r=i(112);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;ae)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(67),s=i(41),r=i(224);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;a=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;r=0&&p=0&&gr?(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=i(1021);n.Body=i(74),n.Composite=i(227),n.World=i(681),n.Detector=i(685),n.Grid=i(1020),n.Pairs=i(1019),n.Pair=i(617),n.Query=i(1041),n.Resolver=i(1018),n.SAT=i(684),n.Constraint=i(303),n.Common=i(42),n.Engine=i(1017),n.Events=i(304),n.Sleeping=i(335),n.Plugin=i(682),n.Bodies=i(173),n.Composites=i(1024),n.Axes=i(687),n.Bounds=i(128),n.Svg=i(1039),n.Vector=i(107),n.Vertices=i(129),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(129),r=i(107);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.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?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n=i(173),s=i(74),r=i(0),o=i(618),a=i(1),h=i(112),l=i(129),u=new r({Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var n=a(i,"body",null),s=a(i,"addToWorld",!0);if(n)this.setBody(n,s);else{var r=e.getCollisionGroup();a(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(107),r=i(42);n.fromVertices=function(t){for(var e={},i=0;i0?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=i(341);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){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(691);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},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(693);t.exports=function(t,e,i,s,r){var o=0;return t.deltaX()<0&&!t.blocked.left&&e.collideRight&&t.checkCollision.left?e.faceRight&&t.x0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e,i){var n=i(694),s=i(692),r=i(339);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()=0;a--){var h=e[a],l=r(s,o,h.x,h.y);l=0;a--){var h=e[a],l=r(s,o,h.x,h.y);l>i&&(n=h,i=l)}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 u),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new u),i.setToPolar(t,e)},shutdown:function(){var t=this.systems.events;t.off("update",this.world.update,this.world),t.off("postupdate",this.world.postUpdate,this.world),t.off("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("start",this.start,this),this.scene=null,this.systems=null}});l.register("ArcadePhysics",d,"arcadePhysics"),t.exports=d},function(t,e,i){var n=i(43),s=i(17),r={ArcadePhysics:i(709),Body:i(343),Collider:i(342),Factory:i(349),Group:i(346),Image:i(348),Sprite:i(144),StaticBody:i(338),StaticGroup:i(345),World:i(344)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},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;o1?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,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e){return t/e/1e3}},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.floor(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},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.ceil(t*n)/n}},function(t,e){t.exports=function(t){for(var e=0,i=0;i0&&0==(t&t-1)}},function(t,e,i){t.exports={GetNext:i(414),IsSize:i(84),IsValue:i(727)}},function(t,e,i){var n=i(290);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(124);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?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(265);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?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[i=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e'),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?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)e.x&&t.ye.y}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},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,i){var n=Math.min(t.x,e),s=Math.max(t.right,e);t.x=n,t.width=s-n;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var s=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=s,t.height=r-s,t}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;on(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,i){var n=i(234);t.exports=function(t,e){var i=n(t);return ii&&(i=h.x),h.xr&&(r=h.y),h.ye.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(61),s=i(147);t.exports=function(t,e){return!!(n(t,e.getPointA())||n(t,e.getPointB())||s(t.getLineA(),e)||s(t.getLineB(),e)||s(t.getLineC(),e))}},function(t,e,i){var n=i(401),s=i(61);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottomt.right+r||it.bottom+r||st.right||e.rightt.bottom||e.bottom0}},function(t,e,i){var n=i(400);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){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(11),s=i(238);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){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||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(58);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},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){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e,i){var n=i(33);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,i){var n=i(33);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(88);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(88);n.Area=i(859),n.Circumference=i(298),n.CircumferencePoint=i(138),n.Clone=i(858),n.Contains=i(33),n.ContainsPoint=i(857),n.ContainsRect=i(856),n.CopyFrom=i(855),n.Equals=i(854),n.GetBounds=i(853),n.GetPoint=i(301),n.GetPoints=i(299),n.Offset=i(852),n.OffsetPoint=i(851),n.Random=i(164),t.exports=n},function(t,e,i){var n=i(0),s=i(404),r=i(10),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(239);s.register("quad",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"key",null),h=r(t,"frame",null),l=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l})},function(t,e,i){var n=i(25),s=i(13),r=i(12),o=i(3),a=i(148);s.register("mesh",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"colors",[]),u=o(t,"alphas",[]),c=o(t,"uv",[]),d=new a(this.scene,0,0,h,c,l,u,i,s);return void 0!==e&&(t.add=e),n(this.scene,d,t),d})},function(t,e,i){var n=i(239);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(148);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=this.pipeline;t.setPipeline(o,e);var a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l)):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY,a.multiply(h,l));var u=e.frame.glTexture,c=e.vertices,d=e.uv,f=e.colors,p=e.alphas,g=c.length,v=Math.floor(.5*g);o.vertexCount+v>=o.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var y=o.vertexViewF32,m=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,w=0,b=e.tintFill,T=0;Ta.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;x?@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(895),s=i(17),r={Parse:i(894)};r=s(!1,r,n),t.exports=r},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(21);t.exports=function(t,e,i,s,r){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,h,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),t.setBlankTexture(!0)}},function(t,e,i){var n=i(2),s=i(2);n=i(898),s=i(897),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(426),EdgeZone:i(425),RandomZone:i(423)}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.emitters.list,o=r.length;if(0!==o){var a=t._tempMatrix1.copyFrom(n.matrix),h=t._tempMatrix2,l=t._tempMatrix3,u=t._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);a.multiply(u);var c=n.roundPixels,d=t.currentContext;d.save();for(var f=0;f0&&e.cropHeight>0&&(h.save(),h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var R=0;R0&&e.cropHeight>0&&h.restore(),h.restore()}}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var l=e.cropWidth>0||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,w=e._isTinted&&e.tintFill,b=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),S=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),A=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var C,_,M=0,P=0,E=0,k=0,L=e.letterSpacing,F=0,R=0,O=0,B=0,D=e.scrollX,I=e.scrollY,Y=e.fontData,z=Y.chars,X=Y.lineHeight,N=e.fontSize/Y.size,V=0,U=e._align,G=0,W=0;e.getTextBounds(!1);var H=e._bounds.lines;1===U?W=(H.longest-H.lengths[0])/2:2===U&&(W=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;Jv&&(r=v),o>y&&(o=y);var k=v+g.xAdvance,L=y+u;aC&&(C=M),MC&&(C=M),M>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e){t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(i){t.style[i+"user-select"]=e}),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e,i){t.exports={Interpolation:i(264),Pool:i(24),Smoothing:i(133),TouchAction:i(933),UserSelect:i(932)}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e,i){t.exports={CenterOn:i(601),GetBottom:i(51),GetCenterX:i(92),GetCenterY:i(89),GetLeft:i(49),GetOffsetX:i(936),GetOffsetY:i(935),GetRight:i(47),GetTop:i(45),SetBottom:i(50),SetCenterX:i(91),SetCenterY:i(90),SetLeft:i(48),SetRight:i(46),SetTop:i(44)}},function(t,e,i){var n=i(47),s=i(45),r=i(50),o=i(46);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(45),r=i(50),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(92),s=i(45),r=i(50),o=i(91);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(45),r=i(48),o=i(44);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(89),s=i(47),r=i(90),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(51),s=i(47),r=i(50),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(45),r=i(46),o=i(44);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(89),s=i(49),r=i(90),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),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),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(47),r=i(46),o=i(44);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(51),s=i(49),r=i(48),o=i(44);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(51),s=i(92),r=i(91),o=i(44);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){t.exports={BottomCenter:i(949),BottomLeft:i(948),BottomRight:i(947),LeftBottom:i(946),LeftCenter:i(945),LeftTop:i(944),RightBottom:i(943),RightCenter:i(942),RightTop:i(941),TopCenter:i(940),TopLeft:i(939),TopRight:i(938)}},function(t,e,i){t.exports={BottomCenter:i(605),BottomLeft:i(604),BottomRight:i(603),Center:i(602),LeftCenter:i(600),QuickSet:i(606),RightCenter:i(599),TopCenter:i(598),TopLeft:i(597),TopRight:i(596)}},function(t,e,i){var n=i(302),s=i(17),r={In:i(951),To:i(950)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(952),Bounds:i(937),Canvas:i(934),Color:i(515),Masks:i(511)}},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t,e){this.active=!1,this.p0=new s(t,e)},getPoint:function(t,e){return void 0===e&&(e=new s),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},function(t,e,i){var n=i(0),s=i(524),r=i(522),o=i(9),a=i(521),h=i(954),l=i(520),u=i(11),c=i(518),d=i(4),f=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 this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?(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<.1&&(e.zoom=.1))}},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){var n=i(0),s=i(3),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.speedX=0,this.speedY=0;var e=s(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=s(t,"speed.x",0),this.speedY=s(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<.1&&(e.zoom=.1)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed)}},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={FixedKeyControl:i(966),SmoothedKeyControl:i(965)}},function(t,e,i){t.exports={Controls:i(967),Scene2D:i(573),Sprite3D:i(964)}},function(t,e,i){var n=i(40);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s1)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?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),d.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),d.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",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.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),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&&p.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&&p.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 p.add(this.localWorld,o),o},add:function(t){return p.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return o.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return o.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},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;sf.friction*f.frictionStatic*O*i&&(D=L,B=o.clamp(f.friction*F*i,-D,D));var I=r.cross(A,y),Y=r.cross(C,y),z=w/(g.inverseMass+v.inverseMass+g.inverseInertia*I*I+v.inverseInertia*Y*Y);if(R*=z,B*=z,E<0&&E*E>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+R,0),R=T.normalImpulse-X}if(k*k>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+B,-D,D),B=T.tangentImpulse-N}s.x=y.x*R+m.x*B,s.y=y.y*R+m.y*B,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,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(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(617),r=i(42);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;a1e3&&h.push(r);for(r=0;rv.bounds.max.x||w.bounds.max.yv.bounds.max.y)){var b=e(i,w);if(!w.region||b.id!==w.region.id||r){x.broadphaseTests+=1,w.region&&!r||(w.region=b);var T=t(b,w.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=b.startCol&&d<=b.endCol&&f>=b.startRow&&f<=b.endRow,A=d>=w.region.startCol&&d<=w.region.endCol&&f>=w.region.startRow&&f<=w.region.endRow;!S&&A&&A&&p&&u(i,p,w),(w.region===b||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,w))}w.region=b,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=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 i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=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(682),r=i(42);n.name="matter-js",n.version="0.13.1",n.uses=[],n.used=[],n.use=function(){s.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(n,t,e)}},function(t,e,i){var n=i(306),s=i(0),r=i(618),o=i(15),a=i(1),h=i(294),l=i(35),u=i(4),c=new s({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,s,r,h){o.call(this,t.scene,"Image"),this.anims=new n(this),this.setTexture(s,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=c},function(t,e,i){var n=i(0),s=i(618),r=i(15),o=i(1),a=i(69),h=i(294),l=i(4),u=new n({Extends:a,Mixins:[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity,h],initialize:function(t,e,i,n,s,a){r.call(this,t.scene,"Image"),this.setTexture(n,s),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(227),r=i(303),o=i(42),a=i(74),h=i(173);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=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;l=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,A3&&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},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);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)}};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))r.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e1)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 w=Math.floor((e+v)/f);if((l>0||u===w||w<0||w>=p)&&(w=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,w,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 b=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+b)/f);var C=Math.floor((i+b)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));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-b+T;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),w=g/x,b=-p/x,T=y*w+m*b,S=w*T,A=b*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:w,ny:b},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(337),r=i(1076),o=i(336),a=i(1075),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(683),s={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.13.1",silent:!0,install:function(t){t.after("Engine.update",function(){s.Engine.update(this)})},Engine:{update:function(t){for(var e=t.world,i=n.Composite.allBodies(e),r=n.Composite.allComposites(e),o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y0)for(var a=s+1;a1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n1?1:0;n0))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){t.exports=function(t,e,i,n){var s=e.pos.x+e.size.x-i.pos.x;if(n){var r=e===n?i:e;n.vel.x=-n.vel.x*n.bounciness+r.vel.x;var o=t.collisionMap.trace(n.pos.x,n.pos.y,n===e?-s:s,0,n.size.x,n.size.y);n.pos.x=o.pos.x}else{var a=(e.vel.x-i.vel.x)/2;e.vel.x=-a,i.vel.x=a;var h=t.collisionMap.trace(e.pos.x,e.pos.y,-s/2,0,e.size.x,e.size.y);e.pos.x=Math.floor(h.pos.x);var l=t.collisionMap.trace(i.pos.x,i.pos.y,s/2,0,i.size.x,i.size.y);i.pos.x=Math.ceil(l.pos.x)}}},function(t,e,i){var n=i(337),s=i(1059),r=i(1058);t.exports=function(t,e,i){var o=null;e.collides===n.LITE||i.collides===n.FIXED?o=e:i.collides!==n.LITE&&e.collides!==n.FIXED||(o=i),e.last.x+e.size.x>i.last.x&&e.last.xi.last.y&&e.last.y0&&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&&o0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e,i){t.exports={Body:i(1033),COLLIDES:i(337),CollisionMap:i(1032),Factory:i(1031),Image:i(1029),ImpactBody:i(1030),ImpactPhysics:i(1061),Sprite:i(1028),TYPE:i(336),World:i(1027)}},function(t,e,i){t.exports={Arcade:i(710),Impact:i(1077),Matter:i(1057)}},function(t,e,i){(function(e){i(616);var n=i(22),s=i(17),r={Actions:i(607),Animation:i(575),Cache:i(574),Cameras:i(968),Class:i(0),Create:i(962),Curves:i(956),Data:i(517),Display:i(953),DOM:i(924),Events:i(509),FBInstant:i(305),Game:i(506),GameObjects:i(923),Geom:i(403),Input:i(388),Loader:i(764),Math:i(749),Physics:i(1078),Plugins:i(334),Renderer:i(680),Scene:i(200),Scenes:i(332),Sound:i(330),Structs:i(329),Textures:i(328),Tilemaps:i(675),Time:i(312),Tweens:i(310),Utils:i(626)};r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(221))}])}); \ No newline at end of file +!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=1084)}([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,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),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=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),a=s?s+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],o]:t._events[a].push(o):(t._events[a]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function h(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,o=new Array(r);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=l},function(t,e,i){var n=i(16),s=i(3);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){t.exports={Alpha:i(600),Animation:i(306),BlendMode:i(599),ComputedSize:i(598),Crop:i(597),Depth:i(596),Flip:i(595),GetBounds:i(594),Mask:i(593),Origin:i(592),Pipeline:i(294),ScaleMode:i(591),ScrollFactor:i(590),Size:i(589),Texture:i(588),TextureCrop:i(587),Tint:i(586),ToJSON:i(585),Transform:i(584),TransformMatrix:i(27),Visible:i(583)}},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once("destroy",this.destroy,this)},start:function(){this.systems.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectCreator",r,"make"),t.exports=r},function(t,e,i){var n=i(0),s=i(13),r=i(59),o=i(8),a=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,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(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=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.ToJSON(this)},willRender:function(t){return!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter>0&&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(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,t.exports=a},function(t,e,i){var n=i(300),s={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:new n};t.exports=s},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&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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("fileprogress",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("filecomplete",e,i,t),this.loader.emit("filecomplete-"+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}});u.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)}},u.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=u},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>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;no.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=new(i(0))({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)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+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*i,a=n*n,h=s*s,l=r*r,u=Math.sqrt(o+h),c=Math.sqrt(a+l);return t.translateX=e[4],t.translateY=e[5],t.scaleX=u,t.scaleY=c,t.rotation=Math.acos(i/u)*(Math.atan(-s/i)<0?-1:1),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},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=n},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(18),r=i(19),o=i(6),a=i(1),h=i(3),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;ss||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(159),r=i(288),o=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.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this.red=0,this.green=0,this.blue=0,this.alpha=0,this.update()},setTo:function(t,e,i,n){return void 0===n&&(n=255),this.red=t,this.green=e,this.blue=i,this.alpha=n,this.update()},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this.update()},setFromRGB:function(t){return this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this.update()},update:function(){return this._color=s(this.r,this.g,this.b),this._color32=r(this.r,this.g,this.b,this.a),this._rgba="rgba("+this.r+","+this.g+","+this.b+","+this.a/255+")",this},clone:function(){return new o(this.r,this.g,this.b,this.a)},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()}},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()}},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()}},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()}},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()}},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()}},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()}}});t.exports=o},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){return t.radius>0&&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){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,i){var n=i(0),s=i(13),r=i(15),o=i(534),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")},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)}});t.exports=a},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=new(i(0))({initialize:function(t,e,i,n){this.loader=t,this.type=e,this.key=i,this.files=n,this.complete=!1,this.pending=n.length,this.failed=0,this.config={};for(var s=0;s0;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 t instanceof HTMLElement},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(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.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n=t.length)){for(var i=t.length-1,n=t[e],s=e;s=0&&y>=0&&v+y<1}},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){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e,i){var n=i(126);t.exports=function(t,e){if("string"==typeof t&&n.hasOwnProperty(t)){if(e){var i=e.slice(0);return i.unshift(0),function(e){return i[0]=e,n[t].apply(this,i)}}return n[t]}return"function"==typeof t?t:(Array.isArray(t)&&t.length,n.Power0)}},function(t,e,i){var n=i(20);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(13),r=i(393),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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/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.height-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.tilemapLayer;return t?t.tileset: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,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},function(t,e,i){var n=i(0),s=i(61),r=i(235),o=i(234),a=i(98),h=i(161),l=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},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,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=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}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=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=l},function(t,e,i){var n=i(0),s=i(13),r=i(15),o=i(432),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,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("TextureTintPipeline")}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=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 this.entries.length=t}}});t.exports=n},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,i){var n=i(102),s=i(12),r=i(63),o=i(64),a=i(73),h=i(171),l=i(104),u=i(3),c=i(103),d=i(101),f=i(100);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),y=a(e,"duration",i.duration),m=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),m),w=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),T=a(e,"repeatDelay",i.repeatDelay),S=r(e,"yoyo",i.yoyo),A=r(e,"flipX",i.flipX),C=r(e,"flipY",i.flipY),_=[],M=0;M0&&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,i,r,o){o=o||t.position;for(var a=0;a0&&(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};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0: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("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:o,onBlur:o,onFocus:o,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("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.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("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("detune",this,t)}}});t.exports=a},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,s=i(57),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){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){!function(){var e=function(t,e){return i(t.slice(),e)};function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var i=t.length;if(i<=1)return t;for(var s=new Array(i),r=1;rl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;if(void 0===i&&(i=!0),e)"string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e);else if(t.parentElement)return t;return n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},function(t,e,i){var n=i(0),s=i(267),r=i(11),o=i(4),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(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){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(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],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*w,this.y=(e*o+i*u+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,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}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(39),o=i(8),a=i(11),h=i(27),l=i(134),u=i(4),c=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.config,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new a,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 a,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new h,this.transparent=!0,this.backgroundColor=l("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new u(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1},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 u);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},centerOn:function(t,e){var i=.5*this.width,n=.5*this.height;return this.midPoint.set(t,e),this.scrollX=t-i,this.scrollY=e-n,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),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;g-y&&T>-m&&b-y&&A>-m&&Ss&&(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=l(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return 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},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=t,this.config=t.sys.game.config,this.sceneManager=t.sys.game.scene;var e=this.config.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,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},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.config){var t=!1;if(0!==this._x||0!==this._y)t=!0;else{var e=this.config.width,i=this.config.height;e===this._width&&i===this._height||(t=!0)}var n=this.sceneManager;t&&!this._customViewport?n.customViewports++:!t&&this._customViewport&&n.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.config=null,this.sceneManager=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=c},function(t,e,i){var n=i(0),s=i(33),r=i(301),o=i(299),a=i(165),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},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 a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},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){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e,i){var n=i(151),s=i(0),r=i(2),o=i(83),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){return t&&(this._sortKey=t,o.inplace(this.list,this.sortHandler)),this},sortHandler:function(t,e){return t[this._sortKey]-e[this._sortKey]},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.GetFirstElement(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(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,w=e+n,b=i+r;if(!(x.rw||x.y>b)){var T=Math.max(x.x,e),S=Math.max(x.y,i),A=Math.min(x.r,w)-T,C=Math.min(x.b,b)-S;v=A,y=C,p=o?h+(u-(T-x.x)-A):h+(T-x.x),g=a?l+(c-(S-x.y)-C):l+(S-x.y),e=T,i=S,n=A,r=C}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,M=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/M),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+y)/M),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.texture=null,this.source=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(34);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){t.exports=function(t){for(var e=t.length-1;e>0;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(0),s=i(296),r=i(164),o=i(163),a=i(4),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=0),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 o(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 a),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new a),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=h},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(0),s=i(14),r=i(9),o=i(62),a=new n({initialize:function(t,e,i){this.parent=t,this.parentIsTimeline=t.hasOwnProperty("isTimeline"),this.data=e,this.totalData=e.length,this.targets=i,this.totalTargets=i.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onRepeat:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(){return this.data[0].current},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},isPaused:function(){return this.state===o.PAUSED},hasTarget:function(t){return-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){for(var n=0;n0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.parent.makeActive(this))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},complete:function(t){if(void 0===t&&(t=0),t)this.countdown=t,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},stop:function(t){this.state===o.ACTIVE&&void 0!==t&&this.seek(t),this.state!==o.REMOVED&&(this.state=o.PENDING_REMOVE)},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.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 o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1}},function(t,e){function i(t){return!!t.getStart&&"function"==typeof t.getStart}function n(t){return!!t.getEnd&&"function"==typeof t.getEnd}var s=function(t,e){var r,o,a=function(t,e,i){return i},h=function(t,e,i){return i},l=typeof e;if("number"===l)a=function(){return e};else if("string"===l){var u=e[0],c=parseFloat(e.substr(2));switch(u){case"+":a=function(t,e,i){return i+c};break;case"-":a=function(t,e,i){return i-c};break;case"*":a=function(t,e,i){return i*c};break;case"/":a=function(t,e,i){return i/c};break;default:a=function(){return parseFloat(e)}}}else"function"===l?a=e:"object"===l&&(i(o=e)||n(o))?(n(e)&&(a=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:a,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(3);t.exports=function(t){var e=n(t,"targets",null);return null===e?e:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation","orthogonal"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",{}),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[])}});t.exports=r},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",{}),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null)}});t.exports=r},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&el){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=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h],h0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],o,a));return e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},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){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(612),s=i(0),r=i(1),o=i(3),a=i(7),h=i(250),l=i(70),u=i(35),c=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?a(e[0])&&(i=e,e=null):a(e)&&(i=e,e=null),this.scene=t,this.children=new l(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=0&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<-a&&(s=h+s%h-a)),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this},slice:function(t,e,i,n,s,o,a){void 0===o&&(o=!1),void 0===a&&(a=0);var h=2*Math.PI;return o?s<-h?s=-h-a:s>=0&&(s=s%h-h-a):(s-=n,(s+=a)>h+a?s=h+a:s<=-a&&(s=h+s%h-a)),this.commandBuffer.push(r.BEGIN_PATH),this.commandBuffer.push(r.MOVE_TO,t,e),this.commandBuffer.push(r.ARC,t,e,i,n,s,o),this.commandBuffer.push(r.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(r.SAVE),this},restore:function(){return this.commandBuffer.push(r.RESTORE),this},translate:function(t,e){return this.commandBuffer.push(r.TRANSLATE,t,e),this},scale:function(t,e){return this.commandBuffer.push(r.SCALE,t,e),this},rotate:function(t){return this.commandBuffer.push(r.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-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.game.config.width),void 0===i&&(i=r.game.config.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.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,f.TargetCamera,null,s,!1),o.gl&&n&&(n.source[0].glTexture=o.canvasToTexture(s.canvas,n.source[0].glTexture))),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new n,t.exports=f},function(t,e){t.exports=function(t,e,i,n,s){var r=n.alpha*i.alpha;if(r<=0)return!1;var o=t._tempMatrix1.copyFromArray(n.matrix.matrix),a=t._tempMatrix2.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h=t._tempMatrix3;return s?(o.multiplyWithOffset(s,-n.scrollX*i.scrollFactorX,-n.scrollY*i.scrollFactorY),a.e=i.x,a.f=i.y,o.multiply(a,h)):(a.e-=n.scrollX*i.scrollFactorX,a.f-=n.scrollY*i.scrollFactorY,o.multiply(a,h)),e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),h.setToContext(e),!0}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i0},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("start",this),this.events.emit("ready",this,t)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(t){this.events.off("transitioninit"),this.events.off("transitionstart"),this.events.off("transitioncomplete"),this.events.off("transitionout"),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("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;et.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={};t.exports=n;var s=i(108),r=i(42);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(12);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0),o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),l=n(i,"repeatDelay",0),u=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0);s.setDelay(a),s.setRepeat(h),s.setRepeatDelay(l),s.setYoyo(u),c?s.play(r,o):d>0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(255),r=i(1),o=i(500),a=i(499),h=i(498),l=i(27),u=i(21),c=i(132),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._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=null,this.firstQuad=[0,0,0,0],this.prevQuad=[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 this.renderer.setTexture2D(t,e),this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize,s=this.renderer;if(0!==e)return s.setBlankTexture(),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},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.width,v=o.height,y=-t.displayOriginX+f,m=-t.displayOriginY+p;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,c=x.u1,d=x.v1,g=x.width,v=x.height,f=x.x,p=x.y,y=-t.displayOriginX+f,m=-t.displayOriginY+p}t.flipX&&(y+=g,g*=-1),t.flipY&&(m+=v,v*=-1);var w=y+g,b=m+v;s.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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=r.getX(y,m),S=r.getY(y,m),A=r.getX(y,b),C=r.getY(y,b),_=r.getX(w,b),M=r.getY(w,b),P=r.getX(w,m),E=r.getY(w,m),k=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),L=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),F=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),R=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(T|=0,S|=0,A|=0,C|=0,_|=0,M|=0,P|=0,E|=0),this.setTexture2D(a,0);var O=t._isTinted&&t.tintFill;this.batchQuad(T,S,A,C,_,M,P,E,h,l,c,d,k,L,F,R,O)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v){var y=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),y=!0);var m=this.vertexViewF32,x=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount-1;return m[++w]=t,m[++w]=e,m[++w]=h,m[++w]=l,m[++w]=v,x[++w]=d,m[++w]=i,m[++w]=n,m[++w]=h,m[++w]=c,m[++w]=v,x[++w]=p,m[++w]=s,m[++w]=r,m[++w]=u,m[++w]=c,m[++w]=v,x[++w]=g,m[++w]=t,m[++w]=e,m[++w]=h,m[++w]=l,m[++w]=v,x[++w]=d,m[++w]=s,m[++w]=r,m[++w]=u,m[++w]=c,m[++w]=v,x[++w]=g,m[++w]=o,m[++w]=a,m[++w]=u,m[++w]=l,m[++w]=v,x[++w]=f,this.vertexCount+=6,y},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f){var p=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),p=!0);var g=this.vertexViewF32,v=this.vertexViewU32,y=this.vertexCount*this.vertexComponentCount-1;return g[++y]=t,g[++y]=e,g[++y]=o,g[++y]=a,g[++y]=f,v[++y]=u,g[++y]=i,g[++y]=n,g[++y]=o,g[++y]=l,g[++y]=f,v[++y]=c,g[++y]=s,g[++y]=r,g[++y]=h,g[++y]=l,g[++y]=f,v[++y]=d,this.vertexCount+=3,p},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,w,b,T,S,A,C,_,M,P,E){this.renderer.setPipeline(this,t);var k=this._tempMatrix1,L=this._tempMatrix2,F=this._tempMatrix3,R=y/i+_,O=m/n+M,I=(y+x)/i+_,B=(m+w)/n+M,D=o,Y=a,z=-g,X=-v;if(t.isCropped){var N=t._crop;D=N.width,Y=N.height,o=N.width,a=N.height;var V=y=N.x,U=m=N.y;c&&(V=x-N.x-N.width),d&&!e.isRenderTexture&&(U=w-N.y-N.height),R=V/i+_,O=U/n+M,I=(V+N.width)/i+_,B=(U+N.height)/n+M,z=-g+y,X=-v+m}d^=e.isRenderTexture?1:0,c&&(D*=-1,z+=o),d&&(Y*=-1,X+=a);var G=z+D,W=X+Y;L.applyITRS(s,r,u,h,l),k.copyFrom(P.matrix),E?(k.multiplyWithOffset(E,-P.scrollX*f,-P.scrollY*p),L.e=s,L.f=r,k.multiply(L,F)):(L.e-=P.scrollX*f,L.f-=P.scrollY*p,k.multiply(L,F));var H=F.getX(z,X),j=F.getY(z,X),q=F.getX(z,W),K=F.getY(z,W),J=F.getX(G,W),Z=F.getY(G,W),Q=F.getX(G,X),$=F.getY(G,X);P.roundPixels&&(H|=0,j|=0,q|=0,K|=0,J|=0,Z|=0,Q|=0,$|=0),this.setTexture2D(e,0),this.batchQuad(H,j,q,K,J,Z,Q,$,R,O,I,B,b,T,S,A,C)},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)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n,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.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,w=y.u1,b=y.v1;this.batchQuad(l,u,c,d,f,p,g,v,m,x,w,b,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.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.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;fthis.vertexCapacity&&this.flush();var d=i-t,f=n-e,p=Math.sqrt(d*d+f*f),g=s*(n-e)/p,v=s*(t-i)/p,y=r*(n-e)/p,m=r*(t-i)/p,x=i-y,w=n-m,b=t-g,T=e-v,S=i+y,A=n+m,C=t+g,_=e+v,M=c.getX(x,w),P=c.getY(x,w),E=c.getX(b,T),k=c.getY(b,T),L=c.getX(S,A),F=c.getY(S,A),R=c.getX(C,_),O=c.getY(C,_),I=this.strokeTint,B=this.tintEffect,D=I.TL,Y=I.TR,z=I.BL,X=I.BR,N=this.currentFrame,V=N.u0,U=N.v0,G=N.u1,W=N.v1;if(this.batchQuad(R,O,E,k,M,P,L,F,V,U,G,W,D,Y,z,X,B),!(o<=1)){var H=this.prevQuad,j=this.firstQuad;a>0?this.batchQuad(R,O,E,k,H[0],H[1],H[2],H[3],V,U,G,W,D,Y,z,X,B):(j[0]=E,j[1]=k,j[2]=R,j[3]=O),h?this.batchQuad(j[0],j[1],j[2],j[3],M,P,L,F,V,U,G,W,D,Y,z,X,B):(H[0]=M,H[1]=P,H[2]=L,H[3]=F)}}});t.exports=d},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,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,s){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:s}),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*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)):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},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){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;i=(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(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},function(t,e,i){var n=i(99),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=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(5);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=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&&t=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e,i){var n=i(0),s=i(13),r=i(15),o=i(873),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},onRender:function(t,e){this.active=!1;var i=t.sys.lights;if(!i||i.lights.length<=0||!i.active)return this;var n=i.cull(e),s=Math.min(n.length,10);if(0===s)return this;this.active=!0;var r,o=this.renderer,a=this.program,h=e.matrix,l={x:0,y:0},u=o.height;for(r=0;r<10;++r)o.setFloat1(a,"uLights["+r+"].radius",0);for(o.setFloat4(a,"uCamera",e.x,e.y,e.rotation,e.zoom),o.setFloat3(a,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),r=0;r0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(u.texture,0),n.drawArrays(o,u.first,l)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,w,b,T,S,A,C,_,M,P,E){if(this.active){var k;this.renderer.setPipeline(this),t.texture?k=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(k=t.tileset.image.dataSource[0]),k||(k=this.defaultNormalMap),this.setTexture2D(k.glTexture,1);var L=this._tempMatrix1,F=this._tempMatrix2,R=this._tempMatrix3,O=o,I=a,B=-g,D=-v;d^=e.isRenderTexture?1:0,c&&(O*=-1,B+=o),d&&(I*=-1,D+=a),P.roundPixels&&(B|=0,D|=0);var Y=B+O,z=D+I;F.applyITRS(s,r,u,h,l),L.copyFrom(P.matrix),E?(L.multiplyWithOffset(E,-P.scrollX*f,-P.scrollY*p),F.e=s,F.f=r,L.multiply(F,R)):(F.e-=P.scrollX*f,F.f-=P.scrollY*p,L.multiply(F,R));var X=B*R.a+D*R.c+R.e,N=B*R.b+D*R.d+R.f,V=B*R.a+z*R.c+R.e,U=B*R.b+z*R.d+R.f,G=Y*R.a+z*R.c+R.e,W=Y*R.b+z*R.d+R.f,H=Y*R.a+D*R.c+R.e,j=Y*R.b+D*R.d+R.f;P.roundPixels&&(X|=0,N|=0,V|=0,U|=0,G|=0,W|=0,H|=0,j|=0);var q=y/i+_,K=m/n+M,J=(y+x)/i+_,Z=(m+w)/n+M;this.setTexture2D(e,0),this.batchVertices(X,N,V,U,G,W,H,j,q,K,J,Z,b,T,S,A,C)}},setNormalMap:function(t){var e;this.active&&t&&(t.texture&&(e=t.texture.dataSource[t.frame.sourceIndex]),e||(e=this.defaultNormalMap),this.setTexture2D(e.glTexture,1),this.renderer.setPipeline(t.defaultPipeline))},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),r.prototype.batchSprite.call(this,t,e,i))}}});o.LIGHT_COUNT=10,t.exports=o},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(16);t.exports=function(t){return t*n.RAD_TO_DEG}},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=i(0),s=i(15),r=i(35),o=i(4),a=i(156),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},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}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e){t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},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=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,s=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=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,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(5);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var n=i(71),s=i(5);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;u1?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(52),s=i(89),r=i(33),o=i(0),a=i(13),h=i(15),l=i(11),u=i(32),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.ScaleMode,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,r){void 0===s&&(s=1),void 0===r&&(r=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=r,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){return void 0===i&&(i=!0),this.width=t,this.height=e,i&&this.input&&this.input.hitArea instanceof l&&(this.input.hitArea.width=t,this.input.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),r)},setRectangleDropZone:function(t,e){var i=-t/2,n=-e/2;return this.setDropZone(new l(i,n,t,e),u)},setDropZone:function(t,e){return void 0===t?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(8),r=i(72),o=i(62),a=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING_ADD,this._pausedState=o.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===o.ACTIVE},add:function(t){return this.queue(r(this,t))},queue:function(t){return this.isPlaying()||(t.parent=this,t.parentIsTimeline=!0,this.data.push(t),this.totalData=this.data.length),this},hasOffset:function(t){return null!==t.offset},isOffsetAbsolute:function(t){return"number"==typeof t},isOffsetRelative:function(t){if("string"===typeof t){var e=t[0];if("-"===e||"+"===e)return!0}return!1},getRelativeOffset:function(t,e){var i=t[0],n=parseFloat(t.substr(2)),s=e;switch(i){case"+":s+=n;break;case"-":s-=n}return Math.max(0,s)},calcDuration:function(){for(var t=0,e=0,i=0,n=0;n0?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=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;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 o.ACTIVE:for(var n=this.totalData,s=0;s0?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){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=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n={};t.exports=n;var s=i(129),r=i(42),o=i(74),a=i(128),h=i(108),l=i(1030);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(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n=i(0),s=i(19),r=i(1),o=i(110),a=i(7),h=new n({Extends:s,initialize:function(t,e,i,n){if(a(e)){var o=e;e=r(o,"key"),n=r(o,"config",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,h),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t=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=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",e,this,t),this.pad.emit("down",i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit("up",e,this,t),this.pad.emit("up",i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)>>16,m=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+y+","+m+","+x+","+d+")",c.lineWidth=v,w+=3;break;case n.FILL_STYLE:g=l[w+1],f=l[w+2],y=(16711680&g)>>>16,m=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+y+","+m+","+x+","+f+")",w+=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[w+1],l[w+2],l[w+3],l[w+4]):c.fillRect(l[w+1],l[w+2],l[w+3],l[w+4]),w+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[w+1],l[w+2]),c.lineTo(l[w+3],l[w+4]),c.lineTo(l[w+5],l[w+6]),c.closePath(),h||c.fill(),w+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[w+1],l[w+2]),c.lineTo(l[w+3],l[w+4]),c.lineTo(l[w+5],l[w+6]),c.closePath(),h||c.stroke(),w+=6;break;case n.LINE_TO:c.lineTo(l[w+1],l[w+2]),w+=2;break;case n.MOVE_TO:c.moveTo(l[w+1],l[w+2]),w+=2;break;case n.LINE_FX_TO:c.lineTo(l[w+1],l[w+2]),w+=5;break;case n.MOVE_FX_TO:c.moveTo(l[w+1],l[w+2]),w+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[w+1],l[w+2]),w+=2;break;case n.SCALE:c.scale(l[w+1],l[w+2]),w+=2;break;case n.ROTATE:c.rotate(l[w+1]),w+=1;break;case n.GRADIENT_FILL_STYLE:w+=5;break;case n.GRADIENT_LINE_STYLE:w+=6;break;case n.SET_TEXTURE:w+=2}c.restore()}}},function(t,e){t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},function(t,e,i){var n=i(185),s=i(115),r=i(65),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;hr;){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));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),s=0;s-1;r--)n[s][r]=t[r][s]}return n}},function(t,e,i){t.exports={AtlasXML:i(486),Canvas:i(485),Image:i(484),JSONArray:i(483),JSONHash:i(482),SpriteSheet:i(481),SpriteSheetFromAtlas:i(480),UnityYAML:i(479)}},function(t,e,i){var n=i(22),s=i(0),r=i(84),o=i(60),a=new s({initialize:function(t,e,i,n){var s=t.manager.game;this.renderer=s.renderer,this.texture=t,this.source=e,this.image=e,this.compressionAlgorithm=null,this.resolution=1,this.width=i||e.naturalWidth||e.width||0,this.height=n||e.naturalHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isRenderTexture="RenderTexture"===e.type,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){this.renderer&&(this.renderer.gl?this.isCanvas?this.glTexture=this.renderer.canvasToTexture(this.image):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=this.renderer.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.glTexture=this.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t)},update:function(){this.renderer.gl&&this.isCanvas&&this.renderer.canvasToTexture(this.image,this.glTexture)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},function(t,e,i){var n=i(22),s=i(487),r=i(0),o=i(31),a=i(23),h=i(8),l=i(269),u=i(3),c=i(190),d=i(121),f=new r({Extends:h,initialize:function(t){h.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,t.events.once("boot",this.boot,this)},boot:function(){this._pending=2,this.on("onload",this.updatePending,this),this.on("onerror",this.updatePending,this),this.addBase64("__DEFAULT",this.game.config.defaultImage),this.addBase64("__MISSING",this.game.config.missingImage),this.game.events.once("destroy",this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off("onload"),this.off("onerror"),this.game.events.emit("texturesready"))},checkKey:function(t){return!this.exists(t)||(console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(delete this.list[t.key],t.destroy(),this.emit("removetexture",t.key)),this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit("onerror",t)},n.onload=function(){var e=i.create(t,n);c.Image(e,0),i.emit("addtexture",t,e),i.emit("onload",t,e)},n.src=e}return this},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var r="",o=this.getFrame(t,e);if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height);h.getContext("2d").drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,s),n.remove(h)}return r},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),c.Image(n,0),i&&n.setDataSource(i),this.emit("addtexture",t,n)),n},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit("addtexture",t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,l(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var s=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,s)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new s(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new s(this,t,e,e.width,e.height),this.list[t]=n,this.emit("addtexture",t,n)),n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var s=null;if(this.checkKey(t)){if(s=this.create(t,e),Array.isArray(i))for(var r=1===i.length,o=0;o=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var s=this.getFrame(i,n);if(s){var r=s.source.image;if(t>=0&&t<=r.width&&e>=0&&e<=r.height){t+=s.cutX,e+=s.cutY;var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],n=1;n0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("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("ended",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.emit("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.emit("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,"rate",t)||(this.calculateRate(),this.emit("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,"detune",t)||(this.calculateRate(),this.emit("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("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("loop",this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=s},function(t,e,i){var n=i(79),s=i(0),r=i(197),o=new s({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each(function(e,i){for(var n=0;n-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("transitioninit",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("complete",this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;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)}},resize:function(t,e){for(var i=0;i=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=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,i){var n=i(0),s=i(8),r=i(6),o=i(14),a=i(9),h=i(1),l=i(10),u=i(203),c=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once("boot",this.boot,this)},boot:function(){var t,e,i,n,s,r,o,a=this.game.config,l=a.installGlobalPlugins;for(l=l.concat(this._pendingGlobal),t=0;t10&&(t=10-this.pointersTotal);for(var i=0;i0},queueTouchStart:function(t){if(this.queue.push(s.TOUCH_START,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueTouchMove:function(t){if(this.queue.push(s.TOUCH_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueTouchEnd:function(t){if(this.queue.push(s.TOUCH_END,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},queueMouseDown:function(t){if(this.queue.push(s.MOUSE_DOWN,t),this._hasDownCallback){var e=this.domCallbacks;this._hasDownCallback=this.processDomCallbacks(e.downOnce,e.down,t)}},queueMouseMove:function(t){if(this.queue.push(s.MOUSE_MOVE,t),this._hasMoveCallback){var e=this.domCallbacks;this._hasMoveCallback=this.processDomCallbacks(e.moveOnce,e.move,t)}},queueMouseUp:function(t){if(this.queue.push(s.MOUSE_UP,t),this._hasUpCallback){var e=this.domCallbacks;this._hasUpCallback=this.processDomCallbacks(e.upOnce,e.up,t)}},addUpCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.upOnce.push(t):this.domCallbacks.up.push(t),this._hasUpCallback=!0,this},addDownCallback:function(t,e){return void 0===e&&(e=!0),e?this.domCallbacks.downOnce.push(t):this.domCallbacks.down.push(t),this._hasDownCallback=!0,this},addMoveCallback:function(t,e){return void 0===e&&(e=!1),e?this.domCallbacks.moveOnce.push(t):this.domCallbacks.move.push(t),this._hasMoveCallback=!0,this},inputCandidate:function(t){var e=t.input;if(!e||!e.enabled||!t.willRender())return!1;var i=!0,n=t.parentContainer;if(n)do{if(!n.visible){i=!1;break}n=n.parentContainer}while(n);return i},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var s=this._tempPoint,r=i._cx,o=i._cy,a=i._cw,h=i._ch,l=i.scrollX,u=i.scrollY;n.length=0;var d=t.x,f=t.y;if(!(d>=r&&f>=o&&d<=r+a&&f<=o+h))return n;i.getWorldPoint(d,f,s),t.worldX=s.x,t.worldY=s.y;for(var p={x:0,y:0},g=this._tempMatrix,v=0;vf.right&&(p=u(p,p+(v-f.right),this.lerp.x)),yf.bottom&&(g=u(g,g+(y-f.bottom),this.lerp.y))):(p=u(p,v-l,this.lerp.x),g=u(g,y-c,this.lerp.y))}this.useBounds&&(p=this.clampX(p),g=this.clampY(g)),this.roundPixels&&(l=Math.round(l),c=Math.round(c)),this.scrollX=p,this.scrollY=g;var m=p+s,x=g+o;this.midPoint.set(m,x);var w=i/a,b=n/a;this.worldView.setTo(m-w/2,x-b/2,w,b),h.loadIdentity(),h.scale(e,e),h.translate(this.x+l,this.y+c),h.rotate(this.rotation),h.scale(a,a),h.translate(-l,-c),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},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(){n.prototype.destroy.call(this),this.resetFX(),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(214),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","html","obj","tilemap","xml"],e=0;ee.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=i(20),s=i(0),r=i(217),o=i(216),a=i(3),h=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,a(i,"frames",[]),a(i,"defaultTextureKey",null)),this.frameRate=a(i,"frameRate",null),this.duration=a(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=a(i,"skipMissedFrames",!0),this.delay=a(i,"delay",0),this.repeat=a(i,"repeat",0),this.repeatDelay=a(i,"repeatDelay",0),this.yoyo=a(i,"yoyo",!1),this.showOnStart=a(i,"showOnStart",!1),this.hideOnComplete=a(i,"hideOnComplete",!1),this.paused=!1,this.manager.on("pauseall",this.pause,this),this.manager.on("resumeall",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=l[0],l[0].prevFrame=s;var v=1/(l.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._timeScale=1,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),r(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?(t.forward=!1,this._updateAndGetNextTick(t,e.prevFrame)):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this._updateAndGetNextTick(t,e.nextFrame)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?(t.forward=!0,this._updateAndGetNextTick(t,e.nextFrame)):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this._updateAndGetNextTick(t,t.currentFrame)):(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);t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,t.parent.emit("animationrepeat",this,t.currentFrame,t.repeatCounter)))},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=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off("pauseall",this.pause,this),this.manager.off("resumeall",this.resume,this),this.manager.remove(this.key);for(var t=0;t=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,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;tl+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,i){var n=i(5),s=i(71);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=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){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(0),s=i(148),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,t=this.frame,this.uv[0]=t.u0,this.uv[1]=t.v0,this.uv[2]=t.u0,this.uv[3]=t.v1,this.uv[4]=t.u1,this.uv[5]=t.v1,this.uv[6]=t.u0,this.uv[7]=t.v0,this.uv[8]=t.u1,this.uv[9]=t.v1,this.uv[10]=t.u1,this.uv[11]=t.v0,this},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e,i){var n=i(22),s=i(0),r=i(13),o=i(23),a=i(15),h=i(414),l=i(898),u=i(4),c=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.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,s,r,l,c){var d=t.sys.game.renderer;a.call(this,t,"TileSprite"),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=null,this.displayFrame=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.setTexture(l,c),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.displayFrame.width),this.potHeight=h(this.displayFrame.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.dirty=!0,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(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,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.displayFrame=this.displayTexture.get(t),this.displayFrame.cutWidth&&this.displayFrame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.displayFrame.customPivot?this.setOrigin(this.displayFrame.pivotX,this.displayFrame.pivotY):this.updateDisplayOrigin()),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&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){if(this.dirty){var t=this.displayFrame,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.resize(this.width,this.height)),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context,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=c},function(t,e,i){var n=i(88),s=i(22),r=i(0),o=i(13),a=i(23),h=i(95),l=i(15),u=i(904),c=i(421),d=new r({Extends:l,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Tint,o.Transform,o.Visible,u],initialize:function(t,e,i,r,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===r&&(r=32),void 0===o&&(o=32),l.call(this,t,"RenderTexture"),this.renderer=t.sys.game.renderer,this.textureManager=t.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=s.create2D(this,r,o),this.context=this.canvas.getContext("2d"),this.framebuffer=null,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(c(),this.canvas),this.frame=this.texture.get(),this.camera=new n(0,0,r,o),this.dirty=!1,this.gl=null;var h=this.renderer;if(h.type===a.WEBGL){var u=h.gl;this.gl=u,this.drawGameObject=this.batchGameObjectWebGL,this.framebuffer=h.createFramebuffer(r,o,this.frame.source.glTexture,!1)}else h.type===a.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas);this.camera.setScene(t),this.setPosition(e,i),this.setSize(r,o),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline")},setSize:function(t,e){return this.resize(t,e)},resize:function(t,e){if(void 0===e&&(e=t),t!==this.width||e!==this.height){if(this.canvas)this.canvas.width=t,this.canvas.height=e;else{var i=this.gl;this.renderer.deleteTexture(this.frame.source.glTexture),this.renderer.deleteFramebuffer(this.framebuffer),this.frame.source.glTexture=this.renderer.createTexture2D(0,i.NEAREST,i.NEAREST,i.CLAMP_TO_EDGE,i.CLAMP_TO_EDGE,i.RGBA,null,t,e,!1),this.framebuffer=this.renderer.createFramebuffer(t,e,this.texture,!1),this.frame.glTexture=this.frame.source.glTexture}this.camera.setSize(t,e),this.frame.setSize(t,e),this.width=t,this.height=e}return 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.texture},fill:function(t,e){void 0===e&&(e=1);var i=255&(t>>16|0),n=255&(t>>8|0),s=255&(0|t);if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var r=this.gl;r.clearColor(i/255,n/255,s/255,e),r.clear(r.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else this.context.fillStyle="rgb("+i+","+n+","+s+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height);return this},clear:function(){if(this.dirty){if(this.gl){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null)}else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,this.canvas.width,this.canvas.height),e.restore()}this.dirty=!1}return 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,1),r){this.renderer.setFramebuffer(this.framebuffer);var o=this.pipeline;o.projOrtho(0,this.width,0,this.height,-1e3,1e3),this.batchList(t,e,i,n,s),o.flush(),this.renderer.setFramebuffer(null),o.projOrtho(0,o.width,o.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,1),o){this.renderer.setFramebuffer(this.framebuffer);var h=this.pipeline;h.projOrtho(0,this.width,0,this.height,-1e3,1e3),h.batchTextureFrame(a,i,n,r,s,this.camera.matrix,null),h.flush(),this.renderer.setFramebuffer(null),h.projOrtho(0,h.width,h.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i,n,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;r0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;s0)for(var e=this.list,i=new a,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=c},function(t,e,i){var n=i(922),s=i(919),r=i(0),o=i(13),a=i(95),h=i(15),l=i(94),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},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(3),s=i(97),r=function(t,e,i){for(var n=[],s=0;s0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(4);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=c*p-d*f,v=p/g,y=-d/g,m=-f/g,x=c/g,w=(f*s-p*i)/g,b=-(c*s-d*i)/g;return h.x=t*v+e*m+w,h.y=t*y+e*x+b,h}},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){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var w=i;wh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(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.nextZ;p&&p.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;p=p.nextZ}for(p=t.prevZ;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}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)&&w(s,r)&&w(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),S(n),S(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=b(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)&&w(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(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)&&w(t,e)&&w(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 w(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 b(t,e){var i=new A(t.i,t.x,t.y),n=new A(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 T(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(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 C(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,i){var n=i(0),s=i(503),r=i(502),o=i(132),a=new n({Extends:o,initialize:function(t){o.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.topology?t.topology:t.renderer.gl.TRIANGLES,vertShader:t.vertShader?t.vertShader:r,fragShader:t.fragShader?t.fragShader:s,vertexCapacity:t.vertexCapacity?t.vertexCapacity:3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT,vertices:new Float32Array([-1,1,-1,-7,7,1]).buffer,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.maxQuads=1,this.resolutionDirty=!0},onBind:function(){o.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.resolutionDirty&&(t.setFloat2(e,"uResolution",this.width,this.height),t.setInt1(e,"uMainSampler",0),t.setInt1(e,"uMaskSampler",1),this.resolutionDirty=!1),this},resize:function(t,e,i){return o.prototype.resize.call(this,t,e,i),this.resolutionDirty=!0,this},beginMask:function(t,e,i){var n=t.bitmapMask,s=this.renderer,r=this.gl,o=n.visible;n&&r&&(s.setFramebuffer(t.maskFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.visible=!0,n.renderWebGL(s,n,0,i),n.visible=o,s.flush(),s.setFramebuffer(t.mainFramebuffer),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT))},endMask:function(t){var e=t.bitmapMask,i=this.renderer,n=this.gl;e&&(i.setFramebuffer(null),i.setPipeline(this),i.setTexture2D(t.maskTexture,1),i.setTexture2D(t.mainTexture,0),i.setInt1(this.program,"uInvertMaskAlpha",t.invertAlpha),n.drawArrays(this.topology,0,3))}});t.exports=a},function(t,e){t.exports=function(t,e,i){e||(e="image/png"),i||(i=.92);var n=t.getContext("experimental-webgl"),s=new Uint8Array(n.drawingBufferWidth*n.drawingBufferHeight*4);n.readPixels(0,0,n.drawingBufferWidth,n.drawingBufferHeight,n.RGBA,n.UNSIGNED_BYTE,s);var r,o=document.createElement("canvas"),a=o.getContext("2d");o.width=n.drawingBufferWidth,o.height=n.drawingBufferHeight;for(var h=(r=a.getImageData(0,0,o.width,o.height)).data,l=0;l2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.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>16&&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){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl,i=this.width,n=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture&&(i=t.renderTexture.width,n=t.renderTexture.height),e.bindFramebuffer(e.FRAMEBUFFER,t),e.viewport(0,0,i,n),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,a=s.NEAREST,h=s.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,o(e,i)&&(h=s.REPEAT),n===r.ScaleModes.LINEAR&&this.config.antialias&&(a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,s.RGBA,t):this.createTexture2D(0,a,a,h,h,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=void 0===l||null===l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},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&&a(this.nativeTextures,e),this.gl.deleteTexture(t),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,s=t._ch;this.pushScissor(e,i,n,s);var r=this.pipelines.TextureTintPipeline,o=t.backgroundColor;if(t.renderToTexture){this.setFramebuffer(t.framebuffer);var a=this.gl;a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),r.projOrtho(0,t.width,0,t.height,-1e3,1e3),o.alphaGL>0&&r.drawFillRect(e,i,n,s,l.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL)}else o.alphaGL>0&&r.drawFillRect(e,i,n,s,l.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL)},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,l.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,l.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=l.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)}},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&(t.enable(t.SCISSOR_TEST),t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height)),this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,o=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;l=0?g=-(g+d):g<0&&(g=Math.abs(g)-d)),-1===m&&(v>=0?v=-(v+f):v<0&&(v=Math.abs(v)-f))}a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),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.scale(y,m),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.drawImage(e.source.image,u,c,d,f,g,v,d/p,f/p),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},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;var t=this;this.step=function e(i){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.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,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){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(57);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&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","crisp-edges","-moz-crisp-edges","-webkit-optimize-contrast","optimize-contrast","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=function(t,e,i,n,s){var r=.5*(n-e),o=.5*(s-i),a=t*t;return(2*i-2*n+r+o)*(t*a)+(-3*i+3*n-2*r-o)*a+r*t+i}},function(t,e,i){var n=i(11);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,r,o=Number.MAX_VALUE,a=Number.MAX_VALUE,h=Number.MIN_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,u=0;u16777215?{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),s=i(286);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},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){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,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){void 0===e&&(e=1);for(var i=null,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;i--){var n=Math.floor(this.frac()*(e+1)),s=t[n];t[n]=t[i],t[i]=s}return t}});t.exports=n},function(t,e,i){var n=i(138),s=i(65),r=i(16),o=i(5);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){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n={};t.exports=n;var s=i(129),r=i(108),o=i(335),a=i(128),h=i(692),l=i(42);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,s=r.magnitude(r.sub(i,n));e.length=void 0!==e.length?e.length:s,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e,i){var n={};t.exports=n;var s=i(42);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r1e3)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)}),this},createShortcut:function(){var t=this;FBInstant.canCreateShortcutAsync().then(function(e){e&&FBInstant.createShortcutAsync().then(function(){t.emit("shortcutcreated")}).catch(function(){t.emit("shortcutfailed")})})},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=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.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("animationupdate",i,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(169),r=i(10),o=i(168),a=i(62),h=i(72),l=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.timeScale=1},createTimeline:function(t){return o(this,t)},timeline:function(t){var e=o(this,t);return e.paused||(this._add.push(e),this._toProcess++),e},create:function(t){return h(this,t)},add:function(t){var e=h(this,t);return this._add.push(e),this._toProcess++,e},existing:function(t){return this._add.push(t),this._toProcess++,this},addCounter:function(t){var e=s(this,t);return this._add.push(e),this._toProcess++,e},preUpdate:function(){if(0!==this._toProcess){var t,e,i=this._destroy,n=this._active;for(t=0;t-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;ta&&(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(0),s=i(1),r=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","object layer"),this.opacity=s(t,"opacity",1),this.properties=s(t,"properties",{}),this.propertyTypes=s(t,"propertytypes",{}),this.type=s(t,"type","objectgroup"),this.visible=s(t,"visible",!0),this.objects=s(t,"objects",[])}});t.exports=r},function(t,e,i){var n=i(645),s=i(320),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=s(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?(a.ellipse=t.ellipse,a.width=t.width,a.height=t.height):t.text?(a.width=t.width,a.height=t.height,a.text=t.text):(a.rectangle=!0,a.width=t.width,a.height=t.height);return a}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t-1}return!1}},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=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off("update",this.step,this),t.events.emit("transitioncomplete",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){return this.manager.add(t,e,i),this},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){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t),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)},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("shutdown",this.shutdown,this),t.off("postupdate",this.step,this),t.off("transitionout")},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),t.exports=a},function(t,e,i){var n=i(80),s=i(17),r={SceneManager:i(202),ScenePlugin:i(331),Settings:i(200),Systems:i(122)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(173),s=new(i(0))({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this)},boot:function(){}});t.exports=s},function(t,e,i){t.exports={BasePlugin:i(173),DefaultPlugins:i(124),PluginCache:i(10),PluginManager:i(204),ScenePlugin:i(333)}},function(t,e,i){var n={};t.exports=n;var s=i(304);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){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e,i){var n=i(33),s=i(0),r=i(43),o=i(32),a=i(4),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,n){void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y);var s=this.gameObject;return!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.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),this.offset.set(i,n),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.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)},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;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),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=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(43);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(43);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=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(33),s=i(0),r=i(43),o=i(155),a=i(11),h=i(32),l=i(27),u=i(4),c=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.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(e.x,e.y),this.prev=new u(e.x,e.y),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new u(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=new u,this.newVelocity=new u,this.deltaMax=new u,this.acceleration=new u,this.allowDrag=!0,this.drag=new u,this.allowGravity=!0,this.gravity=new u,this.bounce=new u,this.worldBounce=null,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new u(1e4,1e4),this.friction=new u(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=r.FACING_NONE,this.immovable=!1,this.moves=!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.syncBounds=!1,this.isMoving=!1,this.stopVelocityOnCollide=!0,this.physicsType=r.DYNAMIC_BODY,this._reset=!0,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._bounds=new a,this._tempMatrix=new l},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this._tempMatrix);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY;var n=!1;if(this.syncBounds){var s=t.getBounds(this._bounds);this.width=s.width,this.height=s.height,n=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},update:function(t){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,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.blocked.none=!0,this.blocked.up=!1,this.blocked.down=!1,this.blocked.left=!1,this.blocked.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1,this.updateBounds();var e=this.transform;if(this.position.x=e.x+e.scaleX*(this.offset.x-e.displayOriginX),this.position.y=e.y+e.scaleY*(this.offset.y-e.displayOriginY),this.updateCenter(),this.rotation=e.rotation,this.preRotation=this.rotation,this._reset&&(this.prev.x=this.position.x,this.prev.y=this.position.y),this.moves){this.world.updateMotion(this,t);var i=this.velocity.x,n=this.velocity.y;this.newVelocity.set(i*t,n*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(n,i),this.speed=Math.sqrt(i*i+n*n),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit("worldbounds",this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.deltaX(),this._dy=this.deltaY()},postUpdate:function(){this._dx=this.deltaX(),this._dy=this.deltaY(),this.moves&&(0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this._dx<0?this.facing=r.FACING_LEFT:this._dx>0&&(this.facing=r.FACING_RIGHT),this._dy<0?this.facing=r.FACING_UP:this._dy>0&&(this.facing=r.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),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(this.position),this.prev.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?n(this,t,e):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.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},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(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,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){return void 0===t&&(t=!0),this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),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},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},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=c},function(t,e,i){var n=i(343),s=i(20),r=i(0),o=i(342),a=i(43),h=i(58),l=i(8),u=i(356),c=i(355),d=i(354),f=i(341),p=i(340),g=i(3),v=i(231),y=i(701),m=i(11),x=i(230),w=i(700),b=i(695),T=i(694),S=i(70),A=i(338),C=i(339),_=i(4),M=i(40),P=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.bodies=new S,this.staticBodies=new S,this.pendingDestroy=new S,this.colliders=new v,this.gravity=new _(g(e,"gravity.x",0),g(e,"gravity.y",0)),this.bounds=new m(g(e,"x",0),g(e,"y",0),g(e,"width",t.sys.game.config.width),g(e,"height",t.sys.game.config.height)),this.checkCollision={up:g(e,"checkCollision.up",!0),down:g(e,"checkCollision.down",!0),left:g(e,"checkCollision.left",!0),right:g(e,"checkCollision.right",!0)},this.fps=g(e,"fps",60),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(e,"timeScale",1),this.OVERLAP_BIAS=g(e,"overlapBias",4),this.TILE_BIAS=g(e,"tileBias",16),this.forceX=g(e,"forceX",!1),this.isPaused=g(e,"isPaused",!1),this._total=0,this.drawDebug=g(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(e,"debugShowBody",!0),debugShowStaticBody:g(e,"debugShowStaticBody",!0),debugShowVelocity:g(e,"debugShowVelocity",!0),bodyDebugColor:g(e,"debugBodyColor",16711935),staticBodyDebugColor:g(e,"debugStaticBodyColor",255),velocityDebugColor:g(e,"debugVelocityColor",65280)},this.maxEntries=g(e,"maxEntries",16),this.useTree=g(e,"useTree",!0),this.tree=new x(this.maxEntries),this.staticTree=new x(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=a.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=s;)this._elapsed-=s,i++,this.step(n);this.stepsLastFrame=i}},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(o=(r=s.entries).length,t=0;ta.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(u.x,u.y,l.right,l.y)-u.radius):u.y>l.bottom&&(u.xl.right&&(a=h(u.x,u.y,l.right,l.bottom)-u.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=c*Math.cos(o)+d*Math.sin(o),w=c*Math.sin(o)-d*Math.cos(o),b=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),S=((g-m)*x+2*m*b)/(g+m),A=(2*g*x+(m-g)*b)/(g+m);t.immovable||(t.velocity.x=(S*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+S*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(A*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+A*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>c?t.velocity.x*=-1:v<0&&!e.immovable&&c0&&!t.immovable&&y>d?t.velocity.y*=-1:y<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&v0&&!e.immovable&&c>v?e.velocity.x*=-1:d<0&&!t.immovable&&y0&&!e.immovable&&c>y&&(e.velocity.y*=-1));var C=this._frameTime;return t.immovable||(t.x+=t.velocity.x*C-a*Math.cos(o),t.y+=t.velocity.y*C-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*C+a*Math.cos(o),e.y+=e.velocity.y*C+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("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;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)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,p=e.getTilesWithinWorldXY(a,h,l,u);if(0===p.length)return!1;for(var g={left:0,right:0,top:0,bottom:0},v=0;ve-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=0?t:t+2*Math.PI}},function(t,e,i){var n=i(0),s=i(18),r=i(70),o=i(8),a=i(6),h=i(1),l=i(10),u=i(75),c=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,a.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(h(i,"baseURL",e.loaderBaseURL)),this.setPath(h(i,"path",e.loaderPath)),this.setPrefix(h(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=h(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=u(h(i,"responseType",e.loaderResponseType),h(i,"async",e.loaderAsync),h(i,"user",e.loaderUser),h(i,"password",e.loaderPassword),h(i,"timeout",e.loaderTimeout)),this.crossOrigin=h(i,"crossOrigin",e.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=s.LOADER_IDLE,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.pluginStart,this)},boot:function(){this.systems.events.once("destroy",this.destroy,this)},pluginStart:function(){this.systems.events.once("shutdown",this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},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("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("update",this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit("progress",this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.size0&&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,i){var n=i(0),s=i(8),r=i(3),o=i(76),a=i(179),h=i(111),l=i(178),u=i(374),c=i(373),d=i(372),f=i(146),p=new n({Extends:s,initialize:function(t){s.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.keys=[],this.combos=[],this.queue=[],this.onKeyHandler,this.time=0,t.pluginEvents.once("boot",this.boot,this),t.pluginEvents.on("start",this.start,this)},boot:function(){var t=this.settings.input,e=this.scene.sys.game.config;this.enabled=r(t,"keyboard",e.inputKeyboard),this.target=r(t,"keyboard.target",e.inputKeyboardEventTarget),this.sceneInputPlugin.pluginEvents.once("destroy",this.destroy,this)},start:function(){this.enabled&&this.startListeners(),this.sceneInputPlugin.pluginEvents.once("shutdown",this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=function(e){if(!e.defaultPrevented&&t.isActive()){t.queue.push(e);var i=t.keys[e.keyCode];i&&i.preventDefault&&e.preventDefault()}};this.onKeyHandler=e,this.target.addEventListener("keydown",e,!1),this.target.addEventListener("keyup",e,!1),this.sceneInputPlugin.pluginEvents.on("update",this.update,this)},stopListeners:function(){this.target.removeEventListener("keydown",this.onKeyHandler),this.target.removeEventListener("keyup",this.onKeyHandler),this.sceneInputPlugin.pluginEvents.off("update",this.update)},createCursorKeys:function(){return this.addKeys({up:h.UP,down:h.DOWN,left:h.LEFT,right:h.RIGHT,space:h.SPACE,shift:h.SHIFT})},addKeys:function(t){var e={};if("string"==typeof t){t=t.split(",");for(var i=0;i-1?e[i]=t:e[t.keyCode]=t,t}return"string"==typeof t&&(t=h[t.toUpperCase()]),e[t]||(e[t]=new a(t)),e[t]},removeKey:function(t){var e=this.keys;if(t instanceof a){var i=e.indexOf(t);i>-1&&(this.keys[i]=void 0)}else"string"==typeof t&&(t=h[t.toUpperCase()]);e[t]&&(e[t]=void 0)},createCombo:function(t,e){return new l(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=f(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(t){this.time=t;var e=this.queue.length;if(this.enabled&&0!==e)for(var i=this.queue.splice(0,e),n=this.keys,s=0;s=e}}},function(t,e,i){var n=i(89),s=i(33),r=i(0),o=i(183),a=i(380),h=i(58),l=i(116),u=i(55),c=i(8),d=i(1),f=i(76),p=i(7),g=i(10),v=i(11),y=i(32),m=i(68),x=i(61),w=new r({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,f.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once("destroy",this.destroy,this),this.pluginEvents.emit("boot")},start:function(){var t=this.systems.events;t.on("transitionstart",this.transitionIn,this),t.on("transitionout",this.transitionOut,this),t.on("transitioncomplete",this.transitionComplete,this),t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.once("shutdown",this.shutdown,this),this.enabled=!0,this.pluginEvents.emit("start")},preUpdate:function(){this.pluginEvents.emit("preUpdate");var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var s=this._list,r=0;r-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},update:function(t,e){if(this.isActive()){this.pluginEvents.emit("update",t,e);var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(n=!0,this._pollTimer=this.pollRate)),n)for(var s=this.manager.pointers,r=0;r0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}}},clear:function(t){var e=t.input;if(e){this.queueForRemoval(t),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null;var i=this._draggable.indexOf(t);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(t))>-1&&this._over[0].splice(i,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=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var a=[];for(i=0;i1&&(this.sortGameObjects(a),this.topOnly&&a.splice(1)),this._drag[t.id]=a,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&h(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3===t.dragState){for(s=this._drag[t.id],i=0;i0?(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),r.target=l[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):(n.emit("dragleave",t,r.target),this.emit("dragleave",t,n,r.target),l[0]?(r.target=l[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target)):r.target=null)}else!r.target&&l[0]&&(r.target=l[0],n.emit("dragenter",t,r.target),this.emit("dragenter",t,n,r.target));var c=t.x-n.input.dragX,d=t.y-n.input.dragY;n.emit("drag",t,c,d),this.emit("drag",t,n,c,d)}return s.length}if(5===t.dragState){for(s=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,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 a(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,a=!1;if(p(e)){var h=e;e=d(h,"hitArea",null),i=d(h,"hitAreaCallback",null),n=d(h,"draggable",!1),s=d(h,"dropZone",!1),r=d(h,"cursor",!1),a=d(h,"useHandCursor",!1);var l=d(h,"pixelPerfect",!1),u=d(h,"alphaTolerance",1);l&&(e={},i=this.makePixelPerfect(u)),e&&i||this.setHitAreaFromTexture(t)}else"function"!=typeof e||i||(i=e,e={});for(var c=0;ct.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom0){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){t.exports={CircleToCircle:i(855),CircleToRectangle:i(854),GetRectangleIntersection:i(853),LineToCircle:i(401),LineToLine:i(147),LineToRectangle:i(852),PointToLine:i(400),PointToLineSegment:i(851),RectangleToRectangle:i(240),RectangleToTriangle:i(850),RectangleToValues:i(849),TriangleToCircle:i(848),TriangleToLine:i(847),TriangleToTriangle:i(846)}},function(t,e,i){t.exports={Circle:i(865),Ellipse:i(246),Intersects:i(402),Line:i(845),Point:i(827),Polygon:i(813),Rectangle:i(393),Triangle:i(784)}},function(t,e,i){var n=i(0),s=i(405),r=i(152),o=i(21),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},l=t.matrix,u=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),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=a},function(t,e,i){var n=i(0),s=i(21),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(112);s.register("text",function(t,e){void 0===t&&(t={});var i=r(t,"text",""),s=r(t,"style",null),a=r(t,"padding",null);null!==a&&(s.padding=a);var h=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h})},function(t,e,i){var n=i(25),s=i(130),r=i(14),o=i(12),a=i(35);r.register("sprite",function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),s(h,t),h})},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(69);s.register("image",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),a=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,a,t),a})},function(t,e,i){var n=i(14),s=i(118);n.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new s(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(112);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(35);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(69);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(118);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<r;h--){for(l=0;l0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e){t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}},function(t,e,i){var n=i(0),s=i(39),r=i(63),o=i(3),a=i(35),h=i(62),l=i(4),u=new n({Extends:a,initialize:function(t,e,i,n,s,r){a.call(this,t,i,n,s,r),this.path=e,this.rotateToPath=!1,this.pathRotationVerticalAdjust=!1,this.pathRotationOffset=0,this.pathOffset=new l(i,n),this.pathVector=new l,this.pathTween,this.pathConfig=null,this._prevDirection=h.PLAYING_FORWARD},setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=!1),this.rotateToPath=t,this.pathRotationOffset=e,this.pathRotationVerticalAdjust=i,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=0,t.to=1;var n=r(t,"positionOnPath",!1);if(this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0),this.pathRotationVerticalAdjust=r(t,"verticalAdjust",!1),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),n&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=h.PLAYING_FORWARD,this.rotateToPath){var a=this.path.getPoint(.1);this.rotation=Math.atan2(a.y-this.y,a.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},preUpdate:function(t,e){this.anims.update(t,e);var i=this.pathTween;if(i){var n=i.data[0];if(n.state!==h.PLAYING_FORWARD&&n.state!==h.PLAYING_BACKWARD)return;var r=this.pathVector;this.path.getPoint(i.getValue(),r),r.add(this.pathOffset);var o=this.x,a=this.y;this.setPosition(r.x,r.y);var l=this.x-o,u=this.y-a;if(0===l&&0===u)return;if(n.state!==this._prevDirection)return void(this._prevDirection=n.state);this.rotateToPath&&(this.rotation=Math.atan2(u,l)+s(this.pathRotationOffset),this.pathRotationVerticalAdjust&&(this.flipY=0!==this.rotation&&n.state===h.PLAYING_BACKWARD))}}});t.exports=u},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e){t.exports=function(t,e){for(var i=0;ithis._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,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=i(52),s=i(0),r=i(13),o=i(426),a=i(425),h=i(909),l=i(1),u=i(150),c=i(424),d=i(113),f=i(428),p=i(423),g=i(11),v=i(83),y=i(4),m=i(40),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),this.y=new h(e,"y",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),this.angle=new h(e,"angle",{min:0,max:360}),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?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(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},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=i(0),s=i(39),r=i(58),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>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"),this.index=i.alive.length},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(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&&e.cameraFilter&r.id)o&&(o.style.display="none");else{var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3,u=e.originX*e.width,c=e.originY*e.height;h.applyITRS(e.x-u-r.scrollX*e.scrollFactorX,e.y-c-r.scrollY*e.scrollFactorY,e.rotation,e.scaleX,e.scaleY),a.copyFrom(r.matrix),a.multiply(h,l),o.style.display="block",o.style.opacity=e.alpha,o.style.zIndex=e._depth,o.style.pointerEvents="auto",o.style.mixBlendMode=n[e._blendMode],o.style.transform=l.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",o.style.transformOrigin=100*e.originX+"% "+100*e.originY+"%"}}},function(t,e,i){var n=i(0),s=i(13),r=i(915),o=i(15),a=i(153),h=i(156),l=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.skewX=0,this.skewY=0,this.rotate3d=new h,this.rotate3dAngle="deg",this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),n&&this.setElement(n)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;i0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e,i){var n=i(56);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return n(t,s)}},function(t,e,i){var n=i(30);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;ht.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(251);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),o=0;o=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(i>0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e,i){var n=i(30);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){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,i,n,s){if(void 0===s&&(s=t),i>0){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.pop(),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t},tick:function(){this.step(window.performance.now())},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(window.performance.now())},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){var i=0,n=function(t,e,n,s){var r=i-s.y-s.height;t.add(n,e,s.x,r,s.width,s.height)};t.exports=function(t,e,s){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height),i=r.height;for(var o=s.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;cx||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var _=l,M=l,P=0,E=e.sourceIndex,k=0;kg||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,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,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(34);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var r,o=i.frames;for(var a in o){var h=o[a];r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted()),r.customData=n(h)}for(var l in i)"frames"!==l&&(Array.isArray(i[l])?t.customData[l]=i[l].slice(0):t.customData[l]=i[l]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},function(t,e,i){var n=i(34);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a=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,i){var n=i(57),s=i(81),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){t.exports={os:i(57),browser:i(81),features:i(123),input:i(495),audio:i(494),video:i(493),fullscreen:i(492),canvasFeatures:i(210)}},function(t,e,i){var n=i(23);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){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){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 tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid texture-based tint"," color.rgb = mix(texture.rgb, outTint.rgb, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},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){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];","","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(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_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_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,i){var n=i(265),s=i(22),r=i(23),o=i(123);t.exports=function(t){var e,a,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.antialias||s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width*h.resolution,h.height*h.resolution,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.antialias||n.setCrisp(t.canvas),t.canvas.style.width=(h.width*h.zoom).toString()+"px",t.canvas.style.height=(h.height*h.zoom).toString()+"px",h.renderType!==r.HEADLESS&&(e=i(261),a=i(258),h.renderType===r.WEBGL?(t.renderer=new a(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(85);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style=["display: block;","width: "+t.canvas.width+"px;","height: "+t.canvas.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e,i){var n=i(0),s=i(23),r=i(1),o=i(3),a=i(7),h=i(16),l=i(2),u=i(124),c=i(134),d=new n({initialize:function(t){void 0===t&&(t={});this.width=o(t,"width",1024),this.height=o(t,"height",768),this.zoom=o(t,"zoom",1),this.resolution=o(t,"resolution",1),this.parent=o(t,"parent",null),this.scaleMode=o(t,"scaleMode",0);var e=o(t,"scale",null);e&&(this.width=o(e,"width",this.width),this.height=o(e,"height",this.height),this.zoom=o(e,"zoom",this.zoom),this.resolution=o(e,"resolution",this.resolution),this.parent=o(e,"parent",this.parent),this.scaleMode=o(e,"mode",this.scaleMode)),this.renderType=o(t,"type",s.AUTO),this.canvas=o(t,"canvas",null),this.context=o(t,"context",null),this.canvasStyle=o(t,"canvasStyle",null),this.sceneConfig=o(t,"scene",null),this.seed=o(t,"seed",[(Date.now()*Math.random()).toString()]),h.RND.init(this.seed),this.gameTitle=o(t,"title",""),this.gameURL=o(t,"url","https://phaser.io"),this.gameVersion=o(t,"version",""),this.autoFocus=o(t,"autoFocus",!0),this.domCreateContainer=o(t,"dom.createContainer",!1),this.domBehindCanvas=o(t,"dom.behindCanvas",!1),this.inputKeyboard=o(t,"input.keyboard",!0),this.inputKeyboardEventTarget=o(t,"input.keyboard.target",window),this.inputMouse=o(t,"input.mouse",!0),this.inputMouseEventTarget=o(t,"input.mouse.target",null),this.inputMouseCapture=o(t,"input.mouse.capture",!0),this.inputTouch=o(t,"input.touch",!0),this.inputTouchEventTarget=o(t,"input.touch.target",null),this.inputTouchCapture=o(t,"input.touch.capture",!0),this.inputActivePointers=o(t,"input.activePointers",1),this.inputGamepad=o(t,"input.gamepad",!1),this.inputGamepadEventTarget=o(t,"input.gamepad.target",window),this.disableContextMenu=o(t,"disableContextMenu",!1),this.audio=o(t,"audio"),this.hideBanner=!1===o(t,"banner",null),this.hidePhaser=o(t,"banner.hidePhaser",!1),this.bannerTextColor=o(t,"banner.text","#ffffff"),this.bannerBackgroundColor=o(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(t,"fps",null);var i=o(t,"render",t);this.autoResize=o(i,"autoResize",!1),this.antialias=o(i,"antialias",!0),this.roundPixels=o(i,"roundPixels",!1),this.pixelArt=o(i,"pixelArt",!1),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(i,"transparent",!1),this.clearBeforeRender=o(i,"clearBeforeRender",!0),this.premultipliedAlpha=o(i,"premultipliedAlpha",!0),this.preserveDrawingBuffer=o(i,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=o(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(i,"powerPreference","default"),this.batchSize=o(i,"batchSize",2e3);var n=o(t,"backgroundColor",0);this.backgroundColor=c(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(t,"callbacks.preBoot",l),this.postBoot=o(t,"callbacks.postBoot",l),this.physics=o(t,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(t,"loader.baseURL",""),this.loaderPath=o(t,"loader.path",""),this.loaderMaxParallelDownloads=o(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(t,"loader.crossOrigin",void 0),this.loaderResponseType=o(t,"loader.responseType",""),this.loaderAsync=o(t,"loader.async",!0),this.loaderUser=o(t,"loader.user",""),this.loaderPassword=o(t,"loader.password",""),this.loaderTimeout=o(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var d=o(t,"plugins",null),f=u.DefaultScene;d&&(Array.isArray(d)?this.defaultPlugins=d:a(d)&&(this.installGlobalPlugins=r(d,"global",[]),this.installScenePlugins=r(d,"scene",[]),Array.isArray(d.default)?f=d.default:Array.isArray(d.defaultMerge)&&(f=f.concat(d.defaultMerge)))),this.defaultPlugins=f;var p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(t,"images.default",p+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(t,"images.missing",p+"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=d},function(t,e,i){var n=i(85),s=i(215),r=i(213),o=i(22),a=i(0),h=i(506),l=i(505),u=i(504),c=i(59),d=i(497),f=i(496),p=i(264),g=i(8),v=i(305),y=i(209),m=i(10),x=i(204),w=i(491),b=i(202),T=i(199),S=i(192),A=i(478),C=i(477),_=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new S(this),this.cache=new r(this),this.registry=new c(this),this.input=new y(this,this.config),this.scene=new b(this,this.config.sceneConfig),this.device=f,this.scaleManager=new w(this,this.config),this.sound=T.create(this),this.loop=new A(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new v(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isOver=!0,p(this.boot.bind(this))},boot:function(){m.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("texturesready",this.texturesReady,this)):console.warn("Core Phaser Plugins missing. Cannot start.")},texturesReady:function(){this.events.emit("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)),C(this);var t=this.events;t.on("hidden",this.onHidden,this),t.on("visible",this.onVisible,this),t.on("blur",this.onBlur,this),t.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e);var n=this.renderer;n.preRender(),i.emit("prerender",n,t,e),this.scene.render(n),n.postRender(),i.emit("postrender",n,t,e)},headlessStep:function(t,e){var i=this.events;i.emit("prestep",t,e),i.emit("step",t,e),this.scene.update(t,e),i.emit("poststep",t,e),i.emit("prerender"),i.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.domContainer&&(this.domContainer.style.width=t+"px",this.domContainer.style.height=e+"px"),this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=_},function(t,e,i){var n=i(1);t.exports=function(t){return{developerPayload:n(t,"developerPayload",""),paymentID:n(t,"paymentID",""),productID:n(t,"productID",""),purchaseTime:n(t,"purchaseTime",""),purchaseToken:n(t,"purchaseToken",""),signedRequest:n(t,"signedRequest","")}}},function(t,e,i){var n=i(1);t.exports=function(t){return{title:n(t,"title",""),productID:n(t,"productID",""),description:n(t,"description",""),imageURI:n(t,"imageURI",""),price:n(t,"price",""),priceCurrencyCode:n(t,"priceCurrencyCode","")}}},function(t,e){t.exports=function(t){return{score:t.getScore(),scoreFormatted:t.getFormattedScore(),timestamp:t.getTimestamp(),rank:t.getRank(),data:t.getExtraData(),playerName:t.getPlayer().getName(),playerPhotoURL:t.getPlayer().getPhoto(),playerID:t.getPlayer().getID()}}},function(t,e,i){var n=i(0),s=i(8),r=i(510),o=new n({Extends:s,initialize:function(t,e){s.call(this),this.plugin=t,this.ref=e,this.name=e.getName(),this.contextID=e.getContextID(),this.entryCount=0,this.playerScore=null,this.scores=[],this.getEntryCount()},getEntryCount:function(){var t=this;this.ref.getEntryCountAsync().then(function(e){console.log("entry count",e),t.entryCount=e,t.emit("getentrycount",e,t.name)}).catch(function(t){console.warn(t)})},setScore:function(t,e){void 0===e&&(e="");var i=this;this.ref.setScoreAsync(t,e).then(function(t){console.log("set score",t),i.emit("setscore",t.getScore(),t.getExtraData(),i.name)}).catch(function(t){console.warn(t)})},getPlayerScore:function(){var t=this;this.ref.getPlayerEntryAsync().then(function(e){console.log("get player score");var i=r(e);console.log(i),t.playerScore=i,t.emit("getplayerscore",i,t.name)}).catch(function(t){console.warn(t)})},getScores:function(t,e){void 0===t&&(t=10),void 0===e&&(e=0);var i=this;this.ref.getEntriesAsync().then(function(t){console.log("get scores",t),i.scores=[],t.forEach(function(t){i.scores.push(r(t))}),i.emit("getscores",i.scores,i.name)}).catch(function(t){console.warn(t)})}});t.exports=o},function(t,e){t.exports=function(t,e){return{instance:t,placementID:t.getPlacementID(),shown:!1,video:e}}},function(t,e,i){var n=i(0),s=i(8),r=i(10),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){t.exports={EventEmitter:i(513)}},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var h,l=[],u=!1,c=-1;function d(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&f())}function f(){if(!u){var t=a(d);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c1)for(var i=1;i1&&(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){t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},function(t,e,i){var n=i(31);n.ColorToRGBA=i(936),n.ComponentToHex=i(519),n.GetColor=i(159),n.GetColor32=i(288),n.HexStringToColor=i(289),n.HSLToColor=i(935),n.HSVColorWheel=i(934),n.HSVToRGB=i(517),n.HueToComponent=i(518),n.IntegerToColor=i(287),n.IntegerToRGB=i(286),n.Interpolate=i(933),n.ObjectToColor=i(285),n.RandomRGB=i(932),n.RGBStringToColor=i(284),n.RGBToHSV=i(931),n.RGBToString=i(930),n.ValueToColor=i(134),t.exports=n},function(t,e,i){var n=i(0),s=i(59),r=i(10),o=new n({Extends:s,initialize:function(t){s.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){this.events=this.systems.events,this.events.once("destroy",this.destroy,this)},start:function(){this.events.once("shutdown",this.shutdown,this)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){s.prototype.destroy.call(this),this.events.off("start",this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",o,"data"),t.exports=o},function(t,e,i){t.exports={DataManager:i(59),DataManagerPlugin:i(521)}},function(t,e,i){var n=i(266),s=i(0),r=i(86),o=i(4),a=new s({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.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;ei;)n-=i;n0&&(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(87),s=i(270),r=i(536),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=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){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,i){var n=i(212),s=i(0),r=i(1),o=i(10),a=i(32),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.baseScale=1,t.sys.events.once("boot",this.boot,this),t.sys.events.on("start",this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.systems.events.once("destroy",this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on("update",this.update,this),e.once("shutdown",this.shutdown,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new n(t,e,i,s);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,s=0;s0&&(h.preRender(r,o),t.render(n,e,i,h))}},resetAll:function(){for(var t=0;t=1?1:1/e*(1+(e*t|0))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e,i){var n=i(20),s=i(0),r=i(4),o=i(126),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,r,a){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===s&&(s=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning?h:(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(h.scrollX,h.scrollY),this.destination.set(t,e),h.getScroll(t,e,this.current),"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit("camerapanstart",this.camera,this,i,t,e),h)},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-h&&(c-=h,n+=l),f=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){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){var n=i(16),s=i(27),r=i(220),o=i(219),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t){void 0===t&&(t=new s);var e=this.parentContainer;if(!e)return this.getLocalTransformMatrix(t);for(var i=[];e;)i.unshift(e),e=e.parentContainer;t.loadIdentity();for(var n=i.length,r=0;r>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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(60),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(222),s=i(221),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&this.texture&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new s(this.scene,t)}};t.exports=r},function(t,e,i){var n=i(11),s=i(295),r=i(4),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,e){(t||(t=new r),void 0===e&&(e=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var e,i,s,r,o,a,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},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){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},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)>=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e,i){var n=i(20),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},function(t,e,i){var n=i(47),s=i(45),r=i(46),o=i(44);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(45),r=i(48),o=i(44);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(93),s=i(45),r=i(92),o=i(44);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(90),s=i(47),r=i(91),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(90),s=i(49),r=i(91),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(92),s=i(91);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(606),s=i(93),r=i(90);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(51),s=i(47),r=i(50),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(49),r=i(50),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(51),s=i(93),r=i(50),o=i(92);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(302),s=[];s[n.BOTTOM_CENTER]=i(610),s[n.BOTTOM_LEFT]=i(609),s[n.BOTTOM_RIGHT]=i(608),s[n.CENTER]=i(607),s[n.LEFT_CENTER]=i(605),s[n.RIGHT_CENTER]=i(604),s[n.TOP_CENTER]=i(603),s[n.TOP_LEFT]=i(602),s[n.TOP_RIGHT]=i(601);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(1020),Call:i(1019),GetFirst:i(1018),GetLast:i(1017),GridAlign:i(1016),IncAlpha:i(1015),IncX:i(1014),IncXY:i(1013),IncY:i(1012),PlaceOnCircle:i(1011),PlaceOnEllipse:i(1010),PlaceOnLine:i(1009),PlaceOnRectangle:i(1008),PlaceOnTriangle:i(1007),PlayAnimation:i(1006),PropertyValueInc:i(36),PropertyValueSet:i(26),RandomCircle:i(1005),RandomEllipse:i(1004),RandomLine:i(1003),RandomRectangle:i(1002),RandomTriangle:i(1001),Rotate:i(1e3),RotateAround:i(999),RotateAroundDistance:i(998),ScaleX:i(997),ScaleXY:i(996),ScaleY:i(995),SetAlpha:i(994),SetBlendMode:i(993),SetDepth:i(992),SetHitArea:i(991),SetOrigin:i(990),SetRotation:i(989),SetScale:i(988),SetScaleX:i(987),SetScaleY:i(986),SetTint:i(985),SetVisible:i(984),SetX:i(983),SetXY:i(982),SetY:i(981),ShiftPosition:i(980),Shuffle:i(979),SmootherStep:i(978),SmoothStep:i(977),Spread:i(976),ToggleVisible:i(975),WrapInRectangle:i(974)}},function(t,e){if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var i=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s0){var s=t.gl,r=this.pipeline,o=r.vertexBuffer,a=e.tileset.glTexture;t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer,t.setPipeline(r),t.setTexture2D(a,0),s.drawArrays(r.topology,0,e.vertexCount),r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}}},function(t,e,i){var n=i(2),s=i(2);n=i(635),s=i(634),t.exports={renderWebGL:n,renderCanvas:s}},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),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,a.multiply(h,l));var u=e.tileset,c=t.currentContext,d=u.image.getSourceImage();c.save(),l.copyToContext(c);for(var f=n.alpha*e.alpha,p=0;p-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(17);t.exports=function(t){for(var e,i,s,r,o,a=0;a>>0;return n}},function(t,e,i){var n=i(648),s=i(1),r=i(106),o=i(320),a=i(66);t.exports=function(t,e){for(var i=[],h=0;h0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e,i){t.exports={Parse:i(323),Parse2DArray:i(225),ParseCSV:i(322),Impact:i(316),Tiled:i(321)}},function(t,e,i){var n=i(54),s=i(53),r=i(4);t.exports=function(t,e,i,o,a,h){return void 0===o&&(o=new r(0,0)),o.x=n(t,i,a,h),o.y=s(e,i,a,h),o}},function(t,e,i){var n=i(24);t.exports=function(t,e,i,s,r,o){if(void 0!==r){var a,h=n(t,e,i,s,null,o),l=0;for(a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e,i){var n=i(67),s=i(41),r=i(113);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;ae)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(67),s=i(41),r=i(226);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;a=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;r=0&&p=0&&gr?(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=i(1026);n.Body=i(74),n.Composite=i(229),n.World=i(686),n.Detector=i(690),n.Grid=i(1025),n.Pairs=i(1024),n.Pair=i(622),n.Query=i(1046),n.Resolver=i(1023),n.SAT=i(689),n.Constraint=i(303),n.Common=i(42),n.Engine=i(1022),n.Events=i(304),n.Sleeping=i(335),n.Plugin=i(687),n.Bodies=i(174),n.Composites=i(1029),n.Axes=i(692),n.Bounds=i(128),n.Svg=i(1044),n.Vector=i(108),n.Vertices=i(129),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(129),r=i(108);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.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?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n=i(174),s=i(74),r=i(0),o=i(623),a=i(1),h=i(113),l=i(129),u=new r({Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var n=a(i,"body",null),s=a(i,"addToWorld",!0);if(n)this.setBody(n,s);else{var r=e.getCollisionGroup();a(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(108),r=i(42);n.fromVertices=function(t){for(var e={},i=0;i0?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=i(341);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){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(696);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},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(698);t.exports=function(t,e,i,s,r){var o=0;return t.deltaX()<0&&!t.blocked.left&&e.collideRight&&t.checkCollision.left?e.faceRight&&t.x0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e,i){var n=i(699),s=i(697),r=i(339);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()=0;a--){var h=e[a],l=r(s,o,h.x,h.y);l=0;a--){var h=e[a],l=r(s,o,h.x,h.y);l>i&&(n=h,i=l)}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 u),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new u),i.setToPolar(t,e)},shutdown:function(){var t=this.systems.events;t.off("update",this.world.update,this.world),t.off("postupdate",this.world.postUpdate,this.world),t.off("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("start",this.start,this),this.scene=null,this.systems=null}});l.register("ArcadePhysics",d,"arcadePhysics"),t.exports=d},function(t,e,i){var n=i(43),s=i(17),r={ArcadePhysics:i(714),Body:i(343),Collider:i(342),Factory:i(349),Group:i(346),Image:i(348),Sprite:i(144),StaticBody:i(338),StaticGroup:i(345),World:i(344)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},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;o1?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,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e){return t/e/1e3}},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.floor(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},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.ceil(t*n)/n}},function(t,e){t.exports=function(t){for(var e=0,i=0;i0&&0==(t&t-1)}},function(t,e,i){t.exports={GetNext:i(414),IsSize:i(84),IsValue:i(732)}},function(t,e,i){var n=i(290);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(125);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?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(266);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?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[i=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e'),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?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)e.x&&t.ye.y}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},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,i){var n=Math.min(t.x,e),s=Math.max(t.right,e);t.x=n,t.width=s-n;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},function(t,e){t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var s=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=s,t.height=r-s,t}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;on(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,i){var n=i(236);t.exports=function(t,e){var i=n(t);return ii&&(i=h.x),h.xr&&(r=h.y),h.ye.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(61),s=i(147);t.exports=function(t,e){return!!(n(t,e.getPointA())||n(t,e.getPointB())||s(t.getLineA(),e)||s(t.getLineB(),e)||s(t.getLineC(),e))}},function(t,e,i){var n=i(401),s=i(61);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottomt.right+r||it.bottom+r||st.right||e.rightt.bottom||e.bottom0}},function(t,e,i){var n=i(400);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){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(11),s=i(240);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){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||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(58);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},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){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e,i){var n=i(33);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,i){var n=i(33);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(89);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(89);n.Area=i(864),n.Circumference=i(298),n.CircumferencePoint=i(138),n.Clone=i(863),n.Contains=i(33),n.ContainsPoint=i(862),n.ContainsRect=i(861),n.CopyFrom=i(860),n.Equals=i(859),n.GetBounds=i(858),n.GetPoint=i(301),n.GetPoints=i(299),n.Offset=i(857),n.OffsetPoint=i(856),n.Random=i(165),t.exports=n},function(t,e,i){var n=i(0),s=i(404),r=i(10),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(241);s.register("quad",function(t,e){void 0===t&&(t={});var i=r(t,"x",0),s=r(t,"y",0),a=r(t,"key",null),h=r(t,"frame",null),l=new o(this.scene,i,s,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l})},function(t,e,i){var n=i(25),s=i(14),r=i(12),o=i(3),a=i(148);s.register("mesh",function(t,e){void 0===t&&(t={});var i=r(t,"key",null),s=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"colors",[]),u=o(t,"alphas",[]),c=o(t,"uv",[]),d=new a(this.scene,0,0,h,c,l,u,i,s);return void 0!==e&&(t.add=e),n(this.scene,d,t),d})},function(t,e,i){var n=i(241);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(148);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=this.pipeline;t.setPipeline(o,e);var a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(s.matrix),r?(a.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l)):(h.e-=s.scrollX*e.scrollFactorX,h.f-=s.scrollY*e.scrollFactorY,a.multiply(h,l));var u=e.frame.glTexture,c=e.vertices,d=e.uv,f=e.colors,p=e.alphas,g=c.length,v=Math.floor(.5*g);o.vertexCount+v>=o.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var y=o.vertexViewF32,m=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,w=0,b=e.tintFill,T=0;Ta.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;x?@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(900),s=i(17),r={Parse:i(899)};r=s(!1,r,n),t.exports=r},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(21);t.exports=function(t,e,i,s,r){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,h,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),t.setBlankTexture(!0)}},function(t,e,i){var n=i(2),s=i(2);n=i(903),s=i(902),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(426),EdgeZone:i(425),RandomZone:i(423)}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.emitters.list,o=r.length;if(0!==o){var a=t._tempMatrix1.copyFrom(n.matrix),h=t._tempMatrix2,l=t._tempMatrix3,u=t._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);a.multiply(u);var c=n.roundPixels,d=t.currentContext;d.save();for(var f=0;f0&&e.cropHeight>0&&(h.save(),h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var R=0;R0&&e.cropHeight>0&&h.restore(),h.restore()}}},function(t,e,i){var n=i(21);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(0!==a){var h=this.pipeline;t.setPipeline(h,e);var l=e.cropWidth>0||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,w=e._isTinted&&e.tintFill,b=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),S=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),A=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var C,_,M=0,P=0,E=0,k=0,L=e.letterSpacing,F=0,R=0,O=0,I=0,B=e.scrollX,D=e.scrollY,Y=e.fontData,z=Y.chars,X=Y.lineHeight,N=e.fontSize/Y.size,V=0,U=e._align,G=0,W=0;e.getTextBounds(!1);var H=e._bounds.lines;1===U?W=(H.longest-H.lengths[0])/2:2===U&&(W=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;Jv&&(r=v),o>y&&(o=y);var k=v+g.xAdvance,L=y+u;aC&&(C=M),MC&&(C=M),M>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e){t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(i){t.style[i+"user-select"]=e}),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},function(t,e,i){t.exports={Interpolation:i(265),Pool:i(22),Smoothing:i(133),TouchAction:i(938),UserSelect:i(937)}},function(t,e){t.exports=function(t){return t.height*t.originY}},function(t,e){t.exports=function(t){return t.width*t.originX}},function(t,e,i){t.exports={CenterOn:i(606),GetBottom:i(51),GetCenterX:i(93),GetCenterY:i(90),GetLeft:i(49),GetOffsetX:i(941),GetOffsetY:i(940),GetRight:i(47),GetTop:i(45),SetBottom:i(50),SetCenterX:i(92),SetCenterY:i(91),SetLeft:i(48),SetRight:i(46),SetTop:i(44)}},function(t,e,i){var n=i(47),s=i(45),r=i(50),o=i(46);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(45),r=i(50),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(93),s=i(45),r=i(50),o=i(92);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(45),r=i(48),o=i(44);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(90),s=i(47),r=i(91),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(51),s=i(47),r=i(50),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(45),r=i(46),o=i(44);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(90),s=i(49),r=i(91),o=i(46);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),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),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(51),s=i(47),r=i(46),o=i(44);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(51),s=i(49),r=i(48),o=i(44);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(51),s=i(93),r=i(92),o=i(44);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){t.exports={BottomCenter:i(954),BottomLeft:i(953),BottomRight:i(952),LeftBottom:i(951),LeftCenter:i(950),LeftTop:i(949),RightBottom:i(948),RightCenter:i(947),RightTop:i(946),TopCenter:i(945),TopLeft:i(944),TopRight:i(943)}},function(t,e,i){t.exports={BottomCenter:i(610),BottomLeft:i(609),BottomRight:i(608),Center:i(607),LeftCenter:i(605),QuickSet:i(611),RightCenter:i(604),TopCenter:i(603),TopLeft:i(602),TopRight:i(601)}},function(t,e,i){var n=i(302),s=i(17),r={In:i(956),To:i(955)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(957),Bounds:i(942),Canvas:i(939),Color:i(520),Masks:i(516)}},function(t,e,i){var n=i(0),s=i(4),r=new n({initialize:function(t,e){this.active=!1,this.p0=new s(t,e)},getPoint:function(t,e){return void 0===e&&(e=new s),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},function(t,e,i){var n=i(0),s=i(529),r=i(527),o=i(9),a=i(526),h=i(959),l=i(525),u=i(11),c=i(523),d=i(4),f=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 this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?(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<.1&&(e.zoom=.1))}},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){var n=i(0),s=i(3),r=new n({initialize:function(t){this.camera=s(t,"camera",null),this.left=s(t,"left",null),this.right=s(t,"right",null),this.up=s(t,"up",null),this.down=s(t,"down",null),this.zoomIn=s(t,"zoomIn",null),this.zoomOut=s(t,"zoomOut",null),this.zoomSpeed=s(t,"zoomSpeed",.01),this.speedX=0,this.speedY=0;var e=s(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=s(t,"speed.x",0),this.speedY=s(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<.1&&(e.zoom=.1)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed)}},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={FixedKeyControl:i(971),SmoothedKeyControl:i(970)}},function(t,e,i){t.exports={Controls:i(972),Scene2D:i(578),Sprite3D:i(969)}},function(t,e,i){var n=i(40);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s1)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?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),d.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),d.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",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.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),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&&p.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&&p.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 p.add(this.localWorld,o),o},add:function(t){return p.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return o.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return o.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},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;sf.friction*f.frictionStatic*O*i&&(B=L,I=o.clamp(f.friction*F*i,-B,B));var D=r.cross(A,y),Y=r.cross(C,y),z=w/(g.inverseMass+v.inverseMass+g.inverseInertia*D*D+v.inverseInertia*Y*Y);if(R*=z,I*=z,E<0&&E*E>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+R,0),R=T.normalImpulse-X}if(k*k>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+I,-B,B),I=T.tangentImpulse-N}s.x=y.x*R+m.x*I,s.y=y.y*R+m.y*I,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,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(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(622),r=i(42);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;a1e3&&h.push(r);for(r=0;rv.bounds.max.x||w.bounds.max.yv.bounds.max.y)){var b=e(i,w);if(!w.region||b.id!==w.region.id||r){x.broadphaseTests+=1,w.region&&!r||(w.region=b);var T=t(b,w.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=b.startCol&&d<=b.endCol&&f>=b.startRow&&f<=b.endRow,A=d>=w.region.startCol&&d<=w.region.endCol&&f>=w.region.startRow&&f<=w.region.endRow;!S&&A&&A&&p&&u(i,p,w),(w.region===b||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,w))}w.region=b,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=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 i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=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(687),r=i(42);n.name="matter-js",n.version="0.13.1",n.uses=[],n.used=[],n.use=function(){s.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(n,t,e)}},function(t,e,i){var n=i(306),s=i(0),r=i(623),o=i(15),a=i(1),h=i(294),l=i(35),u=i(4),c=new s({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,s,r,h){o.call(this,t.scene,"Image"),this.anims=new n(this),this.setTexture(s,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=c},function(t,e,i){var n=i(0),s=i(623),r=i(15),o=i(1),a=i(69),h=i(294),l=i(4),u=new n({Extends:a,Mixins:[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity,h],initialize:function(t,e,i,n,s,a){r.call(this,t.scene,"Image"),this.setTexture(n,s),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline("TextureTintPipeline")}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(229),r=i(303),o=i(42),a=i(74),h=i(174);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=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;l=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,A3&&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},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);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)}};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))r.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e1)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 w=Math.floor((e+v)/f);if((l>0||u===w||w<0||w>=p)&&(w=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,w,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 b=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+b)/f);var C=Math.floor((i+b)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));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-b+T;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),w=g/x,b=-p/x,T=y*w+m*b,S=w*T,A=b*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:w,ny:b},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(337),r=i(1081),o=i(336),a=i(1080),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(688),s={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.13.1",silent:!0,install:function(t){t.after("Engine.update",function(){s.Engine.update(this)})},Engine:{update:function(t){for(var e=t.world,i=n.Composite.allBodies(e),r=n.Composite.allComposites(e),o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y0)for(var a=s+1;a1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n1?1:0;n0))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){t.exports=function(t,e,i,n){var s=e.pos.x+e.size.x-i.pos.x;if(n){var r=e===n?i:e;n.vel.x=-n.vel.x*n.bounciness+r.vel.x;var o=t.collisionMap.trace(n.pos.x,n.pos.y,n===e?-s:s,0,n.size.x,n.size.y);n.pos.x=o.pos.x}else{var a=(e.vel.x-i.vel.x)/2;e.vel.x=-a,i.vel.x=a;var h=t.collisionMap.trace(e.pos.x,e.pos.y,-s/2,0,e.size.x,e.size.y);e.pos.x=Math.floor(h.pos.x);var l=t.collisionMap.trace(i.pos.x,i.pos.y,s/2,0,i.size.x,i.size.y);i.pos.x=Math.ceil(l.pos.x)}}},function(t,e,i){var n=i(337),s=i(1064),r=i(1063);t.exports=function(t,e,i){var o=null;e.collides===n.LITE||i.collides===n.FIXED?o=e:i.collides!==n.LITE&&e.collides!==n.FIXED||(o=i),e.last.x+e.size.x>i.last.x&&e.last.xi.last.y&&e.last.y0&&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&&o0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e,i){t.exports={Body:i(1038),COLLIDES:i(337),CollisionMap:i(1037),Factory:i(1036),Image:i(1034),ImpactBody:i(1035),ImpactPhysics:i(1066),Sprite:i(1033),TYPE:i(336),World:i(1032)}},function(t,e,i){t.exports={Arcade:i(715),Impact:i(1082),Matter:i(1062)}},function(t,e,i){(function(e){i(621);var n=i(23),s=i(17),r={Actions:i(612),Animation:i(580),Cache:i(579),Cameras:i(973),Class:i(0),Create:i(967),Curves:i(961),Data:i(522),Display:i(958),DOM:i(929),Events:i(514),FBInstant:i(305),Game:i(507),GameObjects:i(928),Geom:i(403),Input:i(388),Loader:i(769),Math:i(754),Physics:i(1083),Plugins:i(334),Renderer:i(685),Scene:i(201),Scenes:i(332),Sound:i(330),Structs:i(329),Textures:i(328),Tilemaps:i(680),Time:i(312),Tweens:i(310),Utils:i(631)};r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(223))}])}); \ No newline at end of file