From 75b250ba5b5c7d0267ff8f4b91afd1da4f0d92bf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 19 Apr 2018 14:45:54 +0100 Subject: [PATCH] 3.6.0 Release --- CHANGELOG.md | 2 +- README.md | 103 +- dist/phaser-arcade-physics.js | 2219 ++++++++++++++----------- dist/phaser-arcade-physics.min.js | 2 +- dist/phaser-core.js | 943 ++++++----- dist/phaser-core.min.js | 2 +- dist/phaser.js | 2521 ++++++++++++++++------------- dist/phaser.min.js | 2 +- 8 files changed, 3196 insertions(+), 2598 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1bd7b781..fff933a23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## Version 3.5.2 - Kirito - 18th April 2018 +## Version 3.6.0 - Asuna - 19th April 2018 ### New Features diff --git a/README.md b/README.md index a4d17fc34..59c809f5d 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Grab the source and join the fun!
-> 16th April 2018 +> 19th April 2018 -**Updated:** We've just released Phaser 3.5. This fixes a few issues and adds in new features like more unified and flexible Camera Effects and powerful new Scene Transitions. It builds upon the work released last week in Phaser 3.4, which was a huge update, bringing lots of fixes and enhancements from the core team and wider community. As always, please check out the [Change Log](#changelog) for comprehensive details about what recent versions contain. +**Updated:** We've just released Phaser 3.6.0. This release introduces the full version of Containers, updates more documentation and carries on the update and bug fixing work. It comes shortly after the 3.5 and 3.4 releases which unified the Camera Effects and introduced powerful new Scene Transitions. We appreciate that our current release velocity is extremely high, often with several versions per week, so as always, please check out the [Change Log](#changelog) for comprehensive details about what recent versions contain. After 1.5 years in the making, tens of thousands of lines of code, hundreds of examples and countless hours of relentless work: Phaser 3 is finally out. It has been a real labor of love and then some! @@ -96,13 +96,13 @@ npm install phaser [Phaser is on jsDelivr](https://www.jsdelivr.com/projects/phaser) which is a "super-fast CDN for developers". Include the following in your html: ```html - + ``` or the minified version: ```html - + ``` ### API Documentation @@ -260,88 +260,37 @@ You can then run `webpack` to create a development build in the `build` folder w ![Change Log](https://phaser.io/images/github/div-change-log.png "Change Log") -## Version 3.5.1 - Kirito - 17th April 2018 +## Version 3.6.0 - Asuna - 19th April 2018 + +### New Features + +* Containers are now fully available! We have removed the beta warning and fixed the way in which they work with Cameras, input and scroll factors. They are also fully documented, so please see their docs and examples for use. +* Group.getLast will return the last member in the Group matching the search criteria. +* Group.getFirstNth will return the nth member in the Group, scanning from top to bottom, that matches the search criteria. +* Group.getLastNth will return the nth member in the Group, scanning in reverse, that matches the search criteria. +* Group.remove has a new optional argument `destroyChild` that will call `destroy` on the child after removing it. +* Group.clear has a new optional argument `destroyChild` that will call `destroy` on all children in the Group after removing them. ### Updates -* The change made in 3.5.0 with how the Scene systems lifecycle is handled has been tweaked. When a Scene is instantiated it will now emit a boot event, as before, and Systems that need it will listen for this event and set-up their internal properties as required. They'll also do the same under the 'start' event, allowing them to restart properly once shutdown. In 3.5 if a Scene was previously not launched or started you wouldn't be able to access all of its internal systems fully, but in 3.5.1 you can. +* Impact Physics Game Objects have changed `setLite` to `setLiteCollision`. +* Impact Physics Game Objects have changed `setPassive` to `setPassiveCollision`. +* Impact Physics Game Objects have changed `setFixed` to `setFixedCollision`. +* Impact Physics Game Objects have changed `setActive` to `setActiveCollision`, previously the `setActive` collision method was overwriting the Game Objects `setActive` method, hence the renaming. +* The modifications made to the RTree class in Phaser 3.4.0 to avoid CSP policy violations caused a significant performance hit once a substantial number of bodies were involved. We have recoded how the class deals with its accessor formats and returned to 3.3 level performance while still maintaining CSP policy adherence. Fix #3594 (thanks @16patsle) +* The Retro Font namespace has changed to `Phaser.GameObjects.RetroFont`. Previously, you would access the parser and constants via `BitmapText`, i.e.: `Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET6`. This has now changed to its own namespace, so the same line would be: `Phaser.GameObjects.RetroFont.TEXT_SET6`. The Parser is available via `Phaser.GameObjects.RetroFont.Parse`. This keeps things cleaner and also unbinds RetroFont from BitmapText, allowing you to cleanly exclude it from your build should you wish. All examples have been updated to reflect this. +* If using the `removeFromScene` option in Group.remove or Group.clear it will remove the child/ren from the Scene to which they belong, not the Scene the Group belongs to. ### Bug Fixes -* LoaderPlugin.destroy would try and remove an incorrect event listener. -* TileSprites would try to call `deleteTexture` on both renderers, but it's only available in WebGL (thanks @jmcriat) -* Using a geometry mask stopped working in WebGL. Fix #3582 (thanks @rafelsanso) -* The particle emitter incorrectly adjusted the vertex count, causing WebGL rendering issues. Fix #3583 (thanks @murteira) +* Fixed a bug that caused data to not be passed to another Scene if you used a transition to start it. Fix #3586 (thanks @willywu) +* Group.getHandler would return any member of the Group, regardless of the state, causing pools to remain fixed at once member. Fix #3592 (thanks @samme) ### Examples, Documentation and TypeScript My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@NemoStein @gabegordon @gazpachu @samme @cristlee @melissaelopez @dazigemm @tgrajewski - -## Version 3.5.0 - Kirito - 16th April 2018 - -### Changes to Cameras - -* The Camera class and all Camera effects are now fully covered by 100% complete JS Docs. -* All Camera effects have been recoded from scratch. They now follow a unified effects structure and each effect is encapsulated in its own class found in the 'effects' folder. Currently there are Fade, Flash and Shake effects. -* The new effects classes are accessed via the Camera properties `fadeEffect`, `flashEffect` and `shakeEffect`. You can still use the friendly Camera level methods: `shake`, `fade` and `flash`. -* The new structure means you can replace the default effects with your own by simply overwriting the properties with your own class. -* The effects now work properly under any combination. For example, you can fade out then in, or in then out, and still flash or shake while a fade is happening. The renderers now properly stack the effects in order to allow this. -* All of the effect related Camera properties (like `_fadeAlpha`) have been removed. If you need access to these values you can get it much more cleanly via the camera effects classes themselves. They were always private anyway, but we know some of you needed to modify them, so have been doing so from your code. This code will now need updating. -* Removed Camera.clearBeforeRender property as it was never used internally. This setting can be enabled on a Game-wide basis. -* Camera now extends the Event Emitter, allowing it to emit events. -* Camera.cullHitTest has been removed. It was never used internally and duplicates the code in `Camera.cull`. -* The `callback` property of the Camera effects methods has changed purpose. It is no longer an `onComplete` callback, but is now an `onUpdate` callback. It is invoked every frame for the duration of the effect. See the docs for argument details. -* Camera effects now dispatch events. They dispatch 'start' and 'complete' events, which can be used to handle any actions you may previously have been doing in the callback. See the effects docs and examples for the event names and arguments. -* The Camera Shake effect now lets you specify a different intensities for the x and y dimensions. -* You can track the progress of all events via the `progress` property on the effect instance, allowing you to sync effect duration with other in-game events. - -### New Feature: Scene Transitions - -There is a new method available in the ScenePlugin, available via: `this.scene.transition` which allows you to transition from one Scene to another over the duration specified. The method takes a configuration object which lets you control various aspects of the transition, from moving the Scenes around the display list, to specifying an onUpdate callback. - -The calling Scene can be sent to sleep, stopped or removed entirely from the Scene Manager at the end of the transition, and you can even lock down input events in both Scenes while the transition is happening, if required. There are various events dispatched from both the calling and target Scene, which combined with the onUpdate callback give you the flexibility to create some truly impressive transition effects both into and out of Scenes. - -Please see the complete JSDocs for the ScenePlugin for more details, as well as the new examples in the Phaser 3 Labs. - -### More New Features - -* GameObject.ignoreDestroy allows you to control if a Game Object is destroyed or not. Setting the flag will tell it to ignore destroy requests from Groups, Containers and even the Scene itself. See the docs for more details. -* The Scene Input Plugin has a new property `enabled` which allows you to enable or disable input processing on per Scene basis. - -### Bug Fixes - -* MatterEvents.off() would cause a TypeError if you destroyed the Matter world. Fix #3562 (thanks @pixelscripter) -* DynamicBitmapText was missing the `letterSpacing` property, causing it to only render the first character in WebGL (thanks @Antriel) -* The Animation component didn't properly check for the animation state in its update, causing pause / resume to fail. Fix #3556 (thanks @Antriel @siolfyr) -* The Scene Manager would never reach an `isBooted` state if you didn't add any Scenes into the Game Config. Fix #3553 (thanks @rgk) -* Fixed issue in HTMLAudioSound where `mute` would get into a recursive loop. -* Every RenderTexture would draw the same content due to a mis-use of the CanvasPool (this also impacted TileSprites). Fix #3555 (thanks @kuoruan) -* Group.add and Group.addMultiple now respect the Group.maxSize property, stopping you from over-populating a Group (thanks @samme) -* When using HTML5 Audio, sound manager now tries to unlock audio after every scene loads, instead of only after first one. Fix #3309 (thanks @pavle-goloskokovic) -* Group.createMultiple would insert null entries if the Group became full during the operation, causing errors later. Now it stops creating objects if the Group becomes full (thanks @samme) -* Group.remove didn't check if the passed Game Object was already a member of the group and would call `removeCallback` and (if specified) `destroy` in any case. Now it does nothing if the Game Object isn't a member of the group (thanks @samme) -* If a Group size exceeded `maxSize` (which can happen if you reduce maxSize beneath the current size), `isFull` would return false and the group could continue to grow. Now `isFull` returns true in that case (thanks @samme) -* Camera.fadeIn following a fadeOut wouldn't work, but is now fixed as a result of the Camera effects rewrite. Fix #3527 (thanks @Jerenaux) -* Particle Emitters with large volumes of particles would throw the error `GL_INVALID_OPERATION: Vertex buffer is not big enough for the draw call` in WebGL. -* Fixed issue with Game.destroy not working correctly under WebGL since 3.4. Fix #3569 (thanks @Huararanga) - -### Updates - -* Removed the following properties from BaseSound as they are no longer required. Each class that extends BaseSound implements them directly as getters: `mute`, `loop`, `seek` and `volume`. -* The Device.OS test to see if Phaser is running under node.js has been strengthened to support node-like environments like Vue (thanks @Chumper) -* Every Plugin has been updated to correctly follow the same flow through the Scene lifecycle. Instead of listening for the Scene 'boot' event, which is only dispatched once (when the Scene is first created), they will now listen for the Scene 'start' event, which occurs every time the Scene is started. All plugins now consistently follow the same Shutdown and Destroy patterns too, meaning they tidy-up after themselves on a shutdown, not just a destroy. Overall, this change means that there should be less issues when returning to previously closed Scenes, as the plugins will restart themselves properly. -* When shutting down a Scene all Game Objects that belong to the scene will now automatically destroy themselves. They would previously be removed from the display and update lists, but the objects themselves didn't self-destruct. You can control this on a per-object basis with the `ignoreDestroy` property. -* A Matter Mouse Spring will disable debug draw of its constraint by default (you can override it by passing in your own config) -* The RandomDataGenerator class is now exposed under Phaser.Math should you wish to instantiate it yourself. Fix #3576 (thanks @wtravO) -* Refined the Game.destroy sequence, so it will now only destroy the game at the start of the next frame, not during processing. - -### Examples, Documentation and TypeScript - -My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: - -@samme @Antriel +@Fabadiculous @Antriel Please see the complete [Change Log](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md) for previous releases. @@ -374,8 +323,8 @@ All rights reserved. "Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata -[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.5.1/phaser.js -[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.5.1/phaser.min.js +[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.6.0/phaser.js +[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.6.0/phaser.min.js [clone-http]: https://github.com/photonstorm/phaser.git [clone-ssh]: git@github.com:photonstorm/phaser.git [clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index 949119c5f..4d5c62f4b 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -76,7 +76,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1008); +/******/ return __webpack_require__(__webpack_require__.s = 1010); /******/ }) /************************************************************************/ /******/ ([ @@ -931,7 +931,7 @@ var Class = __webpack_require__(0); /** * @classdesc - * [description] + * Defines a Point in 2D space, with an x and y component. * * @class Point * @memberOf Phaser.Geom @@ -972,7 +972,7 @@ var Point = new Class({ }, /** - * [description] + * Set the x and y coordinates of the point to the given values. * * @method Phaser.Geom.Point#setTo * @since 3.0.0 @@ -3171,6 +3171,105 @@ module.exports = MATH_CONST; /***/ }), /* 16 */ +/***/ (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 IsPlainObject = __webpack_require__(292); + +// @param {boolean} deep - Perform a deep copy? +// @param {object} target - The target object to copy to. +// @return {object} The extended object. + +/** + * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ + * + * @function Phaser.Utils.Object.Extend + * @since 3.0.0 + * + * @return {object} [description] + */ +var Extend = function () +{ + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') + { + deep = target; + target = arguments[1] || {}; + + // skip the boolean and the target + i = 2; + } + + // extend Phaser if only one argument is passed + if (length === i) + { + target = this; + --i; + } + + for (; i < length; i++) + { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) + { + // Extend the base object + for (name in options) + { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) + { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) + { + if (copyIsArray) + { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } + else + { + clone = src && IsPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = Extend(deep, clone, copy); + + // Don't bring in undefined values + } + else if (copy !== undefined) + { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +module.exports = Extend; + + +/***/ }), +/* 17 */ /***/ (function(module, exports) { /** @@ -3348,105 +3447,6 @@ var FILE_CONST = { module.exports = FILE_CONST; -/***/ }), -/* 17 */ -/***/ (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 IsPlainObject = __webpack_require__(292); - -// @param {boolean} deep - Perform a deep copy? -// @param {object} target - The target object to copy to. -// @return {object} The extended object. - -/** - * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ - * - * @function Phaser.Utils.Object.Extend - * @since 3.0.0 - * - * @return {object} [description] - */ -var Extend = function () -{ - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if (typeof target === 'boolean') - { - deep = target; - target = arguments[1] || {}; - - // skip the boolean and the target - i = 2; - } - - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } - - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) - { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; - - // Prevent never-ending loop - if (target === copy) - { - continue; - } - - // Recurse if we're merging plain objects or arrays - if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) - { - if (copyIsArray) - { - copyIsArray = false; - clone = src && Array.isArray(src) ? src : []; - } - else - { - clone = src && IsPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[name] = Extend(deep, clone, copy); - - // Don't bring in undefined values - } - else if (copy !== undefined) - { - target[name] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -module.exports = Extend; - - /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { @@ -3458,7 +3458,7 @@ module.exports = Extend; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var GetFastValue = __webpack_require__(2); var GetURL = __webpack_require__(117); var MergeXHRSettings = __webpack_require__(116); @@ -3870,7 +3870,7 @@ var File = new Class({ * * @method Phaser.Loader.File.createObjectURL * @static - * @param {Image} image - Image object which 'src' attribute should be set to object URL. + * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL. * @param {Blob} blob - A Blob object to create an object URL for. * @param {string} defaultType - Default mime type used if blob type is not available. */ @@ -3902,7 +3902,7 @@ File.createObjectURL = function (image, blob, defaultType) * * @method Phaser.Loader.File.revokeObjectURL * @static - * @param {Image} image - Image object which 'src' attribute should be revoked. + * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked. */ File.revokeObjectURL = function (image) { @@ -3941,7 +3941,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.5.1', + VERSION: '3.6.0', BlendModes: __webpack_require__(48), @@ -5577,6 +5577,7 @@ var Sprite = new Class({ * [description] * * @method Phaser.GameObjects.Sprite#preUpdate + * @protected * @since 3.0.0 * * @param {number} time - [description] @@ -5834,7 +5835,7 @@ module.exports = CalculateFacesWithin; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -6195,7 +6196,7 @@ module.exports = GetBottom; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -9889,7 +9890,7 @@ module.exports = RotateMatrix; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var NOOP = __webpack_require__(3); /** @@ -12916,7 +12917,7 @@ var Curve = new Class({ * @method Phaser.Curves.Curve#draw * @since 3.0.0 * - * @generic {Phaser.GameObjects.Graphics} G - [out,$return] + * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return] * * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn. * @param {integer} [pointsTotal=32] - The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance. @@ -15628,10 +15629,10 @@ var Vector2 = __webpack_require__(6); * @constructor * @since 3.0.0 * - * @param {number} [x1=0] - [description] - * @param {number} [y1=0] - [description] - * @param {number} [x2=0] - [description] - * @param {number} [y2=0] - [description] + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. */ var Line = new Class({ @@ -15645,7 +15646,7 @@ var Line = new Class({ if (y2 === undefined) { y2 = 0; } /** - * [description] + * The x coordinate of the lines starting point. * * @name Phaser.Geom.Line#x1 * @type {number} @@ -15654,7 +15655,7 @@ var Line = new Class({ this.x1 = x1; /** - * [description] + * The y coordinate of the lines starting point. * * @name Phaser.Geom.Line#y1 * @type {number} @@ -15663,7 +15664,7 @@ var Line = new Class({ this.y1 = y1; /** - * [description] + * The x coordinate of the lines ending point. * * @name Phaser.Geom.Line#x2 * @type {number} @@ -15672,7 +15673,7 @@ var Line = new Class({ this.x2 = x2; /** - * [description] + * The y coordinate of the lines ending point. * * @name Phaser.Geom.Line#y2 * @type {number} @@ -15692,7 +15693,7 @@ var Line = new Class({ * @param {float} position - [description] * @param {(Phaser.Geom.Point|object)} [output] - [description] * - * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse. + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. */ getPoint: function (position, output) { @@ -15719,16 +15720,16 @@ var Line = new Class({ }, /** - * [description] + * Get a random Point on the Line. * * @method Phaser.Geom.Line#getRandomPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [point,$return] * - * @param {(Phaser.Geom.Point|object)} [point] - [description] + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A random Point on the Line. */ getRandomPoint: function (point) { @@ -15736,15 +15737,15 @@ var Line = new Class({ }, /** - * [description] + * Set new coordinates for the line endpoints. * * @method Phaser.Geom.Line#setTo * @since 3.0.0 * - * @param {number} [x1=0] - [description] - * @param {number} [y1=0] - [description] - * @param {number} [x2=0] - [description] - * @param {number} [y2=0] - [description] + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. * * @return {Phaser.Geom.Line} This Line object. */ @@ -18321,7 +18322,7 @@ var Text = new Class({ * [description] * * @name Phaser.GameObjects.Text#style - * @type {Phaser.GameObjects.Components.TextStyle} + * @type {Phaser.GameObjects.Text.TextStyle} * @since 3.0.0 */ this.style = new TextStyle(this, style); @@ -19279,7 +19280,7 @@ var Text = new Class({ * @method Phaser.GameObjects.Text#toJSON * @since 3.0.0 * - * @return {object} [description] + * @return {JSONGameObject} A JSON representation of the Game Object. */ toJSON: function () { @@ -19922,7 +19923,7 @@ var Group = new Class({ }, /** - * Removes a member of this group. + * Removes a member of this Group and optionally removes it from the Scene and / or destroys it. * * Calls {@link Phaser.GameObjects.Group#removeCallback}. * @@ -19930,13 +19931,15 @@ var Group = new Class({ * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove. - * @param {boolean} [removeFromScene=false] - Also remove the group member from the scene. + * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to. + * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member. * * @return {Phaser.GameObjects.Group} This Group object. */ - remove: function (child, removeFromScene) + remove: function (child, removeFromScene, destroyChild) { if (removeFromScene === undefined) { removeFromScene = false; } + if (destroyChild === undefined) { destroyChild = false; } if (!this.children.contains(child)) { @@ -19950,36 +19953,42 @@ var Group = new Class({ this.removeCallback.call(this, child); } - if (removeFromScene) + child.off('destroy', this.remove, this); + + if (destroyChild) { - this.scene.sys.displayList.remove(child); + child.destroy(); + } + else if (removeFromScene) + { + child.scene.sys.displayList.remove(child); if (child.preUpdate) { - this.scene.sys.updateList.remove(child); + child.scene.sys.updateList.remove(child); } } - child.off('destroy', this.remove, this); - return this; }, /** - * Removes all members of this group. + * Removes all members of this Group and optionally removes them from the Scene and / or destroys them. * * Does not call {@link Phaser.GameObjects.Group#removeCallback}. * * @method Phaser.GameObjects.Group#clear * @since 3.0.0 * - * @param {boolean} [removeFromScene=false] - Also remove each group member from the scene. + * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene. + * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members. * * @return {Phaser.GameObjects.Group} This group. */ - clear: function (removeFromScene) + clear: function (removeFromScene, destroyChild) { if (removeFromScene === undefined) { removeFromScene = false; } + if (destroyChild === undefined) { destroyChild = false; } var children = this.children; @@ -19989,13 +19998,17 @@ var Group = new Class({ gameObject.off('destroy', this.remove, this); - if (removeFromScene) + if (destroyChild) { - this.scene.sys.displayList.remove(gameObject); + gameObject.destroy(); + } + else if (removeFromScene) + { + gameObject.scene.sys.displayList.remove(gameObject); if (gameObject.preUpdate) { - this.scene.sys.updateList.remove(gameObject); + gameObject.scene.sys.updateList.remove(gameObject); } } } @@ -20047,7 +20060,7 @@ var Group = new Class({ }, /** - * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, * assigns `x` and `y`, and returns the member. * * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. @@ -20067,33 +20080,178 @@ var Group = new Class({ * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. */ getFirst: function (state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(true, 1, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getFirstNth + * @since 3.6.0 + * + * @param {integer} nth - The nth matching Group member to search for. + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getFirstNth: function (nth, state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(true, nth, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getLast + * @since 3.6.0 + * + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getLast: function (state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(false, 1, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getLastNth + * @since 3.6.0 + * + * @param {integer} nth - The nth matching Group member to search for. + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getLastNth: function (nth, state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(false, nth, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getHandler + * @private + * @since 3.6.0 + * + * @param {boolean} forwards - Search front to back or back to front? + * @param {integer} nth - Stop matching after nth successful matches. + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getHandler: function (forwards, nth, state, createIfNull, x, y, key, frame, visible) { if (state === undefined) { state = false; } if (createIfNull === undefined) { createIfNull = false; } var gameObject; + var i; + var total = 0; var children = this.children.entries; - for (var i = 0; i < children.length; i++) + if (forwards) { - gameObject = children[i]; - - if (gameObject.active === state) + for (i = 0; i < children.length; i++) { - if (typeof(x) === 'number') - { - gameObject.x = x; - } + gameObject = children[i]; - if (typeof(y) === 'number') + if (gameObject.active === state) { - gameObject.y = y; - } + total++; - return gameObject; + if (total === nth) + { + break; + } + } + else + { + gameObject = null; + } } } + else + { + for (i = children.length - 1; i >= 0; i--) + { + gameObject = children[i]; + + if (gameObject.active === state) + { + total++; + + if (total === nth) + { + break; + } + } + else + { + gameObject = null; + } + } + } + + if (gameObject) + { + if (typeof(x) === 'number') + { + gameObject.x = x; + } + + if (typeof(y) === 'number') + { + gameObject.y = y; + } + + return gameObject; + } // Got this far? We need to create or bail if (createIfNull) @@ -22044,7 +22202,7 @@ var Settings = __webpack_require__(178); * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene that owns this Systems instance. - * @param {(string|SettingsConfig)} config - Scene specific configuration settings. + * @param {(string|Phaser.Scenes.Settings.Config)} config - Scene specific configuration settings. */ var Systems = new Class({ @@ -22074,7 +22232,7 @@ var Systems = new Class({ * [description] * * @name Phaser.Scenes.Systems#config - * @type {(string|SettingsConfig)} + * @type {(string|Phaser.Scenes.Settings.Config)} * @since 3.0.0 */ this.config = config; @@ -22083,7 +22241,7 @@ var Systems = new Class({ * [description] * * @name Phaser.Scenes.Systems#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.0.0 */ this.settings = Settings.create(config); @@ -24474,14 +24632,13 @@ var Camera = new Class({ */ /** - * Destroys this Camera instance. + * 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 - * @protected * @since 3.0.0 */ destroy: function () @@ -24889,7 +25046,7 @@ module.exports = Map; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var XHRSettings = __webpack_require__(88); /** @@ -25068,7 +25225,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @classdesc @@ -25666,7 +25823,7 @@ var WebGLPipeline = __webpack_require__(80); * * @class TextureTintPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -25726,7 +25883,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -25735,7 +25892,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#vertexViewU32 + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32 * @type {Uint32Array} * @since 3.0.0 */ @@ -25744,7 +25901,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#maxQuads + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#maxQuads * @type {integer} * @default 2000 * @since 3.0.0 @@ -25754,7 +25911,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#batches + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batches * @type {array} * @since 3.1.0 */ @@ -25766,13 +25923,13 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#setTexture2D + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D * @since 3.1.0 * * @param {WebGLTexture} texture - [description] * @param {integer} textureUnit - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ setTexture2D: function (texture, unit) { @@ -25817,7 +25974,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#pushBatch + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#pushBatch * @since 3.1.0 */ pushBatch: function () @@ -25834,10 +25991,10 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#flush + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush * @since 3.1.0 * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} This Pipeline. + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This Pipeline. */ flush: function () { @@ -25934,14 +26091,15 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ onBind: function () { WebGLPipeline.prototype.onBind.call(this); + this.mvpUpdate(); if (this.batches.length === 0) @@ -25955,14 +26113,14 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ resize: function (width, height, resolution) { @@ -25974,11 +26132,12 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawStaticTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] */ drawStaticTilemapLayer: function (tilemap) { @@ -26009,7 +26168,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] @@ -26049,29 +26208,16 @@ var TextureTintPipeline = new Class({ var vertexCapacity = this.vertexCapacity; var texture = emitterManager.defaultFrame.source.glTexture; var pca, pcb, pcc, pcd, pce, pcf; + var pma, pmb, pmc, pmd, pme, pmf; if (parentMatrix) { - var pma = parentMatrix[0]; - var pmb = parentMatrix[1]; - var pmc = parentMatrix[2]; - var pmd = parentMatrix[3]; - var pme = parentMatrix[4]; - var pmf = parentMatrix[5]; - - pca = cma * pma + cmb * pmc; - pcb = cma * pmb + cmb * pmd; - pcc = cmc * pma + cmd * pmc; - pcd = cmc * pmb + cmd * pmd; - pce = cme * pma + cmf * pmc + pme; - pcf = cme * pmb + cmf * pmd + pmf; - - cma = pca; - cmb = pcb; - cmc = pcc; - cmd = pcd; - cme = pce; - cmf = pcf; + pma = parentMatrix[0]; + pmb = parentMatrix[1]; + pmc = parentMatrix[2]; + pmd = parentMatrix[3]; + pme = parentMatrix[4]; + pmf = parentMatrix[5]; } this.setTexture2D(texture, 0); @@ -26086,6 +26232,31 @@ var TextureTintPipeline = new Class({ var scrollX = cameraScrollX * emitter.scrollFactorX; var scrollY = cameraScrollY * emitter.scrollFactorY; + if (parentMatrix) + { + var cse = -scrollX; + var csf = -scrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + pca = pma * cma + pmb * cmc; + pcb = pma * cmb + pmb * cmd; + pcc = pmc * cma + pmd * cmc; + pcd = pmc * cmb + pmd * cmd; + pce = pme * cma + pmf * cmc + pse; + pcf = pme * cmb + pmf * cmd + psf; + + cma = pca; + cmb = pcb; + cmc = pcc; + cmd = pcd; + cme = pce; + cmf = pcf; + + scrollX = 0.0; + scrollY = 0.0; + } + + if (!emitter.visible || aliveLength === 0) { continue; @@ -26122,11 +26293,11 @@ var TextureTintPipeline = new Class({ var sr = sin(particle.rotation); var cr = cos(particle.rotation); var sra = cr * particle.scaleX; - var srb = -sr * particle.scaleX; - var src = sr * particle.scaleY; + var srb = sr * particle.scaleX; + var src = -sr * particle.scaleY; var srd = cr * particle.scaleY; - var sre = particle.x - scrollX * particle.scrollFactorX; - var srf = particle.y - scrollY * particle.scrollFactorY; + var sre = particle.x - scrollX; + var srf = particle.y - scrollY; var mva = sra * cma + srb * cmc; var mvb = sra * cmb + srb * cmd; var mvc = src * cma + srd * cmc; @@ -26213,7 +26384,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] @@ -26248,8 +26419,6 @@ var TextureTintPipeline = new Class({ var cameraScrollY = camera.scrollY * blitter.scrollFactorY; var batchCount = Math.ceil(length / this.maxQuads); var batchOffset = 0; - var blitterX = blitter.x - cameraScrollX; - var blitterY = blitter.y - cameraScrollY; if (parentMatrix) { @@ -26259,12 +26428,16 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = a * pma + b * pmc; - var pcb = a * pmb + b * pmd; - var pcc = c * pma + d * pmc; - var pcd = c * pmb + d * pmd; - var pce = e * pma + f * pmc + pme; - var pcf = e * pmb + f * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * a + csf * c + e; + var psf = cse * b + csf * d + f; + var pca = pma * a + pmb * c; + var pcb = pma * b + pmb * d; + var pcc = pmc * a + pmd * c; + var pcd = pmc * b + pmd * d; + var pce = pme * a + pmf * c + pse; + var pcf = pme * b + pmf * d + psf; a = pca; b = pcb; @@ -26272,8 +26445,14 @@ var TextureTintPipeline = new Class({ d = pcd; e = pce; f = pcf; + + cameraScrollX = 0.0; + cameraScrollY = 0.0; } + var blitterX = blitter.x - cameraScrollX; + var blitterY = blitter.y - cameraScrollY; + for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(length, this.maxQuads); @@ -26365,7 +26544,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] @@ -26405,11 +26584,9 @@ var TextureTintPipeline = new Class({ var y = -sprite.displayOriginY + frame.y + ((frame.height) * (flipY ? 1.0 : 0.0)); var xw = (roundPixels ? (x|0) : x) + width; var yh = (roundPixels ? (y|0) : y) + height; - var translateX = sprite.x - camera.scrollX * sprite.scrollFactorX; - var translateY = sprite.y - camera.scrollY * sprite.scrollFactorY; var scaleX = sprite.scaleX; var scaleY = sprite.scaleY; - var rotation = -sprite.rotation; + var rotation = sprite.rotation; var alphaTL = sprite._alphaTL; var alphaTR = sprite._alphaTR; var alphaBL = sprite._alphaBL; @@ -26421,11 +26598,11 @@ var TextureTintPipeline = new Class({ var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; - var sre = translateX; - var srf = translateY; + var sre = sprite.x; + var srf = sprite.y; var cma = cameraMatrix[0]; var cmb = cameraMatrix[1]; var cmc = cameraMatrix[2]; @@ -26442,12 +26619,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * sprite.scrollFactorX; + var csf = -camera.scrollY * sprite.scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -26457,6 +26639,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * sprite.scrollFactorX; + srf -= camera.scrollY * sprite.scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -26532,7 +26717,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] @@ -26569,16 +26754,16 @@ var TextureTintPipeline = new Class({ var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; - var translateX = mesh.x - camera.scrollX * mesh.scrollFactorX; - var translateY = mesh.y - camera.scrollY * mesh.scrollFactorY; + var translateX = mesh.x; + var translateY = mesh.y; var scaleX = mesh.scaleX; var scaleY = mesh.scaleY; - var rotation = -mesh.rotation; + var rotation = mesh.rotation; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -26599,12 +26784,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * mesh.scrollFactorX; + var csf = -camera.scrollY * mesh.scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -26614,6 +26804,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * mesh.scrollFactorX; + srf -= camera.scrollY * mesh.scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -26655,7 +26848,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] @@ -26738,17 +26931,17 @@ var TextureTintPipeline = new Class({ var vmax = 0; var lastGlyph = null; var lastCharCode = 0; - var translateX = (srcX - cameraScrollX) + frame.x; - var translateY = (srcY - cameraScrollY) + frame.y; - var rotation = -bitmapText.rotation; + var translateX = srcX + frame.x; + var translateY = srcY + frame.y; + var rotation = bitmapText.rotation; var scaleX = bitmapText.scaleX; var scaleY = bitmapText.scaleY; var letterSpacing = bitmapText.letterSpacing; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -26769,12 +26962,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -26784,6 +26982,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -26924,7 +27125,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] @@ -27007,15 +27208,15 @@ var TextureTintPipeline = new Class({ var lastCharCode = 0; var translateX = srcX + frame.x; var translateY = srcY + frame.y; - var rotation = -bitmapText.rotation; + var rotation = bitmapText.rotation; var scaleX = bitmapText.scaleX; var scaleY = bitmapText.scaleY; var letterSpacing = bitmapText.letterSpacing; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -27038,12 +27239,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -27053,6 +27259,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -27171,14 +27380,12 @@ var TextureTintPipeline = new Class({ y -= bitmapText.displayOriginY; x *= scale; y *= scale; - x -= cameraScrollX; - y -= cameraScrollY; - sr = Math.sin(-rotation); - cr = Math.cos(-rotation); + sr = Math.sin(rotation); + cr = Math.cos(rotation); uta = cr * scale; - utb = -sr * scale; - utc = sr * scale; + utb = sr * scale; + utc = -sr * scale; utd = cr * scale; ute = x; utf = y; @@ -27268,7 +27475,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] @@ -27304,7 +27511,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] @@ -27362,7 +27569,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] @@ -27399,7 +27606,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchTexture + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} gameObject - [description] @@ -27464,7 +27671,6 @@ var TextureTintPipeline = new Class({ } flipY = flipY ^ (texture.isRenderTexture ? 1 : 0); - rotation = -rotation; var roundPixels = this.renderer.config.roundPixels; var vertexViewF32 = this.vertexViewF32; @@ -27476,13 +27682,13 @@ var TextureTintPipeline = new Class({ var y = -displayOriginY + ((srcHeight) * (flipY ? 1.0 : 0.0)); var xw = x + width; var yh = y + height; - var translateX = srcX - camera.scrollX * scrollFactorX; - var translateY = srcY - camera.scrollY * scrollFactorY; + var translateX = srcX; + var translateY = srcY; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -27502,12 +27708,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * scrollFactorX; + var csf = -camera.scrollY * scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -27517,6 +27728,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * scrollFactorX; + srf -= camera.scrollY * scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -27592,7 +27806,7 @@ var TextureTintPipeline = new Class({ /** * Immediately draws a texture with no batching. * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawTexture + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawTexture * @since 3.2.0 * * @param {WebGLTexture} texture [description] @@ -27607,7 +27821,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - [description] * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} This Pipeline. + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This Pipeline. */ drawTexture: function ( texture, @@ -27743,7 +27957,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchGraphics + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchGraphics * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - [description] @@ -28920,7 +29134,6 @@ var Sprite = __webpack_require__(31); * @extends Phaser.Physics.Arcade.Components.Size * @extends Phaser.Physics.Arcade.Components.Velocity * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.Animation * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip @@ -29318,8 +29531,8 @@ var LIGHT_COUNT = 10; * [description] * * @class ForwardDiffuseLightPipeline - * @extends Phaser.Renderer.WebGL.TextureTintPipeline - * @memberOf Phaser.Renderer.WebGL + * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -29341,10 +29554,11 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onBind + * @override * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline} [description] */ onBind: function () { @@ -29364,13 +29578,13 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#onRender + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender * @since 3.0.0 * * @param {Phaser.Scene} scene - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] * - * @return {Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline} [description] */ onRender: function (scene, camera) { @@ -29424,14 +29638,15 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawStaticTilemapLayer + * @override * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] - * + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function (tilemap, camera, parentTransformMatrix) { var normalTexture = tilemap.texture.dataSource[0]; @@ -29439,26 +29654,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera); + TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. StaticTilemapLayer rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawStaticTilemapLayer(tilemap, camera); + this.renderer.pipelines.TextureTintPipeline.drawStaticTilemapLayer(tilemap, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - drawEmitterManager: function (emitterManager, camera) + drawEmitterManager: function (emitterManager, camera, parentTransformMatrix) { var normalTexture = emitterManager.texture.dataSource[0]; @@ -29466,26 +29682,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera); + TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. EmitterManager rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawEmitterManager(emitterManager, camera); + this.renderer.pipelines.TextureTintPipeline.drawEmitterManager(emitterManager, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - drawBlitter: function (blitter, camera) + drawBlitter: function (blitter, camera, parentTransformMatrix) { var normalTexture = blitter.texture.dataSource[0]; @@ -29493,26 +29710,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera); + TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Blitter rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawBlitter(blitter, camera); + this.renderer.pipelines.TextureTintPipeline.drawBlitter(blitter, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchSprite: function (sprite, camera) + batchSprite: function (sprite, camera, parentTransformMatrix) { var normalTexture = sprite.texture.dataSource[0]; @@ -29520,26 +29738,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera); + TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Sprite rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchSprite(sprite, camera); + this.renderer.pipelines.TextureTintPipeline.batchSprite(sprite, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchMesh: function (mesh, camera) + batchMesh: function (mesh, camera, parentTransformMatrix) { var normalTexture = mesh.texture.dataSource[0]; @@ -29547,12 +29766,12 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera); + TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Mesh rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchMesh(mesh, camera); + this.renderer.pipelines.TextureTintPipeline.batchMesh(mesh, camera, parentTransformMatrix); } }, @@ -29560,14 +29779,15 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchBitmapText: function (bitmapText, camera) + batchBitmapText: function (bitmapText, camera, parentTransformMatrix) { var normalTexture = bitmapText.texture.dataSource[0]; @@ -29575,26 +29795,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera); + TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. BitmapText rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchBitmapText(bitmapText, camera); + this.renderer.pipelines.TextureTintPipeline.batchBitmapText(bitmapText, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchDynamicBitmapText: function (bitmapText, camera) + batchDynamicBitmapText: function (bitmapText, camera, parentTransformMatrix) { var normalTexture = bitmapText.texture.dataSource[0]; @@ -29602,26 +29823,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera); + TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. DynamicBitmapText rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchDynamicBitmapText(bitmapText, camera); + this.renderer.pipelines.TextureTintPipeline.batchDynamicBitmapText(bitmapText, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchText: function (text, camera) + batchText: function (text, camera, parentTransformMatrix) { var normalTexture = text.texture.dataSource[0]; @@ -29629,26 +29851,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchText.call(this, text, camera); + TextureTintPipeline.prototype.batchText.call(this, text, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Text rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchText(text, camera); + this.renderer.pipelines.TextureTintPipeline.batchText(text, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchDynamicTilemapLayer: function (tilemapLayer, camera) + batchDynamicTilemapLayer: function (tilemapLayer, camera, parentTransformMatrix) { var normalTexture = tilemapLayer.texture.dataSource[0]; @@ -29656,26 +29879,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera); + TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. DynamicTilemapLayer rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchDynamicTilemapLayer(tilemapLayer, camera); + this.renderer.pipelines.TextureTintPipeline.batchDynamicTilemapLayer(tilemapLayer, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchTileSprite: function (tileSprite, camera) + batchTileSprite: function (tileSprite, camera, parentTransformMatrix) { var normalTexture = tileSprite.texture.dataSource[0]; @@ -29683,12 +29907,12 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera); + TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. TileSprite rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchTileSprite(tileSprite, camera); + this.renderer.pipelines.TextureTintPipeline.batchTileSprite(tileSprite, camera, parentTransformMatrix); } } @@ -30132,17 +30356,17 @@ module.exports = Random; var Point = __webpack_require__(5); /** - * [description] + * Returns a random point on a given Line. * * @function Phaser.Geom.Line.Random * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Line} line - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. * - * @return {(Phaser.Geom.Point|object)} [description] + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. */ var Random = function (line, out) { @@ -32319,7 +32543,8 @@ var AudioFile = new Class({ /** * [description] * - * @property {AudioContext} context + * @name Phaser.Loader.FileTypes.AudioFile#context + * @type {AudioContext} * @since 3.0.0 */ this.context = audioContext; @@ -33263,7 +33488,7 @@ var ScaleModes = __webpack_require__(55); * @since 3.0.0 * * @param {Phaser.Textures.Texture} texture - The Texture this TextureSource belongs to. - * @param {(Image|HTMLCanvasElement)} source - The source image data. + * @param {(HTMLImageElement|HTMLCanvasElement)} source - The source image data. * @param {integer} [width] - Optional width of the source image. If not given it's derived from the source itself. * @param {integer} [height] - Optional height of the source image. If not given it's derived from the source itself. */ @@ -33468,7 +33693,7 @@ var TextureSource = __webpack_require__(167); * * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to. * @param {string} key - The unique string-based key of this Texture. - * @param {(Image|HTMLCanvasElement)} source - The source that is used to create the texture. Usually an Image, but can also be a Canvas. + * @param {(HTMLImageElement|HTMLCanvasElement)} source - The source that is used to create the texture. Usually an Image, but can also be a Canvas. * @param {number} [width] - The width of the Texture. This is optional and automatically derived from the source images. * @param {number} [height] - The height of the Texture. This is optional and automatically derived from the source images. */ @@ -33784,7 +34009,7 @@ var Texture = new Class({ * @method Phaser.Textures.Texture#setDataSource * @since 3.0.0 * - * @param {(Image|HTMLCanvasElement)} data - The source image. + * @param {(HTMLImageElement|HTMLCanvasElement)} data - The source image. */ setDataSource: function (data) { @@ -35999,7 +36224,7 @@ module.exports = WebAudioSoundManager; var BaseSound = __webpack_require__(72); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @classdesc @@ -37780,7 +38005,7 @@ var Settings = { * @function Phaser.Scenes.Settings.create * @since 3.0.0 * - * @param {(string|Phaser.Scenes.SettingsConfig)} config - [description] + * @param {(string|Phaser.Scenes.Settings.Config)} config - [description] * * @return {Phaser.Scenes.Settings.Object} [description] */ @@ -37867,7 +38092,7 @@ var Systems = __webpack_require__(109); * @constructor * @since 3.0.0 * - * @param {(string|SettingsConfig)} config - Scene specific configuration settings. + * @param {(string|Phaser.Scenes.Settings.Config)} config - Scene specific configuration settings. */ var Scene = new Class({ @@ -38428,7 +38653,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The config for the Scene + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The config for the Scene * @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added. * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`. * @@ -38832,7 +39057,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - The key of the Scene. - * @param {(string|SettingsConfig)} sceneConfig - The Scene config. + * @param {(string|Phaser.Scenes.Settings.Config)} sceneConfig - The Scene config. * * @return {Phaser.Scene} The created Scene. */ @@ -38916,7 +39141,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - The key to check in the Scene config. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The Scene config. + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The Scene config. * * @return {string} The Scene key. */ @@ -41251,6 +41476,33 @@ var Key = new Class({ * @since 3.0.0 */ this._justUp = false; + }, + + /** + * Resets this Key object back to its default un-pressed state. + * + * @method Phaser.Input.Keyboard.Key.reset + * @since 3.6.0 + * + * @return {Phaser.Input.Keyboard.Key} This Key instance. + */ + reset: function () + { + this.preventDefault = true; + this.enabled = true; + this.isDown = false; + this.isUp = true; + this.altKey = false; + this.ctrlKey = false; + this.shiftKey = false; + this.timeDown = 0; + this.duration = 0; + this.timeUp = 0; + this.repeats = 0; + this._justDown = false; + this._justUp = false; + + return this; } }); @@ -46502,25 +46754,25 @@ var quickselect = __webpack_require__(164); * Spatial index is a special data structure for points and rectangles that allows you to perform queries like * "all items within this bounding box" very efficiently (e.g. hundreds of times faster than looping over all items). * + * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`. + * This is to avoid the eval like function creation that the original library used, which caused CSP policy violations. + * * @class RTree * @memberOf Phaser.Structs * @constructor * @since 3.0.0 */ -function rbush (maxEntries, format) +function rbush (maxEntries) { + var format = [ '.left', '.top', '.right', '.bottom' ]; + if (!(this instanceof rbush)) return new rbush(maxEntries, format); // max entries in a node is 9 by default; min node fill is 40% for best performance this._maxEntries = Math.max(4, maxEntries || 9); this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)); - if (format) - { - this._initFormat(format); - } - this.clear(); } @@ -46951,44 +47203,23 @@ rbush.prototype = { } }, - _initFormat: function (format) + compareMinX: function (a, b) { - // format: [minX, minY, maxX, maxY accessors] - // accessors will be dotted names + return a.left - b.left; + }, - // Because we have historically used eval-based function constructor - // the format accerrsors need to have their leading dots stripped to - // obtain the actual accessor - format = format.map( - function (f) - { - return f.substring(1); - } - ); + compareMinY: function (a, b) + { + return a.top - b.top; + }, - // Do not use string-generated Functions for CSP policies - // Instead a combination of anonymous functions and grabbing properties - // by string is used. - // cf. https://github.com/photonstorm/phaser/issues/3441 - // and https://github.com/photonstorm/phaser/issues/3535 - - var mkCompareFn = function(attr) { - return function(a, b) { - return a[attr] - b[attr]; - }; - }; - - this.compareMinX = mkCompareFn(format[0]); - this.compareMinY = mkCompareFn(format[1]); - - this.toBBox = function(a) - { - return { - minX: a[format[0]], - minY: a[format[1]], - maxX: a[format[2]], - maxY: a[format[3]], - }; + toBBox: function (a) + { + return { + minX: a.left, + minY: a.top, + maxX: a.right, + maxY: a.bottom }; } }; @@ -47111,7 +47342,6 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; - /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { @@ -47339,7 +47569,7 @@ module.exports = ProcessQueue; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); @@ -47442,7 +47672,7 @@ module.exports = TextFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -48966,9 +49196,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var CONST = __webpack_require__(19); var GameObject = __webpack_require__(1); -var Render = __webpack_require__(876); -var RenderTextureCanvas = __webpack_require__(873); -var RenderTextureWebGL = __webpack_require__(872); +var Render = __webpack_require__(879); +var RenderTextureCanvas = __webpack_require__(876); +var RenderTextureWebGL = __webpack_require__(875); /** * @classdesc @@ -49196,7 +49426,7 @@ var GameObject = __webpack_require__(1); var GravityWell = __webpack_require__(435); var List = __webpack_require__(89); var ParticleEmitter = __webpack_require__(433); -var Render = __webpack_require__(880); +var Render = __webpack_require__(883); /** * @classdesc @@ -49941,7 +50171,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var GameObject = __webpack_require__(1); var GetBitmapTextSize = __webpack_require__(452); -var Render = __webpack_require__(885); +var Render = __webpack_require__(888); /** * @typedef {object} DisplayCallbackConfig @@ -50307,7 +50537,7 @@ var DynamicBitmapText = new Class({ * @method Phaser.GameObjects.DynamicBitmapText#toJSON * @since 3.0.0 * - * @return {JSONGameObject.} [description] + * @return {JSONBitmapText} [description] */ toJSON: function () { @@ -50347,7 +50577,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var GameObject = __webpack_require__(1); var Rectangle = __webpack_require__(12); -var Render = __webpack_require__(888); +var Render = __webpack_require__(891); var Union = __webpack_require__(450); var Vector2 = __webpack_require__(6); @@ -50355,11 +50585,6 @@ var Vector2 = __webpack_require__(6); * @classdesc * A Container Game Object. * - * WARNING: EXPERIMENTAL. There are several known cases where Containers will not behave correctly, - * especially if you use a multi-camera or transformed camera set-up. We are still working on them, - * but wanted to release as part of 3.4 under a beta feature flag, because in the main they work - * are and worth getting used to. - * * A Container, as the name implies, can 'contain' other types of Game Object. * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. * By default it will be removed from the Display List and instead added to the Containers own internal list. @@ -50381,8 +50606,10 @@ var Vector2 = __webpack_require__(6); * to use as their hit area. Container children can also be enabled for input, independent of the Container. * * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, - * if Container children are enabled for physics you may get unexpected results,such as offset bodies, - * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0x0. + * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies, + * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children + * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure + * your game to work around this. * * It's important to understand the impact of using Containers. They add additional processing overhead into * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true @@ -51578,8 +51805,8 @@ module.exports = Container; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(892); -var Bob = __webpack_require__(889); +var BlitterRender = __webpack_require__(895); +var Bob = __webpack_require__(892); var Class = __webpack_require__(0); var Components = __webpack_require__(14); var Frame = __webpack_require__(119); @@ -51847,9 +52074,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var GameObject = __webpack_require__(1); var GetBitmapTextSize = __webpack_require__(452); -var ParseFromAtlas = __webpack_require__(897); -var ParseRetroFont = __webpack_require__(896); -var Render = __webpack_require__(895); +var ParseFromAtlas = __webpack_require__(899); +var Render = __webpack_require__(898); /** * @typedef {object} TextBounds @@ -51868,6 +52094,7 @@ var Render = __webpack_require__(895); /** * @typedef {object} JSONBitmapText + * @extends {JSONGameObject} * * @property {string} font - [description] * @property {string} text - [description] @@ -52127,7 +52354,7 @@ var BitmapText = new Class({ * @method Phaser.GameObjects.BitmapText#toJSON * @since 3.0.0 * - * @return {JSONGameObject.} [description] + * @return {JSONBitmapText} [description] */ toJSON: function () { @@ -52149,7 +52376,6 @@ var BitmapText = new Class({ }); -BitmapText.ParseRetroFont = ParseRetroFont; BitmapText.ParseFromAtlas = ParseFromAtlas; module.exports = BitmapText; @@ -53149,7 +53375,7 @@ var pathArray = []; * * @class FlatTintPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -53201,7 +53427,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -53210,7 +53436,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#vertexViewU32 + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#vertexViewU32 * @type {Uint32Array} * @since 3.0.0 */ @@ -53219,7 +53445,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#tempTriangle + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#tempTriangle * @type {array} * @since 3.0.0 */ @@ -53233,7 +53459,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#polygonCache + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#polygonCache * @type {array} * @default [] * @since 3.0.0 @@ -53246,10 +53472,10 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.FlatTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} [description] */ onBind: function () { @@ -53262,14 +53488,14 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.FlatTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} [description] */ resize: function (width, height, resolution) { @@ -53282,7 +53508,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillRect + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillRect * @since 3.0.0 * * @param {float} srcX - [description] @@ -53365,7 +53591,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillTriangle + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillTriangle * @since 3.0.0 * * @param {float} srcX - [description] @@ -53437,7 +53663,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchStrokeTriangle + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchStrokeTriangle * @since 3.0.0 * * @param {float} srcX - [description] @@ -53499,7 +53725,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillPath + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillPath * @since 3.0.0 * * @param {float} srcX - [description] @@ -53601,7 +53827,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchStrokePath + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchStrokePath * @since 3.0.0 * * @param {float} srcX - [description] @@ -53694,7 +53920,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchLine + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchLine * @since 3.0.0 * * @param {float} srcX - [description] @@ -53802,7 +54028,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchGraphics + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchGraphics * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - [description] @@ -53824,11 +54050,11 @@ var FlatTintPipeline = new Class({ var cameraScrollX = camera.scrollX * graphics.scrollFactorX; var cameraScrollY = camera.scrollY * graphics.scrollFactorY; - var srcX = graphics.x - cameraScrollX; - var srcY = graphics.y - cameraScrollY; + var srcX = graphics.x; + var srcY = graphics.y; var srcScaleX = graphics.scaleX; var srcScaleY = graphics.scaleY; - var srcRotation = -graphics.rotation; + var srcRotation = graphics.rotation; var commands = graphics.commandBuffer; var alpha = graphics.alpha; var lineAlpha = 1.0; @@ -53856,8 +54082,8 @@ var FlatTintPipeline = new Class({ var sr = sin(srcRotation); var cr = cos(srcRotation); var sra = cr * srcScaleX; - var srb = -sr * srcScaleX; - var src = sr * srcScaleY; + var srb = sr * srcScaleX; + var src = -sr * srcScaleY; var srd = cr * srcScaleY; var sre = srcX; var srf = srcY; @@ -53877,12 +54103,17 @@ var FlatTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -53892,6 +54123,9 @@ var FlatTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -54234,7 +54468,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawStaticTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] @@ -54247,7 +54481,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] @@ -54260,7 +54494,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] @@ -54273,7 +54507,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] @@ -54286,7 +54520,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] @@ -54299,7 +54533,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] @@ -54312,7 +54546,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] @@ -54325,7 +54559,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] @@ -54338,7 +54572,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] @@ -54351,7 +54585,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] @@ -54388,7 +54622,7 @@ var WebGLPipeline = __webpack_require__(80); * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -54432,7 +54666,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -54441,7 +54675,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#maxQuads + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads * @type {number} * @default 1 * @since 3.0.0 @@ -54451,7 +54685,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#resolutionDirty + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty * @type {boolean} * @default true * @since 3.0.0 @@ -54462,10 +54696,10 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.BitmapMaskPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} [description] */ onBind: function () { @@ -54488,14 +54722,14 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.BitmapMaskPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} [description] */ resize: function (width, height, resolution) { @@ -54507,7 +54741,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#beginMask + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#beginMask * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} mask - [description] @@ -54544,7 +54778,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#endMask + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} mask - [description] @@ -64253,7 +64487,7 @@ module.exports = { */ var CONST = __webpack_require__(57); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Tweens @@ -66852,7 +67086,7 @@ module.exports = DynamicTilemapLayer; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(33); var DynamicTilemapLayer = __webpack_require__(303); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var Formats = __webpack_require__(29); var LayerData = __webpack_require__(100); var Rotate = __webpack_require__(337); @@ -67760,7 +67994,7 @@ var Tilemap = new Class({ * on at least one side. * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that * have at least one interesting face. - * @param {LayerData} layer - [description] + * @param {LayerData} [layer] - [description] * * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid. */ @@ -70035,7 +70269,7 @@ module.exports = CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var FilterMode = __webpack_require__(316); /** @@ -70211,7 +70445,7 @@ var ScenePlugin = new Class({ * The settings of the Scene this ScenePlugin belongs to. * * @name Phaser.Scenes.ScenePlugin#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.0.0 */ this.settings = scene.sys.settings; @@ -70405,7 +70639,7 @@ var ScenePlugin = new Class({ }, /** - * @typedef {object} Phaser.Scenes.ScenePlugin#SceneTransitionConfig + * @typedef {object} Phaser.Scenes.ScenePlugin.SceneTransitionConfig * * @property {string} target - The Scene key to transition to. * @property {integer} [duration=1000] - The duration, in ms, for the transition to last. @@ -70451,7 +70685,7 @@ var ScenePlugin = new Class({ * @method Phaser.Scenes.ScenePlugin#transition * @since 3.5.0 * - * @param {Phaser.Scenes.ScenePlugin#SceneTransitionConfig} config - The transition configuration object. + * @param {Phaser.Scenes.ScenePlugin.SceneTransitionConfig} config - The transition configuration object. * * @return {boolean} `true` is the transition was started, otherwise `false`. */ @@ -70510,7 +70744,7 @@ var ScenePlugin = new Class({ } else { - this.manager.start(key); + this.manager.start(key, GetFastValue(config, 'data')); } this.systems.events.emit('transitionout', target, duration); @@ -70620,7 +70854,7 @@ var ScenePlugin = new Class({ * @since 3.0.0 * * @param {string} key - The Scene key. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The config for the Scene. + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The config for the Scene. * @param {boolean} autoStart - Whether to start the Scene after it's added. * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. @@ -71117,7 +71351,7 @@ module.exports = ScenePlugin; */ var CONST = __webpack_require__(52); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Scenes @@ -74629,7 +74863,7 @@ var World = new Class({ * @type {Phaser.Structs.RTree} * @since 3.0.0 */ - this.tree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]); + this.tree = new RTree(this.maxEntries); /** * [description] @@ -74638,7 +74872,7 @@ var World = new Class({ * @type {Phaser.Structs.RTree} * @since 3.0.0 */ - this.staticTree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]); + this.staticTree = new RTree(this.maxEntries); /** * [description] @@ -76255,9 +76489,9 @@ var StaticPhysicsGroup = new Class({ */ this.world = world; - config.createCallback = this.createCallback; - config.removeCallback = this.removeCallback; - config.createMultipleCallback = this.createMultipleCallback; + config.createCallback = this.createCallbackHandler; + config.removeCallback = this.removeCallbackHandler; + config.createMultipleCallback = this.createMultipleCallbackHandler; config.classType = ArcadeSprite; @@ -76276,12 +76510,12 @@ var StaticPhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.StaticGroup#createCallback + * @method Phaser.Physics.Arcade.StaticGroup#createCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - createCallback: function (child) + createCallbackHandler: function (child) { if (!child.body) { @@ -76292,12 +76526,12 @@ var StaticPhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.StaticGroup#removeCallback + * @method Phaser.Physics.Arcade.StaticGroup#removeCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - removeCallback: function (child) + removeCallbackHandler: function (child) { if (child.body) { @@ -76308,12 +76542,12 @@ var StaticPhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.StaticGroup#createMultipleCallback + * @method Phaser.Physics.Arcade.StaticGroup#createMultipleCallbackHandler * @since 3.0.0 * * @param {object} entries - [description] */ - createMultipleCallback: function () + createMultipleCallbackHandler: function () { this.refresh(); }, @@ -76450,8 +76684,8 @@ var PhysicsGroup = new Class({ */ this.world = world; - config.createCallback = this.createCallback; - config.removeCallback = this.removeCallback; + config.createCallback = this.createCallbackHandler; + config.removeCallback = this.removeCallbackHandler; config.classType = GetFastValue(config, 'classType', ArcadeSprite); @@ -76498,12 +76732,12 @@ var PhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.Group#createCallback + * @method Phaser.Physics.Arcade.Group#createCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - createCallback: function (child) + createCallbackHandler: function (child) { if (!child.body) { @@ -76521,12 +76755,12 @@ var PhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.Group#removeCallback + * @method Phaser.Physics.Arcade.Group#removeCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - removeCallback: function (child) + removeCallbackHandler: function (child) { if (child.body) { @@ -77242,7 +77476,7 @@ module.exports = SpriteSheetFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -77354,7 +77588,7 @@ module.exports = ScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -77567,7 +77801,7 @@ FileTypesManager.register('multiatlas', function (key, textureURLs, atlasURLs, t */ var AudioFile = __webpack_require__(158); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(36); @@ -77745,7 +77979,7 @@ var JSONFile = __webpack_require__(36); * @param {string} path - The path of the file. * @param {XHRSettingsObject} [xhrSettings] - Optional file specific XHR settings. * - * @return {Phaser.Loader.FileTypes.AnimationJSONFile} A File instance to be added to the Loader. + * @return {Phaser.Loader.FileTypes.JSONFile} A File instance to be added to the Loader. */ var AnimationJSONFile = function (key, url, path, xhrSettings) { @@ -78092,7 +78326,7 @@ var InputPlugin = new Class({ * [description] * * @name Phaser.Input.InputPlugin#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.5.0 */ this.settings = scene.sys.settings; @@ -85208,7 +85442,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var DeathZone = __webpack_require__(432); var EdgeZone = __webpack_require__(431); -var EmitterOp = __webpack_require__(881); +var EmitterOp = __webpack_require__(884); var GetFastValue = __webpack_require__(2); var GetRandom = __webpack_require__(139); var HasAny = __webpack_require__(397); @@ -87389,26 +87623,6 @@ var Particle = new Class({ */ this.rotation = 0; - /** - * The horizontal scroll factor of this Particle. - * - * @name Phaser.GameObjects.Particles.Particle#scrollFactorX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.scrollFactorX = 1; - - /** - * The vertical scroll factor of this Particle. - * - * @name Phaser.GameObjects.Particles.Particle#scrollFactorY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.scrollFactorY = 1; - /** * The tint applied to this Particle. * @@ -90986,7 +91200,7 @@ var TimeStep = new Class({ * the TimeStep is actually stopped, not just paused. * * @name Phaser.Boot.TimeStep#running - * @name {boolean} + * @type {boolean} * @readOnly * @default false * @since 3.0.0 @@ -91011,7 +91225,7 @@ var TimeStep = new Class({ * is spiraling out of control. * * @name Phaser.Boot.TimeStep#targetFps - * @name {integer} + * @type {integer} * @default 60 * @since 3.0.0 */ @@ -94509,6 +94723,11 @@ var Game = new Class({ if (this.removeCanvas && this.canvas) { CanvasPool.remove(this.canvas); + + if (this.canvas.parentNode) + { + this.canvas.parentNode.removeChild(this.canvas); + } } this.loop.destroy(); @@ -95468,23 +95687,23 @@ module.exports = ComponentToHex; var Color = __webpack_require__(27); -Color.ColorToRGBA = __webpack_require__(906); +Color.ColorToRGBA = __webpack_require__(908); Color.ComponentToHex = __webpack_require__(525); Color.GetColor = __webpack_require__(144); Color.GetColor32 = __webpack_require__(278); Color.HexStringToColor = __webpack_require__(279); -Color.HSLToColor = __webpack_require__(905); -Color.HSVColorWheel = __webpack_require__(904); +Color.HSLToColor = __webpack_require__(907); +Color.HSVColorWheel = __webpack_require__(906); Color.HSVToRGB = __webpack_require__(523); Color.HueToComponent = __webpack_require__(524); Color.IntegerToColor = __webpack_require__(277); Color.IntegerToRGB = __webpack_require__(276); -Color.Interpolate = __webpack_require__(903); +Color.Interpolate = __webpack_require__(905); Color.ObjectToColor = __webpack_require__(275); -Color.RandomRGB = __webpack_require__(902); +Color.RandomRGB = __webpack_require__(904); Color.RGBStringToColor = __webpack_require__(274); -Color.RGBToHSV = __webpack_require__(901); -Color.RGBToString = __webpack_require__(900); +Color.RGBToHSV = __webpack_require__(903); +Color.RGBToString = __webpack_require__(902); Color.ValueToColor = __webpack_require__(124); module.exports = Color; @@ -96200,7 +96419,7 @@ var LineCurve = new Class({ /** * [description] * - * @property Phaser.Curves.LineCurve#p1 + * @name Phaser.Curves.LineCurve#p1 * @type {Phaser.Math.Vector2} * @since 3.0.0 */ @@ -96314,6 +96533,8 @@ var LineCurve = new Class({ * * @method Phaser.Curves.LineCurve#getTangent * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] * * @return {Phaser.Math.Vector2} [description] */ @@ -97236,7 +97457,7 @@ var CubicBezierCurve = new Class({ * @method Phaser.Curves.CubicBezierCurve#draw * @since 3.0.0 * - * @generic {Phaser.GameObjects.Graphics} G - [out,$return] + * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return] * * @param {Phaser.GameObjects.Graphics} graphics - [description] * @param {integer} [pointsTotal=32] - [description] @@ -100401,7 +100622,7 @@ var Flash = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -100833,7 +101054,7 @@ var Fade = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -105390,55 +105611,55 @@ module.exports = QuickSet; module.exports = { - Angle: __webpack_require__(988), - Call: __webpack_require__(987), - GetFirst: __webpack_require__(986), - GetLast: __webpack_require__(985), - GridAlign: __webpack_require__(984), - IncAlpha: __webpack_require__(983), - IncX: __webpack_require__(982), - IncXY: __webpack_require__(981), - IncY: __webpack_require__(980), - PlaceOnCircle: __webpack_require__(979), - PlaceOnEllipse: __webpack_require__(978), - PlaceOnLine: __webpack_require__(977), - PlaceOnRectangle: __webpack_require__(976), - PlaceOnTriangle: __webpack_require__(975), - PlayAnimation: __webpack_require__(974), + Angle: __webpack_require__(990), + Call: __webpack_require__(989), + GetFirst: __webpack_require__(988), + GetLast: __webpack_require__(987), + GridAlign: __webpack_require__(986), + IncAlpha: __webpack_require__(985), + IncX: __webpack_require__(984), + IncXY: __webpack_require__(983), + IncY: __webpack_require__(982), + PlaceOnCircle: __webpack_require__(981), + PlaceOnEllipse: __webpack_require__(980), + PlaceOnLine: __webpack_require__(979), + PlaceOnRectangle: __webpack_require__(978), + PlaceOnTriangle: __webpack_require__(977), + PlayAnimation: __webpack_require__(976), PropertyValueInc: __webpack_require__(32), PropertyValueSet: __webpack_require__(24), - RandomCircle: __webpack_require__(973), - RandomEllipse: __webpack_require__(972), - RandomLine: __webpack_require__(971), - RandomRectangle: __webpack_require__(970), - RandomTriangle: __webpack_require__(969), - Rotate: __webpack_require__(968), - RotateAround: __webpack_require__(967), - RotateAroundDistance: __webpack_require__(966), - ScaleX: __webpack_require__(965), - ScaleXY: __webpack_require__(964), - ScaleY: __webpack_require__(963), - SetAlpha: __webpack_require__(962), - SetBlendMode: __webpack_require__(961), - SetDepth: __webpack_require__(960), - SetHitArea: __webpack_require__(959), - SetOrigin: __webpack_require__(958), - SetRotation: __webpack_require__(957), - SetScale: __webpack_require__(956), - SetScaleX: __webpack_require__(955), - SetScaleY: __webpack_require__(954), - SetTint: __webpack_require__(953), - SetVisible: __webpack_require__(952), - SetX: __webpack_require__(951), - SetXY: __webpack_require__(950), - SetY: __webpack_require__(949), - ShiftPosition: __webpack_require__(948), - Shuffle: __webpack_require__(947), - SmootherStep: __webpack_require__(946), - SmoothStep: __webpack_require__(945), - Spread: __webpack_require__(944), - ToggleVisible: __webpack_require__(943), - WrapInRectangle: __webpack_require__(942) + RandomCircle: __webpack_require__(975), + RandomEllipse: __webpack_require__(974), + RandomLine: __webpack_require__(973), + RandomRectangle: __webpack_require__(972), + RandomTriangle: __webpack_require__(971), + Rotate: __webpack_require__(970), + RotateAround: __webpack_require__(969), + RotateAroundDistance: __webpack_require__(968), + ScaleX: __webpack_require__(967), + ScaleXY: __webpack_require__(966), + ScaleY: __webpack_require__(965), + SetAlpha: __webpack_require__(964), + SetBlendMode: __webpack_require__(963), + SetDepth: __webpack_require__(962), + SetHitArea: __webpack_require__(961), + SetOrigin: __webpack_require__(960), + SetRotation: __webpack_require__(959), + SetScale: __webpack_require__(958), + SetScaleX: __webpack_require__(957), + SetScaleY: __webpack_require__(956), + SetTint: __webpack_require__(955), + SetVisible: __webpack_require__(954), + SetX: __webpack_require__(953), + SetXY: __webpack_require__(952), + SetY: __webpack_require__(951), + ShiftPosition: __webpack_require__(950), + Shuffle: __webpack_require__(949), + SmootherStep: __webpack_require__(948), + SmoothStep: __webpack_require__(947), + Spread: __webpack_require__(946), + ToggleVisible: __webpack_require__(945), + WrapInRectangle: __webpack_require__(944) }; @@ -106166,7 +106387,7 @@ module.exports = GetMinMaxValue; module.exports = { Clone: __webpack_require__(47), - Extend: __webpack_require__(17), + Extend: __webpack_require__(16), GetAdvancedValue: __webpack_require__(8), GetFastValue: __webpack_require__(2), GetMinMaxValue: __webpack_require__(604), @@ -106785,7 +107006,7 @@ module.exports = ParseTileLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * Copy properties from tileset to tiles. @@ -111201,7 +111422,7 @@ module.exports = ArcadePhysics; */ var CONST = __webpack_require__(64); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @callback ArcadePhysicsCallback @@ -112708,7 +112929,7 @@ module.exports = { */ var CONST = __webpack_require__(15); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Math @@ -112795,7 +113016,7 @@ module.exports = PhaserMath; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var CustomSet = __webpack_require__(75); var EventEmitter = __webpack_require__(9); var FileTypesManager = __webpack_require__(7); @@ -114031,7 +114252,7 @@ module.exports = TilemapJSONFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var TILEMAP_FORMATS = __webpack_require__(29); @@ -114138,7 +114359,7 @@ module.exports = TilemapCSVFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -114293,7 +114514,7 @@ module.exports = SVGFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -114457,7 +114678,7 @@ module.exports = HTMLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -114641,7 +114862,7 @@ module.exports = BitmapFontFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -114810,8 +115031,8 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(16); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Loader @@ -119986,8 +120207,6 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size var Container = __webpack_require__(243); var GameObjectFactory = __webpack_require__(11); -var hasWarned = false; - /** * Creates a new Container Game Object and adds it to the Scene. * @@ -120004,12 +120223,6 @@ var hasWarned = false; */ GameObjectFactory.register('container', function (x, y, children) { - if (!hasWarned) - { - console.warn('Use of a beta feature: Containers'); - hasWarned = true; - } - return this.displayList.add(new Container(this.scene, x, y, children)); }); @@ -120256,6 +120469,275 @@ module.exports = { /***/ }), /* 872 */ +/***/ (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 GetValue = __webpack_require__(4); + +/** + * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor + * and create a BitmapText object using a fixed-width retro font. + * + * @function Phaser.GameObjects.RetroFont.Parse + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - A reference to the Phaser Scene. + * @param {Phaser.GameObjects.RetroFont.Config} config - The font configuration object. + */ +var ParseRetroFont = function (scene, config) +{ + var w = config.width; + var h = config.height; + var cx = Math.floor(w / 2); + var cy = Math.floor(h / 2); + var letters = GetValue(config, 'chars', ''); + + if (letters === '') + { + return; + } + + var key = GetValue(config, 'image', ''); + var offsetX = GetValue(config, 'offset.x', 0); + var offsetY = GetValue(config, 'offset.y', 0); + var spacingX = GetValue(config, 'spacing.x', 0); + var spacingY = GetValue(config, 'spacing.y', 0); + + var charsPerRow = GetValue(config, 'charsPerRow', null); + + if (charsPerRow === null) + { + charsPerRow = scene.sys.textures.getFrame(key).width / w; + + if (charsPerRow > letters.length) + { + charsPerRow = letters.length; + } + } + + var x = offsetX; + var y = offsetY; + + var data = { + retroFont: true, + font: key, + size: w, + lineHeight: h, + chars: {} + }; + + var r = 0; + + for (var i = 0; i < letters.length; i++) + { + // var node = letters[i]; + + var charCode = letters.charCodeAt(i); + + data.chars[charCode] = + { + x: x, + y: y, + width: w, + height: h, + centerX: cx, + centerY: cy, + xOffset: 0, + yOffset: 0, + xAdvance: w, + data: {}, + kerning: {} + }; + + r++; + + if (r === charsPerRow) + { + r = 0; + x = offsetX; + y += h + spacingY; + } + else + { + x += w + spacingX; + } + } + + var entry = { + data: data, + frame: null, + texture: key + }; + + return entry; +}; + +module.exports = ParseRetroFont; + + +/***/ }), +/* 873 */ +/***/ (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 RETRO_FONT_CONST = { + + /** + * Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET1 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET1: ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~', + + /** + * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET2 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET2: ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ', + + /** + * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET3 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET3: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ', + + /** + * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET4 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET4: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789', + + /** + * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET5 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET5: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789', + + /** + * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET6 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET6: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' ', + + /** + * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET7 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET7: 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39', + + /** + * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET8 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET8: '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ', + + /** + * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET9 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET9: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!', + + /** + * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET10 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET10: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + + /** + * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET11 + * @since 3.6.0 + * @type {string} + */ + TEXT_SET11: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789' + +}; + +module.exports = RETRO_FONT_CONST; + + +/***/ }), +/* 874 */ +/***/ (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 RETRO_FONT_CONST = __webpack_require__(873); +var Extend = __webpack_require__(16); + +/** + * @typedef {object} Phaser.GameObjects.RetroFont.Config + * + * @property {string} image - [description] + * @property {number} offset.x - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. + * @property {number} offset.y - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. + * @property {number} width - The width of each character in the font set. + * @property {number} height - The height of each character in the font set. + * @property {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. + * @property {number} charsPerRow - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. + * @property {number} spacing.x - If the characters in the font set have horizontal spacing between them set the required amount here. + * @property {number} spacing.y - If the characters in the font set have vertical spacing between them set the required amount here. +*/ + +/** + * @namespace Phaser.GameObjects.RetroFont + * @since 3.6.0 + */ + +var RetroFont = { Parse: __webpack_require__(872) }; + +// Merge in the consts +RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); + +module.exports = RetroFont; + + +/***/ }), +/* 875 */ /***/ (function(module, exports) { var RenderTextureWebGL = { @@ -120302,7 +120784,7 @@ module.exports = RenderTextureWebGL; /***/ }), -/* 873 */ +/* 876 */ /***/ (function(module, exports) { var RenderTextureCanvas = { @@ -120344,7 +120826,7 @@ module.exports = RenderTextureCanvas; /***/ }), -/* 874 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120440,7 +120922,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 875 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120497,7 +120979,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 876 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120511,12 +120993,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(875); + renderWebGL = __webpack_require__(878); } if (true) { - renderCanvas = __webpack_require__(874); + renderCanvas = __webpack_require__(877); } module.exports = { @@ -120528,7 +121010,7 @@ module.exports = { /***/ }), -/* 877 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120551,7 +121033,7 @@ module.exports = { /***/ }), -/* 878 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120641,8 +121123,8 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, interpol var x = -ox; var y = -oy; - var tx = particle.x - cameraScrollX * particle.scrollFactorX; - var ty = particle.y - cameraScrollY * particle.scrollFactorY; + var tx = particle.x - cameraScrollX; + var ty = particle.y - cameraScrollY; if (roundPixels) { @@ -120675,7 +121157,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 879 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120717,7 +121199,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 880 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120731,12 +121213,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(879); + renderWebGL = __webpack_require__(882); } if (true) { - renderCanvas = __webpack_require__(878); + renderCanvas = __webpack_require__(881); } module.exports = { @@ -120748,7 +121230,7 @@ module.exports = { /***/ }), -/* 881 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121345,7 +121827,7 @@ module.exports = EmitterOp; /***/ }), -/* 882 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121364,13 +121846,13 @@ module.exports = { Particle: __webpack_require__(434), ParticleEmitter: __webpack_require__(433), ParticleEmitterManager: __webpack_require__(227), - Zones: __webpack_require__(877) + Zones: __webpack_require__(880) }; /***/ }), -/* 883 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121582,7 +122064,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 884 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121625,7 +122107,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 885 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121639,12 +122121,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(884); + renderWebGL = __webpack_require__(887); } if (true) { - renderCanvas = __webpack_require__(883); + renderCanvas = __webpack_require__(886); } module.exports = { @@ -121656,7 +122138,7 @@ module.exports = { /***/ }), -/* 886 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121729,7 +122211,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 887 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121802,7 +122284,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 888 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121817,12 +122299,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(887); + renderWebGL = __webpack_require__(890); } if (true) { - renderCanvas = __webpack_require__(886); + renderCanvas = __webpack_require__(889); } module.exports = { @@ -121834,7 +122316,7 @@ module.exports = { /***/ }), -/* 889 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122179,7 +122661,7 @@ module.exports = Bob; /***/ }), -/* 890 */ +/* 893 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122273,7 +122755,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 891 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122313,7 +122795,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 892 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122327,12 +122809,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(891); + renderWebGL = __webpack_require__(894); } if (true) { - renderCanvas = __webpack_require__(890); + renderCanvas = __webpack_require__(893); } module.exports = { @@ -122344,7 +122826,7 @@ module.exports = { /***/ }), -/* 893 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122532,7 +123014,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 894 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122575,7 +123057,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 895 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122589,12 +123071,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(894); + renderWebGL = __webpack_require__(897); } if (true) { - renderCanvas = __webpack_require__(893); + renderCanvas = __webpack_require__(896); } module.exports = { @@ -122606,209 +123088,7 @@ module.exports = { /***/ }), -/* 896 */ -/***/ (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 GetValue = __webpack_require__(4); - -// * @param {number} characterWidth - The width of each character in the font set. -// * @param {number} characterHeight - The height of each character in the font set. -// * @param {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. -// * @param {number} [charsPerRow] - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. -// * @param {number} [xSpacing=0] - If the characters in the font set have horizontal spacing between them set the required amount here. -// * @param {number} [ySpacing=0] - If the characters in the font set have vertical spacing between them set the required amount here. -// * @param {number} [xOffset=0] - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. -// * @param {number} [yOffset=0] - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. -// Phaser.GameObject.RetroFont = function (game, key, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset) - -// { -// image: key, -// width: 32, -// height: 32, -// chars: 'string', -// charsPerRow: null, -// spacing: { x: 0, y: 0 }, -// offset: { x: 0, y: 0 } -// } - -/** - * [description] - * - * @function ParseRetroFont - * @since 3.0.0 - * @private - */ -var ParseRetroFont = function (scene, config) -{ - var w = config.width; - var h = config.height; - var cx = Math.floor(w / 2); - var cy = Math.floor(h / 2); - var letters = config.chars; - - var key = GetValue(config, 'image', ''); - var offsetX = GetValue(config, 'offset.x', 0); - var offsetY = GetValue(config, 'offset.y', 0); - var spacingX = GetValue(config, 'spacing.x', 0); - var spacingY = GetValue(config, 'spacing.y', 0); - - var charsPerRow = GetValue(config, 'charsPerRow', null); - - if (charsPerRow === null) - { - charsPerRow = scene.sys.textures.getFrame(key).width / w; - - if (charsPerRow > letters.length) - { - charsPerRow = letters.length; - } - } - - var x = offsetX; - var y = offsetY; - - var data = { - retroFont: true, - font: key, - size: w, - lineHeight: h, - chars: {} - }; - - var r = 0; - - for (var i = 0; i < letters.length; i++) - { - // var node = letters[i]; - - var charCode = letters.charCodeAt(i); - - data.chars[charCode] = - { - x: x, - y: y, - width: w, - height: h, - centerX: cx, - centerY: cy, - xOffset: 0, - yOffset: 0, - xAdvance: w, - data: {}, - kerning: {} - }; - - r++; - - if (r === charsPerRow) - { - r = 0; - x = offsetX; - y += h + spacingY; - } - else - { - x += w + spacingX; - } - } - - var entry = { - data: data, - frame: null, - texture: key - }; - - return entry; -}; - -/** -* Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET1 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - -/** -* Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET2 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - -/** -* Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '; - -/** -* Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789'; - -/** -* Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789'; - -/** -* Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' '; - -/** -* Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET7 = 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39'; - -/** -* Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET8 = '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - -/** -* Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET9 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!'; - -/** -* Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET10 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - -/** -* Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET11 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789'; - -module.exports = ParseRetroFont; - - -/***/ }), -/* 897 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122849,7 +123129,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 898 */ +/* 900 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122881,9 +123161,10 @@ var GameObjects = { Graphics: __webpack_require__(107), Group: __webpack_require__(104), Image: __webpack_require__(66), - Particles: __webpack_require__(882), + Particles: __webpack_require__(885), PathFollower: __webpack_require__(395), RenderTexture: __webpack_require__(226), + RetroFont: __webpack_require__(874), Sprite3D: __webpack_require__(143), Sprite: __webpack_require__(31), Text: __webpack_require__(102), @@ -122951,7 +123232,7 @@ module.exports = GameObjects; /***/ }), -/* 899 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122976,7 +123257,7 @@ module.exports = { /***/ }), -/* 900 */ +/* 902 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123020,7 +123301,7 @@ module.exports = RGBToString; /***/ }), -/* 901 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -123092,7 +123373,7 @@ module.exports = RGBToHSV; /***/ }), -/* 902 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123128,7 +123409,7 @@ module.exports = RandomRGB; /***/ }), -/* 903 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123231,7 +123512,7 @@ module.exports = { /***/ }), -/* 904 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123272,7 +123553,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 905 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123322,7 +123603,7 @@ module.exports = HSLToColor; /***/ }), -/* 906 */ +/* 908 */ /***/ (function(module, exports) { /** @@ -123362,7 +123643,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 907 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -123409,7 +123690,7 @@ module.exports = UserSelect; /***/ }), -/* 908 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -123444,7 +123725,7 @@ module.exports = TouchAction; /***/ }), -/* 909 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123462,14 +123743,14 @@ module.exports = { Interpolation: __webpack_require__(266), Pool: __webpack_require__(22), Smoothing: __webpack_require__(123), - TouchAction: __webpack_require__(908), - UserSelect: __webpack_require__(907) + TouchAction: __webpack_require__(910), + UserSelect: __webpack_require__(909) }; /***/ }), -/* 910 */ +/* 912 */ /***/ (function(module, exports) { /** @@ -123499,7 +123780,7 @@ module.exports = GetOffsetY; /***/ }), -/* 911 */ +/* 913 */ /***/ (function(module, exports) { /** @@ -123529,7 +123810,7 @@ module.exports = GetOffsetX; /***/ }), -/* 912 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123549,8 +123830,8 @@ module.exports = { GetCenterX: __webpack_require__(87), GetCenterY: __webpack_require__(84), GetLeft: __webpack_require__(42), - GetOffsetX: __webpack_require__(911), - GetOffsetY: __webpack_require__(910), + GetOffsetX: __webpack_require__(913), + GetOffsetY: __webpack_require__(912), GetRight: __webpack_require__(40), GetTop: __webpack_require__(38), SetBottom: __webpack_require__(43), @@ -123564,7 +123845,7 @@ module.exports = { /***/ }), -/* 913 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123608,7 +123889,7 @@ module.exports = TopRight; /***/ }), -/* 914 */ +/* 916 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123652,7 +123933,7 @@ module.exports = TopLeft; /***/ }), -/* 915 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123696,7 +123977,7 @@ module.exports = TopCenter; /***/ }), -/* 916 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123740,7 +124021,7 @@ module.exports = RightTop; /***/ }), -/* 917 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123784,7 +124065,7 @@ module.exports = RightCenter; /***/ }), -/* 918 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123828,7 +124109,7 @@ module.exports = RightBottom; /***/ }), -/* 919 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123872,7 +124153,7 @@ module.exports = LeftTop; /***/ }), -/* 920 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123916,7 +124197,7 @@ module.exports = LeftCenter; /***/ }), -/* 921 */ +/* 923 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123960,7 +124241,7 @@ module.exports = LeftBottom; /***/ }), -/* 922 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124004,7 +124285,7 @@ module.exports = BottomRight; /***/ }), -/* 923 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124048,7 +124329,7 @@ module.exports = BottomLeft; /***/ }), -/* 924 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124092,7 +124373,7 @@ module.exports = BottomCenter; /***/ }), -/* 925 */ +/* 927 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124107,24 +124388,24 @@ module.exports = BottomCenter; module.exports = { - BottomCenter: __webpack_require__(924), - BottomLeft: __webpack_require__(923), - BottomRight: __webpack_require__(922), - LeftBottom: __webpack_require__(921), - LeftCenter: __webpack_require__(920), - LeftTop: __webpack_require__(919), - RightBottom: __webpack_require__(918), - RightCenter: __webpack_require__(917), - RightTop: __webpack_require__(916), - TopCenter: __webpack_require__(915), - TopLeft: __webpack_require__(914), - TopRight: __webpack_require__(913) + BottomCenter: __webpack_require__(926), + BottomLeft: __webpack_require__(925), + BottomRight: __webpack_require__(924), + LeftBottom: __webpack_require__(923), + LeftCenter: __webpack_require__(922), + LeftTop: __webpack_require__(921), + RightBottom: __webpack_require__(920), + RightCenter: __webpack_require__(919), + RightTop: __webpack_require__(918), + TopCenter: __webpack_require__(917), + TopLeft: __webpack_require__(916), + TopRight: __webpack_require__(915) }; /***/ }), -/* 926 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124154,7 +124435,7 @@ module.exports = { /***/ }), -/* 927 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124164,7 +124445,7 @@ module.exports = { */ var CONST = __webpack_require__(291); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Display.Align @@ -124172,8 +124453,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(926), - To: __webpack_require__(925) + In: __webpack_require__(928), + To: __webpack_require__(927) }; @@ -124184,7 +124465,7 @@ module.exports = Align; /***/ }), -/* 928 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124199,9 +124480,9 @@ module.exports = Align; module.exports = { - Align: __webpack_require__(927), - Bounds: __webpack_require__(912), - Canvas: __webpack_require__(909), + Align: __webpack_require__(929), + Bounds: __webpack_require__(914), + Canvas: __webpack_require__(911), Color: __webpack_require__(526), Masks: __webpack_require__(522) @@ -124209,7 +124490,7 @@ module.exports = { /***/ }), -/* 929 */ +/* 931 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124349,7 +124630,7 @@ module.exports = MoveTo; /***/ }), -/* 930 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124365,7 +124646,7 @@ var CubicBezierCurve = __webpack_require__(535); var EllipseCurve = __webpack_require__(533); var GameObjectFactory = __webpack_require__(11); var LineCurve = __webpack_require__(532); -var MovePathTo = __webpack_require__(929); +var MovePathTo = __webpack_require__(931); var QuadraticBezierCurve = __webpack_require__(531); var Rectangle = __webpack_require__(12); var SplineCurve = __webpack_require__(529); @@ -125177,7 +125458,7 @@ module.exports = Path; /***/ }), -/* 931 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125198,7 +125479,7 @@ module.exports = Path; */ module.exports = { - Path: __webpack_require__(930), + Path: __webpack_require__(932), CubicBezier: __webpack_require__(535), Curve: __webpack_require__(81), @@ -125210,7 +125491,7 @@ module.exports = { /***/ }), -/* 932 */ +/* 934 */ /***/ (function(module, exports) { /** @@ -125248,7 +125529,7 @@ module.exports = { /***/ }), -/* 933 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -125286,7 +125567,7 @@ module.exports = { /***/ }), -/* 934 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -125324,7 +125605,7 @@ module.exports = { /***/ }), -/* 935 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -125362,7 +125643,7 @@ module.exports = { /***/ }), -/* 936 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125399,16 +125680,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(269), - C64: __webpack_require__(935), - CGA: __webpack_require__(934), - JMP: __webpack_require__(933), - MSX: __webpack_require__(932) + C64: __webpack_require__(937), + CGA: __webpack_require__(936), + JMP: __webpack_require__(935), + MSX: __webpack_require__(934) }; /***/ }), -/* 937 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125424,13 +125705,13 @@ module.exports = { module.exports = { GenerateTexture: __webpack_require__(270), - Palettes: __webpack_require__(936) + Palettes: __webpack_require__(938) }; /***/ }), -/* 938 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125714,7 +125995,7 @@ module.exports = CameraManager; /***/ }), -/* 939 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125730,7 +126011,7 @@ module.exports = CameraManager; module.exports = { Camera: __webpack_require__(273), - CameraManager: __webpack_require__(938), + CameraManager: __webpack_require__(940), OrthographicCamera: __webpack_require__(537), PerspectiveCamera: __webpack_require__(536) @@ -125738,7 +126019,7 @@ module.exports = { /***/ }), -/* 940 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125779,7 +126060,7 @@ module.exports = { /***/ }), -/* 941 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125794,15 +126075,15 @@ module.exports = { module.exports = { - Controls: __webpack_require__(940), + Controls: __webpack_require__(942), Scene2D: __webpack_require__(550), - Sprite3D: __webpack_require__(939) + Sprite3D: __webpack_require__(941) }; /***/ }), -/* 942 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125851,7 +126132,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 943 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -125886,7 +126167,7 @@ module.exports = ToggleVisible; /***/ }), -/* 944 */ +/* 946 */ /***/ (function(module, exports) { /** @@ -125940,7 +126221,7 @@ module.exports = Spread; /***/ }), -/* 945 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125996,7 +126277,7 @@ module.exports = SmoothStep; /***/ }), -/* 946 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126052,7 +126333,7 @@ module.exports = SmootherStep; /***/ }), -/* 947 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126085,7 +126366,7 @@ module.exports = Shuffle; /***/ }), -/* 948 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126213,7 +126494,7 @@ module.exports = ShiftPosition; /***/ }), -/* 949 */ +/* 951 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126254,7 +126535,7 @@ module.exports = SetY; /***/ }), -/* 950 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126301,7 +126582,7 @@ module.exports = SetXY; /***/ }), -/* 951 */ +/* 953 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126342,7 +126623,7 @@ module.exports = SetX; /***/ }), -/* 952 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126380,7 +126661,7 @@ module.exports = SetVisible; /***/ }), -/* 953 */ +/* 955 */ /***/ (function(module, exports) { /** @@ -126419,7 +126700,7 @@ module.exports = SetTint; /***/ }), -/* 954 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126460,7 +126741,7 @@ module.exports = SetScaleY; /***/ }), -/* 955 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126501,7 +126782,7 @@ module.exports = SetScaleX; /***/ }), -/* 956 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126548,7 +126829,7 @@ module.exports = SetScale; /***/ }), -/* 957 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126589,7 +126870,7 @@ module.exports = SetRotation; /***/ }), -/* 958 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126636,7 +126917,7 @@ module.exports = SetOrigin; /***/ }), -/* 959 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -126673,7 +126954,7 @@ module.exports = SetHitArea; /***/ }), -/* 960 */ +/* 962 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126714,7 +126995,7 @@ module.exports = SetDepth; /***/ }), -/* 961 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126754,7 +127035,7 @@ module.exports = SetBlendMode; /***/ }), -/* 962 */ +/* 964 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126795,7 +127076,7 @@ module.exports = SetAlpha; /***/ }), -/* 963 */ +/* 965 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126836,7 +127117,7 @@ module.exports = ScaleY; /***/ }), -/* 964 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126883,7 +127164,7 @@ module.exports = ScaleXY; /***/ }), -/* 965 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126924,7 +127205,7 @@ module.exports = ScaleX; /***/ }), -/* 966 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126973,7 +127254,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 967 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127019,7 +127300,7 @@ module.exports = RotateAround; /***/ }), -/* 968 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127060,7 +127341,7 @@ module.exports = Rotate; /***/ }), -/* 969 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127098,7 +127379,7 @@ module.exports = RandomTriangle; /***/ }), -/* 970 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127136,7 +127417,7 @@ module.exports = RandomRectangle; /***/ }), -/* 971 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127174,7 +127455,7 @@ module.exports = RandomLine; /***/ }), -/* 972 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127212,7 +127493,7 @@ module.exports = RandomEllipse; /***/ }), -/* 973 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127250,7 +127531,7 @@ module.exports = RandomCircle; /***/ }), -/* 974 */ +/* 976 */ /***/ (function(module, exports) { /** @@ -127260,7 +127541,7 @@ module.exports = RandomCircle; */ /** - * [description] + * Play an animation with the given key, starting at the given startFrame on all Game Objects in items. * * @function Phaser.Actions.PlayAnimation * @since 3.0.0 @@ -127268,8 +127549,8 @@ module.exports = RandomCircle; * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] * * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. - * @param {string} key - [description] - * @param {(string|integer)} [startFrame] - [description] + * @param {string} key - The name of the animation to play. + * @param {(string|integer)} [startFrame] - The starting frame of the animation with the given key. * * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action. */ @@ -127287,7 +127568,7 @@ module.exports = PlayAnimation; /***/ }), -/* 975 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127347,7 +127628,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 976 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127408,7 +127689,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 977 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127452,7 +127733,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 978 */ +/* 980 */ /***/ (function(module, exports) { /** @@ -127502,7 +127783,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 979 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -127549,7 +127830,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 980 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127590,7 +127871,7 @@ module.exports = IncY; /***/ }), -/* 981 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127637,7 +127918,7 @@ module.exports = IncXY; /***/ }), -/* 982 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127678,7 +127959,7 @@ module.exports = IncX; /***/ }), -/* 983 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127719,7 +128000,7 @@ module.exports = IncAlpha; /***/ }), -/* 984 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127843,7 +128124,7 @@ module.exports = GridAlign; /***/ }), -/* 985 */ +/* 987 */ /***/ (function(module, exports) { /** @@ -127901,7 +128182,7 @@ module.exports = GetLast; /***/ }), -/* 986 */ +/* 988 */ /***/ (function(module, exports) { /** @@ -127959,7 +128240,7 @@ module.exports = GetFirst; /***/ }), -/* 987 */ +/* 989 */ /***/ (function(module, exports) { /** @@ -128004,7 +128285,7 @@ module.exports = Call; /***/ }), -/* 988 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128045,8 +128326,6 @@ module.exports = Angle; /***/ }), -/* 989 */, -/* 990 */, /* 991 */, /* 992 */, /* 993 */, @@ -128064,7 +128343,9 @@ module.exports = Angle; /* 1005 */, /* 1006 */, /* 1007 */, -/* 1008 */ +/* 1008 */, +/* 1009 */, +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -128076,7 +128357,7 @@ module.exports = Angle; __webpack_require__(596); var CONST = __webpack_require__(19); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser @@ -128087,16 +128368,16 @@ var Phaser = { Actions: __webpack_require__(586), Animation: __webpack_require__(554), Cache: __webpack_require__(553), - Cameras: __webpack_require__(941), + Cameras: __webpack_require__(943), Class: __webpack_require__(0), - Create: __webpack_require__(937), - Curves: __webpack_require__(931), + Create: __webpack_require__(939), + Curves: __webpack_require__(933), Data: __webpack_require__(528), - Display: __webpack_require__(928), - DOM: __webpack_require__(899), + Display: __webpack_require__(930), + DOM: __webpack_require__(901), EventEmitter: __webpack_require__(518), Game: __webpack_require__(517), - GameObjects: __webpack_require__(898), + GameObjects: __webpack_require__(900), Geom: __webpack_require__(377), Input: __webpack_require__(361), Loader: __webpack_require__(744), diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index d95e8abef..7d4846615 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=1008)}([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){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,i){var n=i(15),s=i(4);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){"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(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(574),Animation:i(295),BlendMode:i(573),ComputedSize:i(572),Depth:i(571),Flip:i(570),GetBounds:i(569),MatrixStack:i(568),Origin:i(567),Pipeline:i(283),ScaleMode:i(566),ScrollFactor:i(565),Size:i(564),Texture:i(563),Tint:i(562),ToJSON:i(561),Transform:i(560),TransformMatrix:i(60),Visible:i(559)}},function(t,e,i){var n=i(289),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){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_WAITING_LINKFILE:15,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,TEXTURE_ATLAS_JSON_ARRAY:20,TEXTURE_ATLAS_JSON_HASH:21}},function(t,e,i){var n=i(292),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);uo.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={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;ns||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(144),r=i(278),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={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},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,i){var n=i(0),s=i(14),r=i(1),o=i(540),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),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=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=i(132),s=i(20);t.exports=function(t,e,i,r,o){for(var a=null,h=null,u=null,l=null,c=s(t,e,i,r,null,o),d=0;d=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(430);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=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}},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){var e=this.matrix,i=t.matrix,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=i[0],l=i[1],c=i[2],d=i[3],f=i[4],p=i[5];return e[0]=u*n+l*r,e[1]=u*s+l*o,e[2]=c*n+d*r,e[3]=c*s+d*o,e[4]=f*n+p*r+a,e[5]=f*s+p*o+h,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},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},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=n},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(14),r=i(366),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){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(0),s=i(56),r=i(219),o=i(218),a=i(92),h=i(145),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(1),o=i(438),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=a},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(96),s=i(8),r=i(58),o=i(59),a=i(69),h=i(155),u=i(98),l=i(4),c=i(97),d=i(95),f=i(94);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=[],E=0;E=t.length)){for(var i=t.length-1,n=t[e],s=e;s=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:r,onBlur:r,onFocus:r,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=o},function(t,e,i){var n,s=i(53),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,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,i){var n=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.blockSet=!1,this._frozen=!1,this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){return this.list[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if(this.events.listenerCount("changedata")>0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(a=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,i){var n=i(0),s=i(268),r=i(12),o=i(6),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){"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(30),r=i(290),o=i(288),a=i(149),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){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(140),s=i(0),r=i(3),o=i(79),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(47);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(285),r=i(148),o=i(147),a=i(6),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(11),o=i(57),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)))}},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(4);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(2),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(2),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]+" ")}r0&&(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.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(),resolution:this.resolution,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)}});t.exports=p},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(586),s=i(0),r=i(2),o=i(4),a=i(246),h=i(75),u=i(31),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(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&&void 0!==i.key&&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]);for(var e=[],i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i-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),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.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,d.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},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){return t?this.resume():this.pause()},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)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(){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)},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;e-m||T>-y||b-m||A>-y||Sl&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),this.shakeEffect.preRender()},removeBounds:function(){return this.useBounds=!1,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=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,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){return this.scene=t,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),this.zoom=t,this},startFollow:function(t,e){return void 0===e&&(e=!1),this._follow=t,this.roundPixels=e,this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e)},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.resetFX(),this.matrix.destroy(),this.culledObjects=[],this.target=void 0,this._bounds=void 0,this.scene=void 0}});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(17),r=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.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},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,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()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(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=s(!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}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(192),r=i(509),o=i(508),a=i(25),h=i(80),u=new n({Extends:h,Mixins:[s],initialize:function(t){h.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:o,fragShader:t.fragShader?t.fragShader:r,vertexCapacity:t.vertexCapacity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+2*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:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:4*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=2e3,this.batches=[],this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var n=i[i.length-1];return e>0?(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},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){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},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s,r,o,a=this.renderer.config.roundPixels,h=t.emitters.list,u=h.length,l=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=this.maxQuads,p=e.scrollX,g=e.scrollY,v=e.matrix.matrix,m=v[0],y=v[1],x=v[2],w=v[3],b=v[4],T=v[5],S=Math.sin,A=Math.cos,C=this.vertexComponentCount,M=this.vertexCapacity,E=t.defaultFrame.source.glTexture;if(n){var _=n[0],L=n[1],P=n[2],F=n[3],R=n[4];s=m*L+y*F,r=x*L+w*F,o=b*L+T*F+n[5],m=m*_+y*P,y=s,x=x*_+w*P,w=r,b=b*_+T*P+R,T=o}this.setTexture2D(E,0);for(var k=0;k=M&&(this.flush(),this.setTexture2D(E,0));for(var N=0;N=M&&(this.flush(),this.setTexture2D(E,0))}}Y+=G,I-=G,this.vertexCount>=M&&(this.flush(),this.setTexture2D(E,0))}}}this.setTexture2D(E,0)},drawBlitter:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s=this.renderer.config.roundPixels,r=a.getTintAppendFloatAlpha,o=this.vertexViewF32,h=this.vertexViewU32,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),b=0,T=t.x-y,S=t.y-x;if(n){var A=n[0],C=n[1],M=n[2],E=n[3],_=n[4],L=d*C+f*E,P=p*C+g*E,F=v*C+m*E+n[5];d=d*A+f*M,f=L,p=p*A+g*M,g=P,v=v*A+m*M+_,m=F}for(var R=0;R=this.vertexCapacity&&this.flush()}b+=k,l-=k,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,u,l,c=this.renderer.config.roundPixels,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=e.matrix.matrix,v=t.frame,m=v.texture.source[v.sourceIndex].glTexture,y=!!m.isRenderTexture,x=t.flipX,w=t.flipY^y,b=v.uvs,T=v.width*(x?-1:1),S=v.height*(w?-1:1),A=-t.displayOriginX+v.x+v.width*(x?1:0),C=-t.displayOriginY+v.y+v.height*(w?1:0),M=(c?0|A:A)+T,E=(c?0|C:C)+S,_=t.x-e.scrollX*t.scrollFactorX,L=t.y-e.scrollY*t.scrollFactorY,P=t.scaleX,F=t.scaleY,R=-t.rotation,k=t._alphaTL,O=t._alphaTR,D=t._alphaBL,I=t._alphaBR,B=t._tintTL,Y=t._tintTR,X=t._tintBL,z=t._tintBR,N=Math.sin(R),G=Math.cos(R),W=G*P,U=-N*P,V=N*F,H=G*F,j=_,q=L,K=g[0],J=g[1],Z=g[2],Q=g[3],$=g[4],tt=g[5];if(n){var et=n[0],it=n[1],nt=n[2],st=n[3],rt=K*et+J*nt,ot=K*it+J*st,at=Z*et+Q*nt,ht=Z*it+Q*st;s=W*rt+U*at,r=W*ot+U*ht,o=V*rt+H*at,h=V*ot+H*ht,u=j*rt+q*at+($*et+tt*nt+n[4]),l=j*ot+q*ht+($*it+tt*st+n[5])}else s=W*K+U*Z,r=W*J+U*Q,o=V*K+H*Z,h=V*J+H*Q,u=j*K+q*Z+$,l=j*J+q*Q+tt;var ut,lt=A*s+C*o+u,ct=A*r+C*h+l,dt=A*s+E*o+u,ft=A*r+E*h+l,pt=M*s+E*o+u,gt=M*r+E*h+l,vt=M*s+C*o+u,mt=M*r+C*h+l,yt=d(B,k),xt=d(Y,O),wt=d(X,D),bt=d(z,I);c&&(lt|=0,ct|=0,dt|=0,ft|=0,pt|=0,gt|=0,vt|=0,mt|=0),this.setTexture2D(m,0),f[(ut=this.vertexCount*this.vertexComponentCount)+0]=lt,f[ut+1]=ct,f[ut+2]=b.x0,f[ut+3]=b.y0,p[ut+4]=yt,f[ut+5]=dt,f[ut+6]=ft,f[ut+7]=b.x1,f[ut+8]=b.y1,p[ut+9]=wt,f[ut+10]=pt,f[ut+11]=gt,f[ut+12]=b.x2,f[ut+13]=b.y2,p[ut+14]=bt,f[ut+15]=lt,f[ut+16]=ct,f[ut+17]=b.x0,f[ut+18]=b.y0,p[ut+19]=yt,f[ut+20]=pt,f[ut+21]=gt,f[ut+22]=b.x2,f[ut+23]=b.y2,p[ut+24]=bt,f[ut+25]=vt,f[ut+26]=mt,f[ut+27]=b.x3,f[ut+28]=b.y3,p[ut+29]=xt,this.vertexCount+=6},batchMesh:function(t,e,i){var n=null;i&&(n=i.matrix);var s=t.vertices,r=s.length,o=r/2|0;this.renderer.setPipeline(this),this.vertexCount+o>this.vertexCapacity&&this.flush();var h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=a.getTintAppendFloatAlpha,v=t.uv,m=t.colors,y=t.alphas,x=this.vertexViewF32,w=this.vertexViewU32,b=e.matrix.matrix,T=t.frame,S=t.texture.source[T.sourceIndex].glTexture,A=t.x-e.scrollX*t.scrollFactorX,C=t.y-e.scrollY*t.scrollFactorY,M=t.scaleX,E=t.scaleY,_=-t.rotation,L=Math.sin(_),P=Math.cos(_),F=P*M,R=-L*M,k=L*E,O=P*E,D=A,I=C,B=b[0],Y=b[1],X=b[2],z=b[3],N=b[4],G=b[5],W=0;if(n){var U=n[0],V=n[1],H=n[2],j=n[3],q=B*U+Y*H,K=B*V+Y*j,J=X*U+z*H,Z=X*V+z*j;h=F*q+R*J,u=F*K+R*Z,l=k*q+O*J,c=k*K+O*Z,d=D*q+I*J+(N*U+G*H+n[4]),f=D*K+I*Z+(N*V+G*j+n[5])}else h=F*B+R*X,u=F*Y+R*z,l=k*B+O*X,c=k*Y+O*z,d=D*B+I*X+N,f=D*Y+I*z+G;this.setTexture2D(S,0),W=this.vertexCount*this.vertexComponentCount;for(var Q=0,$=0;Qthis.vertexCapacity&&this.flush();var s,r,o,h,u,l,c,d,f,p,g,v,m,y,x=this.renderer.config.roundPixels,w=t.text,b=w.length,T=a.getTintAppendFloatAlpha,S=this.vertexViewF32,A=this.vertexViewU32,C=e.matrix.matrix,M=e.width+50,E=e.height+50,_=t.frame,L=t.texture.source[_.sourceIndex],P=e.scrollX*t.scrollFactorX,F=e.scrollY*t.scrollFactorY,R=t.fontData,k=R.lineHeight,O=t.fontSize/R.size,D=R.chars,I=t.alpha,B=T(t._tintTL,I),Y=T(t._tintTR,I),X=T(t._tintBL,I),z=T(t._tintBR,I),N=t.x,G=t.y,W=_.cutX,U=_.cutY,V=L.width,H=L.height,j=L.glTexture,q=0,K=0,J=0,Z=0,Q=null,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,ut=0,lt=0,ct=null,dt=0,ft=N-P+_.x,pt=G-F+_.y,gt=-t.rotation,vt=t.scaleX,mt=t.scaleY,yt=t.letterSpacing,xt=Math.sin(gt),wt=Math.cos(gt),bt=wt*vt,Tt=-xt*vt,St=xt*mt,At=wt*mt,Ct=ft,Mt=pt,Et=C[0],_t=C[1],Lt=C[2],Pt=C[3],Ft=C[4],Rt=C[5],kt=0;if(n){var Ot=n[0],Dt=n[1],It=n[2],Bt=n[3],Yt=Et*Ot+_t*It,Xt=Et*Dt+_t*Bt,zt=Lt*Ot+Pt*It,Nt=Lt*Dt+Pt*Bt;f=bt*Yt+Tt*zt,p=bt*Xt+Tt*Nt,g=St*Yt+At*zt,v=St*Xt+At*Nt,m=Ct*Yt+Mt*zt+(Ft*Ot+Rt*It+n[4]),y=Ct*Xt+Mt*Nt+(Ft*Dt+Rt*Bt+n[5])}else f=bt*Et+Tt*Lt,p=bt*_t+Tt*Pt,g=St*Et+At*Lt,v=St*_t+At*Pt,m=Ct*Et+Mt*Lt+Ft,y=Ct*_t+Mt*Pt+Rt;this.setTexture2D(j,0);for(var Gt=0;GtM||r<-50||r>E)&&(o<-50||o>M||h<-50||h>E)&&(u<-50||u>M||l<-50||l>E)&&(c<-50||c>M||d<-50||d>E)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),kt=this.vertexCount*this.vertexComponentCount,x&&(s|=0,r|=0,o|=0,h|=0,u|=0,l|=0,c|=0,d|=0),S[kt+0]=s,S[kt+1]=r,S[kt+2]=at,S[kt+3]=ut,A[kt+4]=B,S[kt+5]=o,S[kt+6]=h,S[kt+7]=at,S[kt+8]=lt,A[kt+9]=X,S[kt+10]=u,S[kt+11]=l,S[kt+12]=ht,S[kt+13]=lt,A[kt+14]=z,S[kt+15]=s,S[kt+16]=r,S[kt+17]=at,S[kt+18]=ut,A[kt+19]=B,S[kt+20]=u,S[kt+21]=l,S[kt+22]=ht,S[kt+23]=lt,A[kt+24]=z,S[kt+25]=c,S[kt+26]=d,S[kt+27]=ht,S[kt+28]=ut,A[kt+29]=Y,this.vertexCount+=6))}}else q=0,J=0,K+=k,ct=null},batchDynamicBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,u,l,c,d,f,p,g,v,m,y,x,w,b,T,S,A,C=this.renderer.config.roundPixels,M=t.displayCallback,E=t.text,_=E.length,L=a.getTintAppendFloatAlpha,P=this.vertexViewF32,F=this.vertexViewU32,R=this.renderer,k=e.matrix.matrix,O=t.frame,D=t.texture.source[O.sourceIndex],I=e.scrollX*t.scrollFactorX,B=e.scrollY*t.scrollFactorY,Y=t.scrollX,X=t.scrollY,z=t.fontData,N=z.lineHeight,G=t.fontSize/z.size,W=z.chars,U=t.alpha,V=L(t._tintTL,U),H=L(t._tintTR,U),j=L(t._tintBL,U),q=L(t._tintBR,U),K=t.x,J=t.y,Z=O.cutX,Q=O.cutY,$=D.width,tt=D.height,et=D.glTexture,it=0,nt=0,st=0,rt=0,ot=null,at=0,ht=0,ut=0,lt=0,ct=0,dt=0,ft=0,pt=0,gt=0,vt=0,mt=0,yt=0,xt=null,wt=0,bt=K+O.x,Tt=J+O.y,St=-t.rotation,At=t.scaleX,Ct=t.scaleY,Mt=t.letterSpacing,Et=Math.sin(St),_t=Math.cos(St),Lt=_t*At,Pt=-Et*At,Ft=Et*Ct,Rt=_t*Ct,kt=bt,Ot=Tt,Dt=k[0],It=k[1],Bt=k[2],Yt=k[3],Xt=k[4],zt=k[5],Nt=t.cropWidth>0||t.cropHeight>0,Gt=0;if(n){var Wt=n[0],Ut=n[1],Vt=n[2],Ht=n[3],jt=Dt*Wt+It*Vt,qt=Dt*Ut+It*Ht,Kt=Bt*Wt+Yt*Vt,Jt=Bt*Ut+Yt*Ht;x=Lt*jt+Pt*Kt,w=Lt*qt+Pt*Jt,b=Ft*jt+Rt*Kt,T=Ft*qt+Rt*Jt,S=kt*jt+Ot*Kt+(Xt*Wt+zt*Vt+n[4]),A=kt*qt+Ot*Jt+(Xt*Ut+zt*Ht+n[5])}else x=Lt*Dt+Pt*Bt,w=Lt*It+Pt*Yt,b=Ft*Dt+Rt*Bt,T=Ft*It+Rt*Yt,S=kt*Dt+Ot*Bt+Xt,A=kt*It+Ot*Yt+zt;this.setTexture2D(et,0),Nt&&R.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var Zt=0;Zt<_;++Zt)if(G=t.fontSize/t.fontData.size,St=0,10!==(rt=E.charCodeAt(Zt))){if(ot=W[rt]){if(at=Z+ot.x,ht=Q+ot.y,ut=ot.width,lt=ot.height,ct=st+ot.xOffset+it-Y,dt=ot.yOffset+nt-X,null!==xt){var Qt=ot.kerning[wt];ct+=void 0!==Qt?Qt:0}if(it+=ot.xAdvance+Mt,st+=1,xt=ot,wt=rt,0!==ut&&0!==lt&&32!==rt){if(M){var $t=M({color:0,tint:{topLeft:V,topRight:H,bottomLeft:j,bottomRight:q},index:Zt,charCode:rt,x:ct,y:dt,scale:G,rotation:0,data:ot.data});ct=$t.x,dt=$t.y,G=$t.scale,St=$t.rotation,$t.color?(V=$t.color,H=$t.color,j=$t.color,q=$t.color):(V=$t.tint.topLeft,H=$t.tint.topRight,j=$t.tint.bottomLeft,q=$t.tint.bottomRight),V=L(V,U),H=L(H,U),j=L(j,U),q=L(q,U)}ct-=t.displayOriginX,dt-=t.displayOriginY,ct*=G,dt*=G,ct-=I,dt-=B,Et=Math.sin(-St),_t=Math.cos(-St),s=kt=(m=ct)*x+(y=dt)*b+S,r=Ot=m*w+y*T+A,o=(pt=lt)*(Ft=(g=Et*G)*x+(v=_t*G)*b)+kt,h=pt*(Rt=g*w+v*T)+Ot,u=(ft=ut)*(Lt=(f=_t*G)*x+(p=-Et*G)*b)+pt*Ft+kt,l=ft*(Pt=f*w+p*T)+pt*Rt+Ot,c=ft*Lt+kt,d=ft*Pt+Ot,gt=at/$,vt=(at+ut)/$,mt=ht/tt,yt=(ht+lt)/tt,this.vertexCount+6>this.vertexCapacity&&this.flush(),Gt=this.vertexCount*this.vertexComponentCount,C&&(s|=0,r|=0,o|=0,h|=0,u|=0,l|=0,c|=0,d|=0),P[Gt+0]=s,P[Gt+1]=r,P[Gt+2]=gt,P[Gt+3]=mt,F[Gt+4]=V,P[Gt+5]=o,P[Gt+6]=h,P[Gt+7]=gt,P[Gt+8]=yt,F[Gt+9]=j,P[Gt+10]=u,P[Gt+11]=l,P[Gt+12]=vt,P[Gt+13]=yt,F[Gt+14]=q,P[Gt+15]=s,P[Gt+16]=r,P[Gt+17]=gt,P[Gt+18]=mt,F[Gt+19]=V,P[Gt+20]=u,P[Gt+21]=l,P[Gt+22]=vt,P[Gt+23]=yt,F[Gt+24]=q,P[Gt+25]=c,P[Gt+26]=d,P[Gt+27]=vt,P[Gt+28]=mt,F[Gt+29]=H,this.vertexCount+=6}}}else it=0,st=0,nt+=N,xt=null;Nt&&R.popScissor()},batchText:function(t,e,i){var n=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),0,0,e,i)},batchDynamicTilemapLayer:function(t,e,i){for(var n=t.culledTiles,s=n.length,r=t.tileset.image.get().source.glTexture,o=t.tileset,h=t.scrollFactorX,u=t.scrollFactorY,l=t.alpha,c=t.x,d=t.y,f=t.scaleX,p=t.scaleY,g=a.getTintAppendFloatAlpha,v=0;vthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,l=-l;var P,F,R,k,O,D,I=this.renderer.config.roundPixels,B=this.vertexViewF32,Y=this.vertexViewU32,X=E.matrix.matrix,z=o*(c?1:0)-g,N=a*(d?1:0)-v,G=z+o*(c?-1:1),W=N+a*(d?-1:1),U=s-E.scrollX*f,V=r-E.scrollY*p,H=Math.sin(l),j=Math.cos(l),q=j*h,K=-H*h,J=H*u,Z=j*u,Q=U,$=V,tt=X[0],et=X[1],it=X[2],nt=X[3],st=X[4],rt=X[5];if(L){var ot=L[0],at=L[1],ht=L[2],ut=L[3],lt=tt*ot+et*ht,ct=tt*at+et*ut,dt=it*ot+nt*ht,ft=it*at+nt*ut;P=q*lt+K*dt,F=q*ct+K*ft,R=J*lt+Z*dt,k=J*ct+Z*ft,O=Q*lt+$*dt+(st*ot+rt*ht+L[4]),D=Q*ct+$*ft+(st*at+rt*ut+L[5])}else P=q*tt+K*it,F=q*et+K*nt,R=J*tt+Z*it,k=J*et+Z*nt,O=Q*tt+$*it+st,D=Q*et+$*nt+rt;var pt,gt=z*P+N*R+O,vt=z*F+N*k+D,mt=z*P+W*R+O,yt=z*F+W*k+D,xt=G*P+W*R+O,wt=G*F+W*k+D,bt=G*P+N*R+O,Tt=G*F+N*k+D,St=m/i+C,At=y/n+M,Ct=(m+x)/i+C,Mt=(y+w)/n+M;this.setTexture2D(e,0),pt=this.vertexCount*this.vertexComponentCount,I&&(gt|=0,vt|=0,mt|=0,yt|=0,xt|=0,wt|=0,bt|=0,Tt|=0),B[pt+0]=gt,B[pt+1]=vt,B[pt+2]=St,B[pt+3]=At,Y[pt+4]=b,B[pt+5]=mt,B[pt+6]=yt,B[pt+7]=St,B[pt+8]=Mt,Y[pt+9]=T,B[pt+10]=xt,B[pt+11]=wt,B[pt+12]=Ct,B[pt+13]=Mt,Y[pt+14]=S,B[pt+15]=gt,B[pt+16]=vt,B[pt+17]=St,B[pt+18]=At,Y[pt+19]=b,B[pt+20]=xt,B[pt+21]=wt,B[pt+22]=Ct,B[pt+23]=Mt,Y[pt+24]=S,B[pt+25]=bt,B[pt+26]=Tt,B[pt+27]=Ct,B[pt+28]=At,Y[pt+29]=A,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,o,h,u,l,c){var d=null;c&&(d=c.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var f=this.renderer.config.roundPixels,p=this.vertexViewF32,g=this.vertexViewU32,v=e,m=i,y=v+h,x=m+u,w=l[0],b=l[1],T=l[2],S=l[3],A=l[4],C=l[5];if(d){var M=d[0],E=d[1],_=d[2],L=d[3],P=d[4],F=w*E+b*L,R=T*E+S*L,k=A*E+C*L+d[5];w=w*M+b*_,b=F,T=T*M+S*_,S=R,A=A*M+C*_+P,C=k}var O,D=v*w+m*T+A,I=v*b+m*S+C,B=v*w+x*T+A,Y=v*b+x*S+C,X=y*w+x*T+A,z=y*b+x*S+C,N=y*w+m*T+A,G=y*b+m*S+C,W=t.width,U=t.height,V=r/W,H=o/U,j=(r+h)/W,q=(o+u)/U;n=a.getTintAppendFloatAlpha(n,s),this.setTexture2D(t,0),O=this.vertexCount*this.vertexComponentCount,f&&(D|=0,I|=0,B|=0,Y|=0,X|=0,z|=0,N|=0,G|=0),p[O+0]=D,p[O+1]=I,p[O+2]=V,p[O+3]=H,g[O+4]=n,p[O+5]=B,p[O+6]=Y,p[O+7]=V,p[O+8]=q,g[O+9]=n,p[O+10]=X,p[O+11]=z,p[O+12]=j,p[O+13]=q,g[O+14]=n,p[O+15]=D,p[O+16]=I,p[O+17]=V,p[O+18]=H,g[O+19]=n,p[O+20]=X,p[O+21]=z,p[O+22]=j,p[O+23]=q,g[O+24]=n,p[O+25]=N,p[O+26]=G,p[O+27]=j,p[O+28]=H,g[O+29]=n,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=u},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===i&&(i=!0),e&&("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e)),n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},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(93),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.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(1),o=i(847),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,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"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),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.length=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(67),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(48),s=i(83),r=i(30),o=i(0),a=i(14),h=i(1),u=i(12),l=i(28),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},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},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(9),r=i(68),o=i(57),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=i(0),s=i(18),r=i(2),o=i(117),a=new n({Extends:s,initialize:function(t,e,i,n){this.locked="ontouchstart"in window,this.loaded=!1;var o={type:"audio",extension:r(e,"type",""),key:t,url:r(e,"uri",e),path:i,config:n};s.call(this,o)},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t0&&e.cameraFilter&r._id)){var u=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,c=e.x,d=e.y,f=e.scaleX,p=e.scaleY,g=e.rotation,v=e.commandBuffer,m=a||t.currentContext,y=1,x=1,w=0,b=0,T=1,S=0,A=0,C=0;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,m.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,m.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),m.save(),o){var M=o.matrix;m.transform(M[0],M[1],M[2],M[3],M[4],M[5])}m.translate(c-u,d-l),m.rotate(g),m.scale(f,p),m.fillStyle="#fff",m.globalAlpha=e.alpha;for(var E=0,_=v.length;E<_;++E)switch(v[E]){case n.ARC:m.arc(v[E+1],v[E+2],v[E+3],v[E+4],v[E+5],v[E+6]),E+=6;break;case n.LINE_STYLE:T=v[E+1],w=v[E+2],y=v[E+3],S=(16711680&w)>>>16,A=(65280&w)>>>8,C=255&w,m.strokeStyle="rgba("+S+","+A+","+C+","+y+")",m.lineWidth=T,E+=3;break;case n.FILL_STYLE:b=v[E+1],x=v[E+2],S=(16711680&b)>>>16,A=(65280&b)>>>8,C=255&b,m.fillStyle="rgba("+S+","+A+","+C+","+x+")",E+=2;break;case n.BEGIN_PATH:m.beginPath();break;case n.CLOSE_PATH:m.closePath();break;case n.FILL_PATH:h||m.fill();break;case n.STROKE_PATH:h||m.stroke();break;case n.FILL_RECT:h?m.rect(v[E+1],v[E+2],v[E+3],v[E+4]):m.fillRect(v[E+1],v[E+2],v[E+3],v[E+4]),E+=4;break;case n.FILL_TRIANGLE:m.beginPath(),m.moveTo(v[E+1],v[E+2]),m.lineTo(v[E+3],v[E+4]),m.lineTo(v[E+5],v[E+6]),m.closePath(),h||m.fill(),E+=6;break;case n.STROKE_TRIANGLE:m.beginPath(),m.moveTo(v[E+1],v[E+2]),m.lineTo(v[E+3],v[E+4]),m.lineTo(v[E+5],v[E+6]),m.closePath(),h||m.stroke(),E+=6;break;case n.LINE_TO:m.lineTo(v[E+1],v[E+2]),E+=2;break;case n.MOVE_TO:m.moveTo(v[E+1],v[E+2]),E+=2;break;case n.LINE_FX_TO:m.lineTo(v[E+1],v[E+2]),E+=5;break;case n.MOVE_FX_TO:m.moveTo(v[E+1],v[E+2]),E+=5;break;case n.SAVE:m.save();break;case n.RESTORE:m.restore();break;case n.TRANSLATE:m.translate(v[E+1],v[E+2]),E+=2;break;case n.SCALE:m.scale(v[E+1],v[E+2]),E+=2;break;case n.ROTATE:m.rotate(v[E+1]),E+=1}m.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(161),s=i(105),r=i(61),o=i(15);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,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var o=i?i+r.toString():r.toString();n&&(o=o.concat(n)),s.push(o)}else s.push(r);return s}},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){var n=i(0),s=i(19),r=i(121),o=i(55),a=new n({initialize:function(t,e,i,n){var s=t.manager.game;this.texture=t,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.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){t.config.renderType===s.WEBGL&&(this.glTexture=t.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.pixelArt&&this.setFilter(1)},setFilter:function(t){var e=this.texture.manager.game;e.config.renderType===s.WEBGL&&e.renderer.setTextureFilter(this.glTexture,t)},destroy:function(){this.texture=null,this.image=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(119),r=i(167),o=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.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},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(73),s=i(0),r=i(175),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=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(){if(this.locked="ontouchstart"in window,this.locked){this.lockedActionsQueue=[];var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.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.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(en&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i=0;t--){this.scenes[t].sys.destroy()}this.update=o,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.startListeners()},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},s={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("touchstart",t,s),i.addEventListener("touchmove",t,s),i.addEventListener("touchend",t,s)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("touchstart",t,n),i.addEventListener("touchmove",t,n),i.addEventListener("touchend",t,n)),this.handler=t},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.handler),t.removeEventListener("touchmove",this.handler),t.removeEventListener("touchend",this.handler)},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new s,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.dragState=0,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.movementX=0,this.movementY=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},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}},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},touchmove:function(t){this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.dirty=!0,this.wasTouch=!1},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){this.buttons=1,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},touchend:function(t,e){this.buttons=0,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return 1&this.buttons},rightButtonDown:function(){return 2&this.buttons},middleButtonDown:function(){return 4&this.buttons},backButtonDown:function(){return 8&this.buttons},forwardButtonDown:function(){return 16&this.buttons},destroy:function(){this.camera=null,this.manager=null,this.position=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(112),r=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler,this.locked=!1},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},pointerLockChange:function(t){var e=this.target;this.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,this.manager.queue.push(t)},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},r={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("mousemove",t,r),i.addEventListener("mousedown",t,r),i.addEventListener("mouseup",t,r)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("mousemove",t,n),i.addEventListener("mousedown",t,n),i.addEventListener("mouseup",t,n)),this.handler=t,s.pointerLock&&(this.pointerLockChange=this.pointerLockChange.bind(this),document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.handler),t.removeEventListener("mousedown",this.handler),t.removeEventListener("mouseup",this.handler),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=i(501),o=i(499),a=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});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)=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=this.game.config.resolution,c=this._tempMatrix,f=0;fe.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(23),s=i(0),r=i(200),o=i(199),a=i(4),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),t.updateFrame(this.frames[e])},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,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),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.forward=!0,t.updateFrame(t.currentFrame.nextFrame),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)},_initFormat:function(t){t=t.map(function(t){return t.substring(1)});var e=function(t){return function(e,i){return e[t]-i[t]}};this.compareMinX=e(t[0]),this.compareMinY=e(t[1]),this.toBBox=function(e){return{minX:e[t[0]],minY:e[t[1]],maxX:e[t[2]],maxY:e[t[3]]}}}},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(67);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,i){var n=i(0),s=i(138),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()},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(14),o=i(19),a=i(1),h=i(388),u=i(871),l=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,u,l){var c=t.sys.game.renderer;a.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=c,this.setTexture(u,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.frame.width),this.potHeight=h(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(this,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.oldFrame=null,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){(this.dirty||this.oldFrame!==this.frame)&&(this.oldFrame=this.frame,this.canvasBufferCtx.clearRect(0,0,this.canvasBuffer.width,this.canvasBuffer.height),this.renderer.gl?(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode)):(this.canvasBuffer.width=this.frame.cutWidth,this.canvasBuffer.height=this.frame.cutHeight,this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.frame.cutWidth,this.frame.cutHeight),this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat")),this.dirty=!1)},destroy:function(){this.renderer.gl&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(22),s=i(0),r=i(14),o=i(19),a=i(1),h=i(876),u=i(873),l=i(872),c=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.MatrixStack,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r){if(void 0===s&&(s=32),void 0===r&&(r=32),a.call(this,t,"RenderTexture"),this.initMatrixStack(),this.renderer=t.sys.game.renderer,this.globalTint=16777215,this.globalAlpha=1,this.renderer.type===o.WEBGL){var h=this.renderer.gl;this.gl=h,this.fill=l.fill,this.clear=l.clear,this.draw=l.draw,this.drawFrame=l.drawFrame,this.texture=this.renderer.createTexture2D(0,h.NEAREST,h.NEAREST,h.CLAMP_TO_EDGE,h.CLAMP_TO_EDGE,h.RGBA,null,s,r,!1),this.framebuffer=this.renderer.createFramebuffer(s,r,this.texture,!1)}else this.renderer.type===o.CANVAS&&(this.fill=u.fill,this.clear=u.clear,this.draw=u.draw,this.drawFrame=u.drawFrame,this.canvas=n.create2D(this,s,r),this.context=this.canvas.getContext("2d"));this.setPosition(e,i),this.setSize(s,r),this.initPipeline("TextureTintPipeline")},destroy:function(){a.prototype.destroy.call(this),this.renderer.type===o.WEBGL&&(this.renderer.deleteTexture(this.texture),this.renderer.deleteFramebuffer(this.framebuffer))},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this}});t.exports=c},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(435),a=i(89),h=i(433),u=i(880),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;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}},destroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,o.prototype.destroy.call(this)}});t.exports=c},function(t,e,i){var n=i(892),s=i(889),r=i(0),o=i(14),a=i(119),h=i(1),u=i(89),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,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}});t.exports=l},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(452),a=i(897),h=i(896),u=i(895),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,u],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.letterSpacing=0,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this.letterSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this.text=t.toString(),this.updateDisplayOrigin()),this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing};return t.data=e,t}});l.ParseRetroFont=h,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(4),s=i(91),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(6);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){"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(111),r=i(250),o=i(192),a=i(512),h=i(511),u=i(25),l=i(80),c=function(t,e,i,n,s){this.x=t,this.y=e,this.width=i,this.rgb=n,this.alpha=s},d=function(t,e,i,n,s){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,n,s)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,v=[],m=new n({Extends:l,Mixins:[o],initialize:function(t){l.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:h,fragShader:t.fragShader?t.fragShader:a,vertexCapacity:t.vertexCapcity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:2*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.tempTriangle=[{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1}],this.polygonCache=[],this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchFillRect:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m,y){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var x=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount,T=r+a,S=o+h,A=y[0],C=y[1],M=y[2],E=y[3],_=d*A+f*M,L=d*C+f*E,P=p*A+g*M,F=p*C+g*E,R=v*A+m*M+y[4],k=v*C+m*E+y[5],O=r*_+o*P+R,D=r*L+o*F+k,I=r*_+S*P+R,B=r*L+S*F+k,Y=T*_+S*P+R,X=T*L+S*F+k,z=T*_+o*P+R,N=T*L+o*F+k,G=u.getTintAppendFloatAlphaAndSwap(l,c);x[b+0]=O,x[b+1]=D,w[b+2]=G,x[b+3]=I,x[b+4]=B,w[b+5]=G,x[b+6]=Y,x[b+7]=X,w[b+8]=G,x[b+9]=O,x[b+10]=D,w[b+11]=G,x[b+12]=Y,x[b+13]=X,w[b+14]=G,x[b+15]=z,x[b+16]=N,w[b+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m,y,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var b=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=w[0],C=w[1],M=w[2],E=w[3],_=p*A+g*M,L=p*C+g*E,P=v*A+m*M,F=v*C+m*E,R=y*A+x*M+w[4],k=y*C+x*E+w[5],O=r*_+o*P+R,D=r*L+o*F+k,I=a*_+h*P+R,B=a*L+h*F+k,Y=l*_+c*P+R,X=l*L+c*F+k,z=u.getTintAppendFloatAlphaAndSwap(d,f);b[S+0]=O,b[S+1]=D,T[S+2]=z,b[S+3]=I,b[S+4]=B,T[S+5]=z,b[S+6]=Y,b[S+7]=X,T[S+8]=z,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,w){var b=this.tempTriangle;b[0].x=r,b[0].y=o,b[0].width=c,b[0].rgb=d,b[0].alpha=f,b[1].x=a,b[1].y=h,b[1].width=c,b[1].rgb=d,b[1].alpha=f,b[2].x=u,b[2].y=l,b[2].width=c,b[2].rgb=d,b[2].alpha=f,b[3].x=r,b[3].y=o,b[3].width=c,b[3].rgb=d,b[3].alpha=f,this.batchStrokePath(t,e,i,n,s,b,c,d,f,p,g,v,m,y,x,!1,w)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v){this.renderer.setPipeline(this);for(var m,y,x,w,b,T,S,A,C,M,E,_,L,P,F,R,k,O=o.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,Y=0,X=v[0],z=v[1],N=v[2],G=v[3],W=l*X+c*N,U=l*z+c*G,V=d*X+f*N,H=d*z+f*G,j=p*X+g*N+v[4],q=p*z+g*G+v[5],K=u.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,_=(T=D[x+0])*W+(S=D[x+1])*V+j,L=T*U+S*H+q,P=(A=D[w+0])*W+(C=D[w+1])*V+j,F=A*U+C*H+q,R=(M=D[b+0])*W+(E=D[b+1])*V+j,k=M*U+E*H+q,I[Y+0]=_,I[Y+1]=L,B[Y+2]=K,I[Y+3]=P,I[Y+4]=F,B[Y+5]=K,I[Y+6]=R,I[Y+7]=k,B[Y+8]=K,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m){var y,x;this.renderer.setPipeline(this);for(var w,b,T,S,A=r.length,C=this.polygonCache,M=this.vertexViewF32,E=this.vertexViewU32,_=u.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=C[P-1]||C[F-1],b=C[P],M[(T=this.vertexCount*this.vertexComponentCount)+0]=w[6],M[T+1]=w[7],E[T+2]=_(w[8],h),M[T+3]=w[0],M[T+4]=w[1],E[T+5]=_(w[2],h),M[T+6]=b[9],M[T+7]=b[10],E[T+8]=_(b[11],h),M[T+9]=w[0],M[T+10]=w[1],E[T+11]=_(w[2],h),M[T+12]=w[6],M[T+13]=w[7],E[T+14]=_(w[8],h),M[T+15]=b[3],M[T+16]=b[4],E[T+17]=_(b[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m,y,x,w,b){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var T=b[0],S=b[1],A=b[2],C=b[3],M=g*T+v*A,E=g*S+v*C,_=m*T+y*A,L=m*S+y*C,P=x*T+w*A+b[4],F=x*S+w*C+b[5],R=this.vertexViewF32,k=this.vertexViewU32,O=a-r,D=h-o,I=Math.sqrt(O*O+D*D),B=l*(h-o)/I,Y=l*(r-a)/I,X=c*(h-o)/I,z=c*(r-a)/I,N=a-X,G=h-z,W=r-B,U=o-Y,V=a+X,H=h+z,j=r+B,q=o+Y,K=N*M+G*_+P,J=N*E+G*L+F,Z=W*M+U*_+P,Q=W*E+U*L+F,$=V*M+H*_+P,tt=V*E+H*L+F,et=j*M+q*_+P,it=j*E+q*L+F,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return R[ot+0]=K,R[ot+1]=J,k[ot+2]=rt,R[ot+3]=Z,R[ot+4]=Q,k[ot+5]=st,R[ot+6]=$,R[ot+7]=tt,k[ot+8]=rt,R[ot+9]=Z,R[ot+10]=Q,k[ot+11]=st,R[ot+12]=et,R[ot+13]=it,k[ot+14]=st,R[ot+15]=$,R[ot+16]=tt,k[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var r,o,a,h,u,l,m,y,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,b=t.x-x,T=t.y-w,S=t.scaleX,A=t.scaleY,C=-t.rotation,M=t.commandBuffer,E=t.alpha,_=1,L=1,P=0,F=0,R=1,k=e.matrix.matrix,O=null,D=0,I=0,B=0,Y=0,X=0,z=0,N=0,G=0,W=0,U=0,V=null,H=Math.sin,j=Math.cos,q=2*Math.PI,K=H(C),J=j(C),Z=J*S,Q=-K*S,$=K*A,tt=J*A,et=b,it=T,nt=k[0],st=k[1],rt=k[2],ot=k[3],at=k[4],ht=k[5];if(n){var ut=n[0],lt=n[1],ct=n[2],dt=n[3],ft=nt*ut+st*ct,pt=nt*lt+st*dt,gt=rt*ut+ot*ct,vt=rt*lt+ot*dt;r=Z*ft+Q*gt,o=Z*pt+Q*vt,a=$*ft+tt*gt,h=$*pt+tt*vt,u=et*ft+it*gt+(at*ut+ht*ct+n[4]),l=et*pt+it*vt+(at*lt+ht*dt+n[5])}else r=Z*nt+Q*rt,o=Z*st+Q*ot,a=$*nt+tt*rt,h=$*st+tt*ot,u=et*nt+it*rt+at,l=et*st+it*ot+ht;v.length=0;for(var mt=0,yt=M.length;mt0&&(W=W%q-q):W>q?W=q:W<0&&(W=q+W%q);D<1;)I=X+j(Y=W*D+G)*N,B=z+H(Y)*N,O.points.push(new c(I,B,R,P,_*E)),D+=.01;I=X+j(Y=W+G)*N,B=z+H(Y)*N,O.points.push(new c(I,B,R,P,_*E)),mt+=6;break;case s.LINE_STYLE:R=M[mt+1],P=M[mt+2],_=M[mt+3],mt+=3;break;case s.FILL_STYLE:F=M[mt+1],L=M[mt+2],mt+=2;break;case s.BEGIN_PATH:v.length=0,O=null;break;case s.CLOSE_PATH:O&&O.points.length&&O.points.push(O.points[0]);break;case s.FILL_PATH:for(m=0,y=v.length;m=0&&n>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,o?(s.disable(s.SCISSOR_TEST),this):(s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?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),this},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},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;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),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?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),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){return 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=this.config.resolution,i=Math.floor(t.x*e),n=Math.floor(t.y*e),s=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,n,s,r),t.backgroundColor.alphaGL>0){var a=t.backgroundColor,h=this.pipelines.FlatTintPipeline;h.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),h.flush()}},postRenderCamera:function(t){var e=this.pipelines.FlatTintPipeline,i=t.flashEffect.postRenderWebGL(e,o.getTintFromFloats);(t.fadeEffect.postRenderWebGL(e,o.getTintFromFloats)||i)&&e.flush(),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()}},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;u0&&(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=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,w=i*a-n*o,b=i*h-s*o,T=n*h-s*a,S=u*p-l*f,A=u*g-c*f,C=u*v-d*f,M=l*g-c*p,E=l*v-d*p,_=c*v-d*g,L=m*_-y*E+x*M+w*C-b*A+T*S;return L?(L=1/L,t[0]=(o*_-a*E+h*M)*L,t[1]=(n*E-i*_-s*M)*L,t[2]=(p*T-g*b+v*w)*L,t[3]=(c*b-l*T-d*w)*L,t[4]=(a*C-r*_-h*A)*L,t[5]=(e*_-n*C+s*A)*L,t[6]=(g*x-f*T-v*y)*L,t[7]=(u*T-c*x+d*y)*L,t[8]=(r*E-o*C+h*S)*L,t[9]=(i*C-e*E-s*S)*L,t[10]=(f*b-p*x+v*m)*L,t[11]=(l*x-u*b-d*m)*L,t[12]=(o*A-r*M-a*S)*L,t[13]=(e*M-i*A+n*S)*L,t[14]=(p*y-f*w-g*m)*L,t[15]=(u*w-l*y+c*m)*L,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-l*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-l*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+l*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-u*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-u*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+u*(n*h-s*a),t[8]=r*(l*v-d*p)-u*(o*v-h*p)+f*(o*d-h*l),t[9]=-(e*(l*v-d*p)-u*(i*v-s*p)+f*(i*d-s*l)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*l)-r*(i*d-s*l)+u*(i*h-s*o)),t[12]=-(r*(l*g-c*p)-u*(o*g-a*p)+f*(o*c-a*l)),t[13]=e*(l*g-c*p)-u*(i*g-n*p)+f*(i*c-n*l),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*l)-r*(i*c-n*l)+u*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(l*v-d*p)+(e*h-s*r)*(l*g-c*p)+(i*a-n*o)*(u*v-d*f)-(i*h-s*o)*(u*g-c*f)+(n*h-s*a)*(u*p-l*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],w=y[1],b=y[2],T=y[3];return e[0]=x*i+w*o+b*l+T*p,e[1]=x*n+w*a+b*c+T*g,e[2]=x*s+w*h+b*d+T*v,e[3]=x*r+w*u+b*f+T*m,x=y[4],w=y[5],b=y[6],T=y[7],e[4]=x*i+w*o+b*l+T*p,e[5]=x*n+w*a+b*c+T*g,e[6]=x*s+w*h+b*d+T*v,e[7]=x*r+w*u+b*f+T*m,x=y[8],w=y[9],b=y[10],T=y[11],e[8]=x*i+w*o+b*l+T*p,e[9]=x*n+w*a+b*c+T*g,e[10]=x*s+w*h+b*d+T*v,e[11]=x*r+w*u+b*f+T*m,x=y[12],w=y[13],b=y[14],T=y[15],e[12]=x*i+w*o+b*l+T*p,e[13]=x*n+w*a+b*c+T*g,e[14]=x*s+w*h+b*d+T*v,e[15]=x*r+w*u+b*f+T*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,u=s*o;return this.set(h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,u*o+i,u*a-n*r,0,h*a-n*o,u*a+n*r,s*a*a+i,0,0,0,0,1),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),u=1-h,l=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],w=i[10],b=i[11],T=n*n*u+h,S=s*n*u+r*a,A=r*n*u-s*a,C=n*s*u-r*a,M=s*s*u+h,E=r*s*u+n*a,_=n*r*u+s*a,L=s*r*u-n*a,P=r*r*u+h;return i[0]=l*T+p*S+y*A,i[1]=c*T+g*S+x*A,i[2]=d*T+v*S+w*A,i[3]=f*T+m*S+b*A,i[4]=l*C+p*M+y*E,i[5]=c*C+g*M+x*E,i[6]=d*C+v*M+w*E,i[7]=f*C+m*M+b*E,i[8]=l*_+p*L+y*P,i[9]=c*_+g*L+x*P,i[10]=d*_+v*L+w*P,i[11]=f*_+m*L+b*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],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},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],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},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],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},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,u=r+r,l=n*a,c=n*h,d=n*u,f=s*h,p=s*u,g=r*u,v=o*a,m=o*h,y=o*u;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(l+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(l+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,u=i*o,l=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=l+m,e[2]=c-v,e[3]=0,e[4]=l-m,e[5]=1-(u+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(u+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),u=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*u,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*u,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,u=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,u=0===u?u:1/u,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},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,u=i.z,l=e.x,c=e.y,d=e.z;if(Math.abs(s-l)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-l,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-u*(p*=v),y=u*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var w=p*x-g*y,b=g*m-f*x,T=f*y-p*m;return(v=Math.sqrt(w*w+b*b+T*T))?(w*=v=1/v,b*=v,T*=v):(w=0,b=0,T=0),n[0]=m,n[1]=w,n[2]=f,n[3]=0,n[4]=y,n[5]=b,n[6]=p,n[7]=0,n[8]=x,n[9]=T,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(w*s+b*r+T*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),u=Math.cos(i);return n[10]=1,n[15]=1,n[0]=u,n[1]=h,n[4]=-h,n[5]=u,h=Math.sin(e),u=Math.cos(e),o[0]=1,o[15]=1,o[5]=u,o[10]=u,o[9]=-h,o[6]=h,h=Math.sin(t),u=Math.cos(t),a[5]=1,a[15]=1,a[0]=u,a[2]=-h,a[8]=h,a[10]=u,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(272),r=i(545),o=i(544),a=i(543),h=i(75),u=i(143),l=i(6),c=i(82),d=i(271),f=new c,p=new d,g=new c,v=new c,m=new s,y=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(27),s=i(276);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(27);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n,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;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(153),r=i(10),o=i(152),a=i(57),h=i(68),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(2),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(620),s=i(309),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(20);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.settings.status!==r.RUNNING?this.manager.queueOp("start",t,e):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==r.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=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)},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}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(52),s=i(17),r={SceneManager:i(180),ScenePlugin:i(320),Settings:i(178),Systems:i(109)};r=s(!1,r,n),t.exports=r},,,,function(t,e,i){var n=i(30),s=i(0),r=i(64),o=i(28),a=i(6),h=new s({initialize:function(t,e){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=e.displayWidth,this.height=e.displayHeight,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},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){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),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){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},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(30),s=i(0),r=i(64),o=i(142),a=i(12),h=i(28),u=i(60),l=i(6),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.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.dirty=!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;if(this.syncBounds){var n=t.getBounds(this._bounds);n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._reset=!0)}else{var s=Math.abs(e.scaleX),r=Math.abs(e.scaleY);s===this._sx&&r===this._sy||(this.width=this.sourceWidth*s,this.height=this.sourceHeight*r,this._sx=s,this._sy=r,this._reset=!0)}this._reset&&(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.dirty=!0,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;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),this.newVelocity.set(this.velocity.x*t,this.velocity.y*t),this.position.x+=this.newVelocity.x,this.position.y+=this.newVelocity.y,this.updateCenter(),this.position.x===this.prev.x&&this.position.y===this.prev.y||(this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),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(),this._reset=!1},postUpdate:function(){this.enable&&this.dirty&&(this.dirty=!1,this._dx=this.deltaX(),this._dy=this.deltaY(),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.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.updateCenter(),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(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.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},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 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},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},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 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(330),s=i(23),r=i(0),o=i(329),a=i(64),h=i(54),u=i(9),l=i(328),c=i(327),d=i(4),f=i(213),p=i(676),g=i(12),v=i(212),m=i(675),y=i(670),x=i(669),w=i(75),b=i(325),T=i(326),S=i(6),A=i(34),C=new r({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.bodies=new w,this.staticBodies=new w,this.pendingDestroy=new w,this.colliders=new f,this.gravity=new S(d(e,"gravity.x",0),d(e,"gravity.y",0)),this.bounds=new g(d(e,"x",0),d(e,"y",0),d(e,"width",t.sys.game.config.width),d(e,"height",t.sys.game.config.height)),this.checkCollision={up:d(e,"checkCollision.up",!0),down:d(e,"checkCollision.down",!0),left:d(e,"checkCollision.left",!0),right:d(e,"checkCollision.right",!0)},this.OVERLAP_BIAS=d(e,"overlapBias",4),this.TILE_BIAS=d(e,"tileBias",16),this.forceX=d(e,"forceX",!1),this.isPaused=d(e,"isPaused",!1),this._total=0,this.drawDebug=d(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:d(e,"debugShowBody",!0),debugShowStaticBody:d(e,"debugShowStaticBody",!0),debugShowVelocity:d(e,"debugShowVelocity",!0),bodyDebugColor:d(e,"debugBodyColor",16711935),staticBodyDebugColor:d(e,"debugStaticBodyColor",255),velocityDebugColor:d(e,"debugVelocityColor",65280)},this.maxEntries=d(e,"maxEntries",16),this.tree=new v(this.maxEntries,[".left",".top",".right",".bottom"]),this.staticTree=new v(this.maxEntries,[".left",".top",".right",".bottom"]),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);var i=1;if(Array.isArray(t))for(i=t.length;i--;)t[i].hasOwnProperty("children")?this.enable(t[i].children.entries,e):this.enableBody(t[i],e);else t.hasOwnProperty("children")?this.enable(t.children.entries,e):this.enableBody(t,e)},enableBody:function(t,e){return null===t.body&&(e===a.DYNAMIC_BODY?(t.body=new n(this,t),this.bodies.set(t.body)):e===a.STATIC_BODY&&(t.body=new b(this,t),this.staticBodies.set(t.body),this.staticTree.insert(t.body))),t},remove:function(t){this.disableBody(t)},disable:function(t){var e=1;if(Array.isArray(t))for(e=t.length;e--;)t[e].hasOwnProperty("children")?this.disable(t[e].children.entries):this.disableGameObjectBody(t[e]);else t.hasOwnProperty("children")?this.disable(t.children.entries):this.disableGameObjectBody(t)},disableGameObjectBody:function(t){return t.body&&(t.body.physicsType===a.DYNAMIC_BODY?this.bodies.delete(t.body):t.body.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t.body),this.staticTree.remove(t.body)),t.body.enable=!1),t},disableBody:function(t){t.physicsType===a.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t)),t.enable=!1},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},setBounds:function(t,e,i,n,s,r,o,a){return this.bounds.setTo(t,e,i,n),void 0!==s&&this.setBoundsCollision(s,r,o,a),this},setBoundsCollision: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.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit("pause"),this},resume:function(){return this.isPaused=!1,this.emit("resume"),this},addCollider:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!1,t,e,i,n,s);return this.colliders.add(r),r},addOverlap:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!0,t,e,i,n,s);return this.colliders.add(r),r},removeCollider:function(t){return this.colliders.remove(t),this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i,n;e/=1e3,this.delta=e;var s=this.bodies.entries,r=s.length;for(i=0;i0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(d.x,d.y,u.right,u.y)-d.radius):d.y>u.bottom&&(d.xu.right&&(a=h(d.x,d.y,u.right,u.bottom)-d.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 f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,m=e.velocity.y,y=e.mass,x=f*Math.cos(o)+p*Math.sin(o),w=f*Math.sin(o)-p*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);return 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,f=t.velocity.x,p=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>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&m>p?t.velocity.y*=-1:m<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&m0&&!e.immovable&&f>m&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+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?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?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=t.isParent&&void 0===t.physicsType?t.children.entries:t,e=e.isParent&&void 0===e.physicsType?e.children.entries:e;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=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.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,g=e.getTilesWithinWorldXY(a,h,u,l);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},y=0;y=0?t:t+2*Math.PI}},function(t,e,i){var n=i(7),s=i(46),r=function(t,e,i,n,r){var o=new s(t,e,n,r,i);return o.type="spritesheet",o};n.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;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&&(t.input.dropZone=n),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);if(e){t.camera=e;for(var i=this.manager.hitTest(t.x,t.y,this._list,e),n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var h=[];for(i=0;i1&&(this.sortGameObjects(h),this.topOnly&&h.splice(1)),this._drag[t.id]=h,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(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},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;n-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._tempZones=[],this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&(r+=this.processUpEvents(n)),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off("transitionstart",this.transitionIn,this),e.off("transitionout",this.transitionOut,this),e.off("transitioncomplete",this.transitionComplete,this),e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.keyboard=null,this.mouse=null,this.gamepad=null},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){t.exports={DUALSHOCK_4:i(358),SNES_USB:i(357),XBOX_360:i(356)}},function(t,e,i){t.exports={Axis:i(188),Button:i(187),Gamepad:i(189),GamepadManager:i(190),Configs:i(359)}},function(t,e,i){t.exports={CreateInteractiveObject:i(159),Gamepad:i(360),InputManager:i(191),InputPlugin:i(355),Keyboard:i(354),Mouse:i(349),Pointer:i(182),Touch:i(348)}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},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,i){var n=i(12);n.Area=i(782),n.Ceil=i(781),n.CeilAll=i(780),n.CenterOn=i(365),n.Clone=i(779),n.Contains=i(28),n.ContainsPoint=i(778),n.ContainsRect=i(777),n.CopyFrom=i(776),n.Decompose=i(372),n.Equals=i(775),n.FitInside=i(774),n.FitOutside=i(773),n.Floor=i(772),n.FloorAll=i(771),n.FromPoints=i(268),n.GetAspectRatio=i(220),n.GetCenter=i(770),n.GetPoint=i(127),n.GetPoints=i(286),n.GetSize=i(769),n.Inflate=i(768),n.MarchingAnts=i(558),n.MergePoints=i(767),n.MergeRect=i(766),n.MergeXY=i(765),n.Offset=i(764),n.OffsetPoint=i(763),n.Overlaps=i(762),n.Perimeter=i(93),n.PerimeterPoint=i(761),n.Random=i(146),n.Scale=i(760),n.Union=i(450),t.exports=n},function(t,e,i){var n=i(0),s=i(221),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n0){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){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){t.exports={CircleToCircle:i(829),CircleToRectangle:i(828),GetRectangleIntersection:i(827),LineToCircle:i(374),LineToLine:i(137),LineToRectangle:i(826),PointToLine:i(373),PointToLineSegment:i(825),RectangleToRectangle:i(375),RectangleToTriangle:i(824),RectangleToValues:i(823),TriangleToCircle:i(822),TriangleToLine:i(821),TriangleToTriangle:i(820)}},function(t,e,i){t.exports={Circle:i(839),Ellipse:i(241),Intersects:i(376),Line:i(819),Point:i(801),Polygon:i(787),Rectangle:i(366),Triangle:i(759)}},function(t,e,i){var n=i(0),s=i(379),r=i(141),o=i(25),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(25),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(21),s=i(13),r=i(8),o=i(102);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(31);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(66);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(8),s=i(13),r=i(107);s.register("graphics",function(t){var e=n(t,"add",!0),i=new r(this.scene,t);return e&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(102);i(11).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(11),s=i(31);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(66);i(11).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(107);i(11).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&&e.cameraFilter&s._id||""===e.text)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=e.canvas;if(o.save(),void 0!==r){var h=r.matrix;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY;t.config.roundPixels&&(u|=0,l|=0),o.translate(u,l),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.translate(a.width*(e.flipX?1:0),a.height*(e.flipY?1:0)),o.scale(e.flipX?-1:1,e.flipY?-1:1),o.drawImage(a,0,0,a.width,a.height,-e.displayOriginX,-e.displayOriginY,a.width,a.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(392),s=i(391),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&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,i){var n=i(0),s=i(33),r=i(58),o=i(4),a=i(31),h=i(57),u=i(6),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(6),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;i=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(239),s=i(238),r=i(237),o=i(236),a=i(235),h=i(234),u=i(233),l=i(232),c=i(231),d=i(230),f=i(229),p=i(228);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,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(48),s=i(0),r=i(14),o=i(432),a=i(431),h=i(881),u=i(2),l=i(139),c=i(397),d=i(103),f=i(434),p=i(396),g=i(12),v=i(79),m=i(6),y=i(34),x=new s({Mixins:[r.BlendMode,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","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(33),r=i(54),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.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,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.color=16777215&this.tint|(255*this.alpha|0)<<24,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.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(437),s=i(436),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(439),s=i(160),s=i(160),t.exports={renderWebGL:n,renderCanvas:s}},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(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(51);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(51);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(12);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e){function i(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,n,s){void 0===e&&(e=0),void 0===n&&(n=0);var r={},o=t.getElementsByTagName("info")[0],a=t.getElementsByTagName("common")[0];r.font=o.getAttribute("face"),r.size=i(o,"size"),r.lineHeight=i(a,"lineHeight")+n,r.chars={};var h=t.getElementsByTagName("char"),u=void 0!==s&&s.trimmed;if(u)var l=s.height,c=s.width;for(var d=0;dy&&(s=y),r>x&&(r=x);var A=y+v-s,C=x+m-r;o-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(70);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(26);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(70);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e,i){var n=i(247);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(26);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,u),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;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--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),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 M=u,E=u,_=0,L=e.sourceIndex,P=0;Pg||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){t.exports=function(t,e){if(["layers","tilewidth","tileheight","tileswide","tileshigh"].forEach(function(t){e[t]}),1===e.layers.length){for(var i=new Phaser.FrameData,n=e.tileheight,s=e.tilewidth,r=e.layers[0].tiles,o=0;o0&&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){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t=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(53),s=i(74),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(53),browser:i(74),features:i(112),input:i(505),audio:i(504),video:i(503),fullscreen:i(502),canvasFeatures:i(193)}},function(t,e,i){var n=i(19);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\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\nuniform bool uInvertMaskAlpha;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = mainColor.a;\r\n\r\n if (!uInvertMaskAlpha)\r\n {\r\n alpha *= (maskColor.a);\r\n }\r\n else\r\n {\r\n alpha *= (1.0 - maskColor.a);\r\n }\r\n \r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n"},function(t,e,i){var n=i(266),s=i(22),r=i(19),o=i(112);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.pixelArt&&s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.pixelArt&&n.setCrisp(t.canvas),1!==h.zoom&&(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(254),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(0),s=i(19),r=i(4),o=i(15),a=i(3),h=i(194),u=i(124),l=new n({initialize:function(t){void 0===t&&(t={});this.width=r(t,"width",1024),this.height=r(t,"height",768),this.zoom=r(t,"zoom",1),this.resolution=r(t,"resolution",1),this.renderType=r(t,"type",s.AUTO),this.parent=r(t,"parent",null),this.canvas=r(t,"canvas",null),this.canvasStyle=r(t,"canvasStyle",null),this.sceneConfig=r(t,"scene",null),this.seed=r(t,"seed",[(Date.now()*Math.random()).toString()]),o.RND.init(this.seed),this.gameTitle=r(t,"title",""),this.gameURL=r(t,"url","https://phaser.io"),this.gameVersion=r(t,"version",""),this.inputKeyboard=r(t,"input.keyboard",!0),this.inputKeyboardEventTarget=r(t,"input.keyboard.target",window),this.inputMouse=r(t,"input.mouse",!0),this.inputMouseEventTarget=r(t,"input.mouse.target",null),this.inputMouseCapture=r(t,"input.mouse.capture",!0),this.inputTouch=r(t,"input.touch",!0),this.inputTouchEventTarget=r(t,"input.touch.target",null),this.inputTouchCapture=r(t,"input.touch.capture",!0),this.inputGamepad=r(t,"input.gamepad",!1),this.disableContextMenu=r(t,"disableContextMenu",!1),this.audio=r(t,"audio"),this.hideBanner=!1===r(t,"banner",null),this.hidePhaser=r(t,"banner.hidePhaser",!1),this.bannerTextColor=r(t,"banner.text","#ffffff"),this.bannerBackgroundColor=r(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(t,"fps",null);var e=r(t,"render",t);this.antialias=r(e,"antialias",!0),this.pixelArt=r(e,"pixelArt",!1),this.autoResize=r(e,"autoResize",!1),this.roundPixels=r(e,"roundPixels",!1),this.transparent=r(e,"transparent",!1),this.clearBeforeRender=r(e,"clearBeforeRender",!0),this.premultipliedAlpha=r(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=r(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=r(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(e,"powerPreference","default");var i=r(t,"backgroundColor",0);this.backgroundColor=u(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=r(t,"callbacks.preBoot",a),this.postBoot=r(t,"callbacks.postBoot",a),this.physics=r(t,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(t,"loader.baseURL",""),this.loaderPath=r(t,"loader.path",""),this.loaderEnableParallel=r(t,"loader.enableParallel",!0),this.loaderMaxParallelDownloads=r(t,"loader.maxParallelDownloads",4),this.loaderCrossOrigin=r(t,"loader.crossOrigin",void 0),this.loaderResponseType=r(t,"loader.responseType",""),this.loaderAsync=r(t,"loader.async",!0),this.loaderUser=r(t,"loader.user",""),this.loaderPassword=r(t,"loader.password",""),this.loaderTimeout=r(t,"loader.timeout",0),this.defaultPlugins=r(t,"plugins",h.DefaultScene);var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(t,"images.default",n+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(t,"images.missing",n+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=l},function(t,e,i){var n=i(122),s=i(198),r=i(196),o=i(22),a=i(0),h=i(516),u=i(515),l=i(76),c=i(507),d=i(506),f=i(263),p=i(9),g=i(191),v=i(3),m=i(10),y=i(180),x=i(177),w=i(170),b=i(483),T=i(482),S=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new w(this),this.cache=new r(this),this.registry=new l(this),this.input=new g(this,this.config),this.scene=new y(this,this.config.sceneConfig),this.device=d,this.sound=x.create(this),this.loop=new b(this,this.config.fps),this.plugins=new m(this,this.config),this.onStepCallback=v,this.pendingDestroy=!1,this.removeCanvas=!1,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),u(this),c(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("ready",this.start,this)},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)),T(this.events),this.events.on("hidden",this.onHidden,this),this.events.on("visible",this.onVisible,this),this.events.on("blur",this.onBlur,this),this.events.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e);var i=this.renderer;i.preRender(),this.events.emit("prerender",i),this.scene.render(i),i.postRender(),this.events.emit("postrender",i)},headlessStep:function(t,e){this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e),this.events.emit("prerender"),this.events.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.loop.blur()},onFocus:function(){this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t){this.pendingDestroy=!0,this.removeCanvas=t},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.onStepCallback=null,this.removeCanvas&&this.canvas&&o.remove(this.canvas),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=S},function(t,e,i){var n=i(0),s=i(9),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){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(27);n.ColorToRGBA=i(906),n.ComponentToHex=i(525),n.GetColor=i(144),n.GetColor32=i(278),n.HexStringToColor=i(279),n.HSLToColor=i(905),n.HSVColorWheel=i(904),n.HSVToRGB=i(523),n.HueToComponent=i(524),n.IntegerToColor=i(277),n.IntegerToRGB=i(276),n.Interpolate=i(903),n.ObjectToColor=i(275),n.RandomRGB=i(902),n.RGBStringToColor=i(274),n.RGBToHSV=i(901),n.RGBToString=i(900),n.ValueToColor=i(124),t.exports=n},function(t,e,i){var n=i(0),s=i(76),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&&this.events.off("destroy",this.destroy,this),this.events=this.systems.events,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.systems.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(76),DataManagerPlugin:i(527)}},function(t,e,i){var n=i(267),s=i(0),r=i(81),o=i(6),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&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(539),s=i(538),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*u,e[5]=g*s+v*a+m*l,e[6]=y*i+x*r+w*h,e[7]=y*n+x*o+w*u,e[8]=y*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=u+v,m[6]=l-g,m[1]=u-v,m[4]=1-(h+f),m[7]=d+p,m[2]=l+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,S=s*l-o*h,A=r*l-o*u,C=c*v-d*g,M=c*m-f*g,E=c*y-p*g,_=d*m-f*v,L=d*y-p*v,P=f*y-p*m,F=x*P-w*L+b*_+T*E-S*M+A*C;return F?(F=1/F,i[0]=(h*P-u*L+l*_)*F,i[1]=(u*E-a*P-l*M)*F,i[2]=(a*L-h*E+l*C)*F,i[3]=(r*L-s*P-o*_)*F,i[4]=(n*P-r*E+o*M)*F,i[5]=(s*E-n*L-o*C)*F,i[6]=(v*A-m*S+y*T)*F,i[7]=(m*b-g*A-y*w)*F,i[8]=(g*S-v*b+y*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(0),s=i(82),r=i(541),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(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(Math.abs(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(82),s=i(272),r=i(542),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(113),s=i(0),r=i(2),o=i(10),a=i(28),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.currentCameraId=1,this.cameras=[],this.cameraPool=[],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(){this.main||this.boot();var t=this.systems.events;t.on("update",this.update,this),t.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=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),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(4),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={BaseCache:i(197),CacheManager:i(196)}},function(t,e,i){t.exports={Animation:i(201),AnimationFrame:i(199),AnimationManager:i(198)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),u=n-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(15),s=i(60),r=i(203),o=i(202),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},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,clearTint:function(){return this.setTint(16777215),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},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){var i={texture:null,frame:null,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(55),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){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var o=this.currentMatrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=a*t+u*e,o[1]=h*t+l*e,o[2]=a*i+u*n,o[3]=h*i+l*n,o[4]=a*s+u*r+c,o[5]=h*s+l*r+d,this},setTransform:function(t,e,i,n,s,r){var o=this.currentMatrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return i[4]=n*t+r*e+a,i[5]=s*t+o*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=o*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],o=Math.sin(t),a=Math.cos(t);return e[0]=i*a+s*o,e[1]=n*a+r*o,e[2]=i*-o+s*a,e[3]=n*-o+r*a,this}};t.exports=i},function(t,e,i){var n=i(12),s=i(284),r=i(6),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){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(48),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(23),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(40),s=i(38),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(41),o=i(37);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(87),s=i(38),r=i(86),o=i(37);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(84),s=i(40),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(84),s=i(42),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(86),s=i(85);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(580),s=i(87),r=i(84);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(43),o=i(86);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(291),s=[];s[n.BOTTOM_CENTER]=i(584),s[n.BOTTOM_LEFT]=i(583),s[n.BOTTOM_RIGHT]=i(582),s[n.CENTER]=i(581),s[n.LEFT_CENTER]=i(579),s[n.RIGHT_CENTER]=i(578),s[n.TOP_CENTER]=i(577),s[n.TOP_LEFT]=i(576),s[n.TOP_RIGHT]=i(575);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(988),Call:i(987),GetFirst:i(986),GetLast:i(985),GridAlign:i(984),IncAlpha:i(983),IncX:i(982),IncXY:i(981),IncY:i(980),PlaceOnCircle:i(979),PlaceOnEllipse:i(978),PlaceOnLine:i(977),PlaceOnRectangle:i(976),PlaceOnTriangle:i(975),PlayAnimation:i(974),PropertyValueInc:i(32),PropertyValueSet:i(24),RandomCircle:i(973),RandomEllipse:i(972),RandomLine:i(971),RandomRectangle:i(970),RandomTriangle:i(969),Rotate:i(968),RotateAround:i(967),RotateAroundDistance:i(966),ScaleX:i(965),ScaleXY:i(964),ScaleY:i(963),SetAlpha:i(962),SetBlendMode:i(961),SetDepth:i(960),SetHitArea:i(959),SetOrigin:i(958),SetRotation:i(957),SetScale:i(956),SetScaleX:i(955),SetScaleY:i(954),SetTint:i(953),SetVisible:i(952),SetX:i(951),SetXY:i(950),SetY:i(949),ShiftPosition:i(948),Shuffle:i(947),SmootherStep:i(946),SmoothStep:i(945),Spread:i(944),ToggleVisible:i(943),WrapInRectangle:i(942)}},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&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(610),s=i(609),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(129);t.exports=function(t){for(var e=[],i=[],s=0;s-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(623),s=i(2),r=i(100),o=i(309),a=i(62);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(312),Parse2DArray:i(206),ParseCSV:i(311),Impact:i(305),Tiled:i(310)}},function(t,e,i){var n=i(50),s=i(49),r=i(6);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(20);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(63),s=i(35),r=i(103);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(63),s=i(35),r=i(207);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-c&&m>-d&&v=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(328);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.up=!0:e>0&&(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(671);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.left=!0:e>0&&(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(673);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(674),s=i(672),r=i(326);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(64),s=i(17),r={ArcadePhysics:i(689),Body:i(330),Collider:i(329),Factory:i(336),Group:i(333),Image:i(335),Sprite:i(136),StaticBody:i(325),StaticGroup:i(332),World:i(331)};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(388),IsSize:i(121),IsValue:i(709)}},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 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(267);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[ie-i}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN,this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.state=s.LOADER_DESTROYED,this.systems.events.off("start",this.pluginStart,this),this.list=null,this.inflight=null,this.failed=null,this.queue=null,this.storage=null,this.scene=null,this.systems=null}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(7),s=i(46),r=i(214),o=function(t,e,i,n,o,a){var h=new s(t,e,n,o),u=new r(t,i,n,a);return h.linkFile=u,u.linkFile=h,h.linkType="unityatlas",u.linkType="unityatlas",{texture:h,data:u}};n.register("unityAtlas",function(t,e,i,n,s){var r=new o(t,e,i,this.path,n,s);return this.addFile(r.texture),this.addFile(r.data),this}),t.exports=o},function(t,e,i){var n=i(7),s=i(36),r=i(29),o=function(t,e,i,n,r){var o=new s(t,e,i,r);return o.type="tilemapJSON",o.tilemapFormat=n,o};n.register("tilemapTiledJSON",function(t,e,i){if(Array.isArray(t))for(var n=0;n'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",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(220);t.exports=function(t,e){var i=n(t);return it.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomi&&(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(56),s=i(137);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(374),s=i(56);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(373);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(12),s=i(375);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(54);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(12);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(30);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(30);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(83);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(83);n.Area=i(838),n.Circumference=i(287),n.CircumferencePoint=i(128),n.Clone=i(837),n.Contains=i(30),n.ContainsPoint=i(836),n.ContainsRect=i(835),n.CopyFrom=i(834),n.Equals=i(833),n.GetBounds=i(832),n.GetPoint=i(290),n.GetPoints=i(288),n.Offset=i(831),n.OffsetPoint=i(830),n.Random=i(149),t.exports=n},function(t,e,i){var n=i(0),s=i(378),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(21),s=i(13),r=i(8),o=i(224);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(4),a=i(138);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(224);i(11).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(138);i(11).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(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(846),s=i(845),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(13),s=i(8),r=i(150);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(225);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(245),s=i(21),r=i(13),o=i(8),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(143);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(226);s.register("renderTexture",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",32),a=r(t,"height",32),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(13),s=i(8),r=i(2),o=i(227);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(13),s=i(104);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(242),s=i(21),r=i(13),o=i(8);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(243),r=i(13),o=i(8);r.register("container",function(t){var e=o(t,"x",0),i=o(t,"y",0),r=new s(this.scene,e,i);return n(this.scene,r,t),r})},function(t,e,i){var n=i(244),s=i(21),r=i(13),o=i(8);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(150);i(11).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(225);i(11).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(245);i(11).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(143);i(11).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(11),s=i(226);n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var n=i(11),s=i(395);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(11),s=i(227);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(104);i(11).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(242);i(11).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(243),s=!1;i(11).register("container",function(t,e,i){return s||(console.warn("Use of a beta feature: Containers"),s=!0),this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var n=i(244);i(11).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext,a=e.frame;e.updateTileTexture(),t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var h=a.x-e.originX*e.width,u=a.y-e.originY*e.height,l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY,d=1,f=1;if(e.flipX&&(d=-1,h+=e.width),e.flipY&&(f=-1,u+=e.height),t.config.roundPixels&&(h|=0,u|=0,l|=0,c|=0),o.save(),void 0!==r){var p=r.matrix;o.transform(p[0],p[1],p[2],p[3],p[4],p[5])}o.translate(h,u),o.translate(l,c),o.scale(d,f),o.translate(e.originX*e.width,e.originY*e.height),o.rotate(d*f*e.rotation),o.scale(this.scaleX,this.scaleY),o.translate(-e.originX*e.width,-e.originY*e.height),o.translate(-this.tilePositionX,-this.tilePositionY),o.fillStyle=e.canvasPattern,o.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(870),s=i(869),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);this.renderer.setFramebuffer(this.framebuffer);var s=this.gl;return s.clearColor(e/255,i/255,n/255,1),s.clear(s.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},clear:function(){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;return t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},draw:function(t,e,i,n){var s=t.source[e.sourceIndex].glTexture,r=(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16);return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,0,this.renderer.pipelines.TextureTintPipeline.height,-1e3,1e3),this.renderer.pipelines.TextureTintPipeline.drawTexture(s,i,n,r,this.globalAlpha,e.cutX,e.cutY,e.cutWidth,e.cutHeight,this.currentMatrix,null,this),this.renderer.setFramebuffer(null),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,this.renderer.pipelines.TextureTintPipeline.height,0,-1e3,1e3),this}}},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);return this.context.fillStyle="rgb("+e+","+i+","+n+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this},clear:function(){return this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.restore(),this},draw:function(t,e,i,n){var s=this.currentMatrix;return this.context.globalAlpha=this.globalAlpha,this.context.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),this.context.drawImage(t.source[e.sourceIndex].image,e.cutX,e.cutY,e.cutWidth,e.cutHeight,i,n,e.cutWidth,e.cutWidth),this}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=0,h=0,u=1,l=1;if(e.flipX?(u=-1,a-=e.canvas.width-e.displayOriginX):a-=e.displayOriginX,e.flipY?(l=-1,h-=e.canvas.height-e.displayOriginY):h-=e.displayOriginY,o.save(),void 0!==r){var c=r.matrix;o.transform(c[0],c[1],c[2],c[3],c[4],c[5])}o.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.scale(u,l),o.drawImage(e.canvas,a,h),o.restore()}}},function(t,e,i){var n=i(1),s=i(25);t.exports=function(t,e,i,r,o){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&r._id||this.pipeline.batchTexture(e,e.texture,e.texture.width,e.texture.height,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,e.texture.width,e.texture.height,s.getTintAppendFloatAlpha(e.tintTopLeft,e.alphaTopLeft),s.getTintAppendFloatAlpha(e.tintTopRight,e.alphaTopRight),s.getTintAppendFloatAlpha(e.tintBottomLeft,e.alphaBottomLeft),s.getTintAppendFloatAlpha(e.tintBottomRight,e.alphaBottomRight),0,0,r,o)}},function(t,e,i){var n=i(3),s=i(3);n=i(875),s=i(874),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(432),EdgeZone:i(431),RandomZone:i(396)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.emitters.list;if(!(0===o.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=t.currentContext;if(a.save(),void 0!==r){var h=r.matrix;a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}for(var u=0;u>24&255)/255;if(!(x<=0)){var w=y.frame,b=.5*w.width,T=.5*w.height,S=w.canvasData,A=-b,C=-T,M=y.x-p*y.scrollFactorX,E=y.y-g*y.scrollFactorY;v&&(M|=0,E|=0),a.globalAlpha=x,a.save(),a.translate(M,E),a.rotate(y.rotation),a.scale(y.scaleX,y.scaleY),a.drawImage(w.source.image,S.sx,S.sy,S.sWidth,S.sHeight,A,C,S.dWidth,S.dHeight),a.restore()}}a.globalAlpha=f}}a.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(879),s=i(878),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(0),s=i(240),r=i(59),o=i(2),a=i(34),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){t.exports={GravityWell:i(435),Particle:i(434),ParticleEmitter:i(433),ParticleEmitterManager:i(227),Zones:i(877)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,u=e.displayCallback,l=s.scrollX*e.scrollFactorX,c=s.scrollY*e.scrollFactorY,d=e.fontData.chars,f=e.fontData.lineHeight,p=0,g=0,v=0,m=0,y=null,x=0,w=0,b=0,T=0,S=0,A=0,C=null,M=0,E=t.currentContext,_=e.frame.source.image,L=h.cutX,P=h.cutY,F=0,R=e.fontSize/e.fontData.size;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,E.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,E.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),E.save(),void 0!==r){var k=r.matrix;E.transform(k[0],k[1],k[2],k[3],k[4],k[5])}E.translate(e.x,e.y),E.rotate(e.rotation),E.translate(-e.displayOriginX,-e.displayOriginY),E.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(E.save(),E.beginPath(),E.rect(0,0,e.cropWidth,e.cropHeight),E.clip());for(var O=t.config.roundPixels,D=0;D0&&e.cropHeight>0&&E.restore(),E.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text.length;n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(884),s=i(883),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,u=e.scrollFactorX,l=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,u=e.scrollFactorX,l=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.getRenderList();t.setBlendMode(e.blendMode);var a=t.gameContext,h=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY;if(a.save(),void 0!==r){var l=r.matrix;a.transform(l[0],l[1],l[2],l[3],l[4],l[5])}for(var c=0;c0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(891),s=i(890),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,u=e.fontData.chars,l=e.fontData.lineHeight,c=e.letterSpacing,d=0,f=0,p=0,g=0,v=null,m=0,y=0,x=0,w=0,b=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,E=h.cutX,_=h.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var P=t.config.roundPixels,F=e.x-s.scrollX*e.scrollFactorX+e.frame.x,R=e.y-s.scrollY*e.scrollFactorY+e.frame.y;if(P&&(F|=0,R|=0),C.save(),void 0!==r){var k=r.matrix;C.transform(k[0],k[1],k[2],k[3],k[4],k[5])}C.translate(F,R),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var O=0;O0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(894),s=i(893),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(4),s=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=e.chars,h=n(e,"image",""),u=n(e,"offset.x",0),l=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(h).width/i)>a.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},m=0,y=0;y?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(451);t.exports=function(t,e,i,s,r,o,a){var h=t.sys.textures.getFrame(i,s),u=t.sys.cache.xml.get(r);if(h&&u){var l=n(u,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:l,texture:i,frame:s}),!0}return!1}},function(t,e,i){var n={DisplayList:i(481),GameObjectCreator:i(13),GameObjectFactory:i(11),UpdateList:i(453),Components:i(14),BuildGameObject:i(21),BuildGameObjectAnimation:i(118),GameObject:i(1),BitmapText:i(245),Blitter:i(244),Container:i(243),DynamicBitmapText:i(242),Graphics:i(107),Group:i(104),Image:i(66),Particles:i(882),PathFollower:i(395),RenderTexture:i(226),Sprite3D:i(143),Sprite:i(31),Text:i(102),TileSprite:i(225),Zone:i(150),Factories:{Blitter:i(868),Container:i(867),DynamicBitmapText:i(866),Graphics:i(387),Group:i(865),Image:i(386),Particles:i(864),PathFollower:i(863),RenderTexture:i(862),Sprite3D:i(861),Sprite:i(385),StaticBitmapText:i(860),Text:i(384),TileSprite:i(859),Zone:i(858)},Creators:{Blitter:i(857),Container:i(856),DynamicBitmapText:i(855),Graphics:i(383),Group:i(854),Image:i(382),Particles:i(853),RenderTexture:i(852),Sprite3D:i(851),Sprite:i(381),StaticBitmapText:i(850),Text:i(380),TileSprite:i(849),Zone:i(848)}};n.Mesh=i(138),n.Quad=i(224),n.Factories.Mesh=i(844),n.Factories.Quad=i(843),n.Creators.Mesh=i(842),n.Creators.Quad=i(841),n.Light=i(379),i(378),i(840),t.exports=n},function(t,e,i){t.exports={AddToDOM:i(122),DOMContentLoaded:i(263),ParseXML:i(262),RemoveFromDOM:i(261),RequestAnimationFrame:i(260)}},function(t,e,i){var n=i(525);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e>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(266),Pool:i(22),Smoothing:i(123),TouchAction:i(908),UserSelect:i(907)}},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(580),GetBottom:i(44),GetCenterX:i(87),GetCenterY:i(84),GetLeft:i(42),GetOffsetX:i(911),GetOffsetY:i(910),GetRight:i(40),GetTop:i(38),SetBottom:i(43),SetCenterX:i(86),SetCenterY:i(85),SetLeft:i(41),SetRight:i(39),SetTop:i(37)}},function(t,e,i){var n=i(40),s=i(38),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){var n=i(87),s=i(38),r=i(43),o=i(86);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(38),r=i(41),o=i(37);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(84),s=i(40),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(39),o=i(37);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(84),s=i(42),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(41),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(86),o=i(37);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(924),BottomLeft:i(923),BottomRight:i(922),LeftBottom:i(921),LeftCenter:i(920),LeftTop:i(919),RightBottom:i(918),RightCenter:i(917),RightTop:i(916),TopCenter:i(915),TopLeft:i(914),TopRight:i(913)}},function(t,e,i){t.exports={BottomCenter:i(584),BottomLeft:i(583),BottomRight:i(582),Center:i(581),LeftCenter:i(579),QuickSet:i(585),RightCenter:i(578),TopCenter:i(577),TopLeft:i(576),TopRight:i(575)}},function(t,e,i){var n=i(291),s=i(17),r={In:i(926),To:i(925)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(927),Bounds:i(912),Canvas:i(909),Color:i(526),Masks:i(522)}},function(t,e,i){var n=i(0),s=i(6),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(535),r=i(533),o=i(11),a=i(532),h=i(929),u=i(531),l=i(12),c=i(529),d=i(6),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;i1)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){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,i){var n=i(15),s=i(4);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){"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(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(574),Animation:i(295),BlendMode:i(573),ComputedSize:i(572),Depth:i(571),Flip:i(570),GetBounds:i(569),MatrixStack:i(568),Origin:i(567),Pipeline:i(283),ScaleMode:i(566),ScrollFactor:i(565),Size:i(564),Texture:i(563),Tint:i(562),ToJSON:i(561),Transform:i(560),TransformMatrix:i(60),Visible:i(559)}},function(t,e,i){var n=i(289),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(292),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);uo.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={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;ns||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(144),r=i(278),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={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},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,i){var n=i(0),s=i(14),r=i(1),o=i(540),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),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=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=i(132),s=i(20);t.exports=function(t,e,i,r,o){for(var a=null,h=null,u=null,l=null,c=s(t,e,i,r,null,o),d=0;d=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(430);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=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}},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){var e=this.matrix,i=t.matrix,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=i[0],l=i[1],c=i[2],d=i[3],f=i[4],p=i[5];return e[0]=u*n+l*r,e[1]=u*s+l*o,e[2]=c*n+d*r,e[3]=c*s+d*o,e[4]=f*n+p*r+a,e[5]=f*s+p*o+h,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},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},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=n},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(14),r=i(366),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){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(0),s=i(56),r=i(219),o=i(218),a=i(92),h=i(145),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(1),o=i(438),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=a},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(96),s=i(8),r=i(58),o=i(59),a=i(69),h=i(155),u=i(98),l=i(4),c=i(97),d=i(95),f=i(94);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=[],E=0;E=t.length)){for(var i=t.length-1,n=t[e],s=e;s=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:r,onBlur:r,onFocus:r,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=o},function(t,e,i){var n,s=i(53),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,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,i){var n=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.blockSet=!1,this._frozen=!1,this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){return this.list[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if(this.events.listenerCount("changedata")>0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(a=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,i){var n=i(0),s=i(268),r=i(12),o=i(6),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){"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(30),r=i(290),o=i(288),a=i(149),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){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(140),s=i(0),r=i(3),o=i(79),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(47);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(285),r=i(148),o=i(147),a=i(6),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(11),o=i(57),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)))}},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(4);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(2),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(2),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]+" ")}r0&&(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.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(),resolution:this.resolution,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)}});t.exports=p},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(586),s=i(0),r=i(2),o=i(4),a=i(246),h=i(75),u=i(31),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(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&&void 0!==i.key&&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]);for(var e=[],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-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),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.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,d.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},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){return t?this.resume():this.pause()},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)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(){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)},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;e-m||T>-y||b-m||A>-y||Sl&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),this.shakeEffect.preRender()},removeBounds:function(){return this.useBounds=!1,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=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,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){return this.scene=t,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),this.zoom=t,this},startFollow:function(t,e){return void 0===e&&(e=!1),this._follow=t,this.roundPixels=e,this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e)},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.resetFX(),this.matrix.destroy(),this.culledObjects=[],this.target=void 0,this._bounds=void 0,this.scene=void 0}});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(16),r=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.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},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,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()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(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=s(!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}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(192),r=i(509),o=i(508),a=i(25),h=i(80),u=new n({Extends:h,Mixins:[s],initialize:function(t){h.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:o,fragShader:t.fragShader?t.fragShader:r,vertexCapacity:t.vertexCapacity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+2*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:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:4*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=2e3,this.batches=[],this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var n=i[i.length-1];return e>0?(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},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){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},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s,r,o,a,h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=t.emitters.list,v=g.length,m=this.vertexViewF32,y=this.vertexViewU32,x=this.renderer,w=this.maxQuads,b=e.scrollX,T=e.scrollY,S=e.matrix.matrix,A=S[0],C=S[1],M=S[2],E=S[3],_=S[4],L=S[5],P=Math.sin,F=Math.cos,R=this.vertexComponentCount,k=this.vertexCapacity,O=t.defaultFrame.source.glTexture;n&&(h=n[0],u=n[1],l=n[2],c=n[3],d=n[4],f=n[5]),this.setTexture2D(O,0);for(var D=0;D=k&&(this.flush(),this.setTexture2D(O,0));for(var V=0;V=k&&(this.flush(),this.setTexture2D(O,0))}}z+=H,Y-=H,this.vertexCount>=k&&(this.flush(),this.setTexture2D(O,0))}}}this.setTexture2D(O,0)},drawBlitter:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s=this.renderer.config.roundPixels,r=a.getTintAppendFloatAlpha,o=this.vertexViewF32,h=this.vertexViewU32,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),b=0;if(n){var T=n[0],S=n[1],A=n[2],C=n[3],M=n[4],E=n[5],_=-y,L=-x,P=A*d+C*p,F=A*f+C*g,R=M*d+E*p+(_*d+L*p+v),k=M*f+E*g+(_*f+L*g+m);d=T*d+S*p,f=T*f+S*g,p=P,g=F,v=R,m=k,y=0,x=0}for(var O=t.x-y,D=t.y-x,I=0;I=this.vertexCapacity&&this.flush()}b+=B,l-=B,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,u,l,c=this.renderer.config.roundPixels,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=e.matrix.matrix,v=t.frame,m=v.texture.source[v.sourceIndex].glTexture,y=!!m.isRenderTexture,x=t.flipX,w=t.flipY^y,b=v.uvs,T=v.width*(x?-1:1),S=v.height*(w?-1:1),A=-t.displayOriginX+v.x+v.width*(x?1:0),C=-t.displayOriginY+v.y+v.height*(w?1:0),M=(c?0|A:A)+T,E=(c?0|C:C)+S,_=t.scaleX,L=t.scaleY,P=t.rotation,F=t._alphaTL,R=t._alphaTR,k=t._alphaBL,O=t._alphaBR,D=t._tintTL,I=t._tintTR,B=t._tintBL,Y=t._tintBR,X=Math.sin(P),z=Math.cos(P),N=z*_,G=X*_,W=-X*L,U=z*L,V=t.x,H=t.y,j=g[0],q=g[1],K=g[2],J=g[3],Z=g[4],Q=g[5];if(n){var $=n[0],tt=n[1],et=n[2],it=n[3],nt=n[4],st=n[5],rt=-e.scrollX*t.scrollFactorX,ot=-e.scrollY*t.scrollFactorY,at=$*j+tt*K,ht=$*q+tt*J,ut=et*j+it*K,lt=et*q+it*J;s=N*at+G*ut,r=N*ht+G*lt,o=W*at+U*ut,h=W*ht+U*lt,u=V*at+H*ut+(nt*j+st*K+(rt*j+ot*K+Z)),l=V*ht+H*lt+(nt*q+st*J+(rt*q+ot*J+Q))}else s=N*j+G*K,r=N*q+G*J,o=W*j+U*K,h=W*q+U*J,u=(V-=e.scrollX*t.scrollFactorX)*j+(H-=e.scrollY*t.scrollFactorY)*K+Z,l=V*q+H*J+Q;var ct,dt=A*s+C*o+u,ft=A*r+C*h+l,pt=A*s+E*o+u,gt=A*r+E*h+l,vt=M*s+E*o+u,mt=M*r+E*h+l,yt=M*s+C*o+u,xt=M*r+C*h+l,wt=d(D,F),bt=d(I,R),Tt=d(B,k),St=d(Y,O);c&&(dt|=0,ft|=0,pt|=0,gt|=0,vt|=0,mt|=0,yt|=0,xt|=0),this.setTexture2D(m,0),f[(ct=this.vertexCount*this.vertexComponentCount)+0]=dt,f[ct+1]=ft,f[ct+2]=b.x0,f[ct+3]=b.y0,p[ct+4]=wt,f[ct+5]=pt,f[ct+6]=gt,f[ct+7]=b.x1,f[ct+8]=b.y1,p[ct+9]=Tt,f[ct+10]=vt,f[ct+11]=mt,f[ct+12]=b.x2,f[ct+13]=b.y2,p[ct+14]=St,f[ct+15]=dt,f[ct+16]=ft,f[ct+17]=b.x0,f[ct+18]=b.y0,p[ct+19]=wt,f[ct+20]=vt,f[ct+21]=mt,f[ct+22]=b.x2,f[ct+23]=b.y2,p[ct+24]=St,f[ct+25]=yt,f[ct+26]=xt,f[ct+27]=b.x3,f[ct+28]=b.y3,p[ct+29]=bt,this.vertexCount+=6},batchMesh:function(t,e,i){var n=null;i&&(n=i.matrix);var s=t.vertices,r=s.length,o=r/2|0;this.renderer.setPipeline(this),this.vertexCount+o>this.vertexCapacity&&this.flush();var h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=a.getTintAppendFloatAlpha,v=t.uv,m=t.colors,y=t.alphas,x=this.vertexViewF32,w=this.vertexViewU32,b=e.matrix.matrix,T=t.frame,S=t.texture.source[T.sourceIndex].glTexture,A=t.x,C=t.y,M=t.scaleX,E=t.scaleY,_=t.rotation,L=Math.sin(_),P=Math.cos(_),F=P*M,R=L*M,k=-L*E,O=P*E,D=A,I=C,B=b[0],Y=b[1],X=b[2],z=b[3],N=b[4],G=b[5],W=0;if(n){var U=n[0],V=n[1],H=n[2],j=n[3],q=n[4],K=n[5],J=-e.scrollX*t.scrollFactorX,Z=-e.scrollY*t.scrollFactorY,Q=U*B+V*X,$=U*Y+V*z,tt=H*B+j*X,et=H*Y+j*z;h=F*Q+R*tt,u=F*$+R*et,l=k*Q+O*tt,c=k*$+O*et,d=D*Q+I*tt+(q*B+K*X+(J*B+Z*X+N)),f=D*$+I*et+(q*Y+K*z+(J*Y+Z*z+G))}else h=F*B+R*X,u=F*Y+R*z,l=k*B+O*X,c=k*Y+O*z,d=(D-=e.scrollX*t.scrollFactorX)*B+(I-=e.scrollY*t.scrollFactorY)*X+N,f=D*Y+I*z+G;this.setTexture2D(S,0),W=this.vertexCount*this.vertexComponentCount;for(var it=0,nt=0;itthis.vertexCapacity&&this.flush();var s,r,o,h,u,l,c,d,f,p,g,v,m,y,x=this.renderer.config.roundPixels,w=t.text,b=w.length,T=a.getTintAppendFloatAlpha,S=this.vertexViewF32,A=this.vertexViewU32,C=e.matrix.matrix,M=e.width+50,E=e.height+50,_=t.frame,L=t.texture.source[_.sourceIndex],P=e.scrollX*t.scrollFactorX,F=e.scrollY*t.scrollFactorY,R=t.fontData,k=R.lineHeight,O=t.fontSize/R.size,D=R.chars,I=t.alpha,B=T(t._tintTL,I),Y=T(t._tintTR,I),X=T(t._tintBL,I),z=T(t._tintBR,I),N=t.x,G=t.y,W=_.cutX,U=_.cutY,V=L.width,H=L.height,j=L.glTexture,q=0,K=0,J=0,Z=0,Q=null,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,ut=0,lt=0,ct=null,dt=0,ft=N+_.x,pt=G+_.y,gt=t.rotation,vt=t.scaleX,mt=t.scaleY,yt=t.letterSpacing,xt=Math.sin(gt),wt=Math.cos(gt),bt=wt*vt,Tt=xt*vt,St=-xt*mt,At=wt*mt,Ct=ft,Mt=pt,Et=C[0],_t=C[1],Lt=C[2],Pt=C[3],Ft=C[4],Rt=C[5],kt=0;if(n){var Ot=n[0],Dt=n[1],It=n[2],Bt=n[3],Yt=n[4],Xt=n[5],zt=-P,Nt=-F,Gt=Ot*Et+Dt*Lt,Wt=Ot*_t+Dt*Pt,Ut=It*Et+Bt*Lt,Vt=It*_t+Bt*Pt;f=bt*Gt+Tt*Ut,p=bt*Wt+Tt*Vt,g=St*Gt+At*Ut,v=St*Wt+At*Vt,m=Ct*Gt+Mt*Ut+(Yt*Et+Xt*Lt+(zt*Et+Nt*Lt+Ft)),y=Ct*Wt+Mt*Vt+(Yt*_t+Xt*Pt+(zt*_t+Nt*Pt+Rt))}else f=bt*Et+Tt*Lt,p=bt*_t+Tt*Pt,g=St*Et+At*Lt,v=St*_t+At*Pt,m=(Ct-=P)*Et+(Mt-=F)*Lt+Ft,y=Ct*_t+Mt*Pt+Rt;this.setTexture2D(j,0);for(var Ht=0;HtM||r<-50||r>E)&&(o<-50||o>M||h<-50||h>E)&&(u<-50||u>M||l<-50||l>E)&&(c<-50||c>M||d<-50||d>E)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),kt=this.vertexCount*this.vertexComponentCount,x&&(s|=0,r|=0,o|=0,h|=0,u|=0,l|=0,c|=0,d|=0),S[kt+0]=s,S[kt+1]=r,S[kt+2]=at,S[kt+3]=ut,A[kt+4]=B,S[kt+5]=o,S[kt+6]=h,S[kt+7]=at,S[kt+8]=lt,A[kt+9]=X,S[kt+10]=u,S[kt+11]=l,S[kt+12]=ht,S[kt+13]=lt,A[kt+14]=z,S[kt+15]=s,S[kt+16]=r,S[kt+17]=at,S[kt+18]=ut,A[kt+19]=B,S[kt+20]=u,S[kt+21]=l,S[kt+22]=ht,S[kt+23]=lt,A[kt+24]=z,S[kt+25]=c,S[kt+26]=d,S[kt+27]=ht,S[kt+28]=ut,A[kt+29]=Y,this.vertexCount+=6))}}else q=0,J=0,K+=k,ct=null},batchDynamicBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,u,l,c,d,f,p,g,v,m,y,x,w,b,T,S,A,C=this.renderer.config.roundPixels,M=t.displayCallback,E=t.text,_=E.length,L=a.getTintAppendFloatAlpha,P=this.vertexViewF32,F=this.vertexViewU32,R=this.renderer,k=e.matrix.matrix,O=t.frame,D=t.texture.source[O.sourceIndex],I=e.scrollX*t.scrollFactorX,B=e.scrollY*t.scrollFactorY,Y=t.scrollX,X=t.scrollY,z=t.fontData,N=z.lineHeight,G=t.fontSize/z.size,W=z.chars,U=t.alpha,V=L(t._tintTL,U),H=L(t._tintTR,U),j=L(t._tintBL,U),q=L(t._tintBR,U),K=t.x,J=t.y,Z=O.cutX,Q=O.cutY,$=D.width,tt=D.height,et=D.glTexture,it=0,nt=0,st=0,rt=0,ot=null,at=0,ht=0,ut=0,lt=0,ct=0,dt=0,ft=0,pt=0,gt=0,vt=0,mt=0,yt=0,xt=null,wt=0,bt=K+O.x,Tt=J+O.y,St=t.rotation,At=t.scaleX,Ct=t.scaleY,Mt=t.letterSpacing,Et=Math.sin(St),_t=Math.cos(St),Lt=_t*At,Pt=Et*At,Ft=-Et*Ct,Rt=_t*Ct,kt=bt,Ot=Tt,Dt=k[0],It=k[1],Bt=k[2],Yt=k[3],Xt=k[4],zt=k[5],Nt=t.cropWidth>0||t.cropHeight>0,Gt=0;if(n){var Wt=n[0],Ut=n[1],Vt=n[2],Ht=n[3],jt=n[4],qt=n[5],Kt=-I,Jt=-B,Zt=Wt*Dt+Ut*Bt,Qt=Wt*It+Ut*Yt,$t=Vt*Dt+Ht*Bt,te=Vt*It+Ht*Yt;x=Lt*Zt+Pt*$t,w=Lt*Qt+Pt*te,b=Ft*Zt+Rt*$t,T=Ft*Qt+Rt*te,S=kt*Zt+Ot*$t+(jt*Dt+qt*Bt+(Kt*Dt+Jt*Bt+Xt)),A=kt*Qt+Ot*te+(jt*It+qt*Yt+(Kt*It+Jt*Yt+zt))}else x=Lt*Dt+Pt*Bt,w=Lt*It+Pt*Yt,b=Ft*Dt+Rt*Bt,T=Ft*It+Rt*Yt,S=(kt-=I)*Dt+(Ot-=B)*Bt+Xt,A=kt*It+Ot*Yt+zt;this.setTexture2D(et,0),Nt&&R.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var ee=0;ee<_;++ee)if(G=t.fontSize/t.fontData.size,St=0,10!==(rt=E.charCodeAt(ee))){if(ot=W[rt]){if(at=Z+ot.x,ht=Q+ot.y,ut=ot.width,lt=ot.height,ct=st+ot.xOffset+it-Y,dt=ot.yOffset+nt-X,null!==xt){var ie=ot.kerning[wt];ct+=void 0!==ie?ie:0}if(it+=ot.xAdvance+Mt,st+=1,xt=ot,wt=rt,0!==ut&&0!==lt&&32!==rt){if(M){var ne=M({color:0,tint:{topLeft:V,topRight:H,bottomLeft:j,bottomRight:q},index:ee,charCode:rt,x:ct,y:dt,scale:G,rotation:0,data:ot.data});ct=ne.x,dt=ne.y,G=ne.scale,St=ne.rotation,ne.color?(V=ne.color,H=ne.color,j=ne.color,q=ne.color):(V=ne.tint.topLeft,H=ne.tint.topRight,j=ne.tint.bottomLeft,q=ne.tint.bottomRight),V=L(V,U),H=L(H,U),j=L(j,U),q=L(q,U)}ct-=t.displayOriginX,dt-=t.displayOriginY,ct*=G,dt*=G,Et=Math.sin(St),_t=Math.cos(St),s=kt=(m=ct)*x+(y=dt)*b+S,r=Ot=m*w+y*T+A,o=(pt=lt)*(Ft=(g=-Et*G)*x+(v=_t*G)*b)+kt,h=pt*(Rt=g*w+v*T)+Ot,u=(ft=ut)*(Lt=(f=_t*G)*x+(p=Et*G)*b)+pt*Ft+kt,l=ft*(Pt=f*w+p*T)+pt*Rt+Ot,c=ft*Lt+kt,d=ft*Pt+Ot,gt=at/$,vt=(at+ut)/$,mt=ht/tt,yt=(ht+lt)/tt,this.vertexCount+6>this.vertexCapacity&&this.flush(),Gt=this.vertexCount*this.vertexComponentCount,C&&(s|=0,r|=0,o|=0,h|=0,u|=0,l|=0,c|=0,d|=0),P[Gt+0]=s,P[Gt+1]=r,P[Gt+2]=gt,P[Gt+3]=mt,F[Gt+4]=V,P[Gt+5]=o,P[Gt+6]=h,P[Gt+7]=gt,P[Gt+8]=yt,F[Gt+9]=j,P[Gt+10]=u,P[Gt+11]=l,P[Gt+12]=vt,P[Gt+13]=yt,F[Gt+14]=q,P[Gt+15]=s,P[Gt+16]=r,P[Gt+17]=gt,P[Gt+18]=mt,F[Gt+19]=V,P[Gt+20]=u,P[Gt+21]=l,P[Gt+22]=vt,P[Gt+23]=yt,F[Gt+24]=q,P[Gt+25]=c,P[Gt+26]=d,P[Gt+27]=vt,P[Gt+28]=mt,F[Gt+29]=H,this.vertexCount+=6}}}else it=0,st=0,nt+=N,xt=null;Nt&&R.popScissor()},batchText:function(t,e,i){var n=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),0,0,e,i)},batchDynamicTilemapLayer:function(t,e,i){for(var n=t.culledTiles,s=n.length,r=t.tileset.image.get().source.glTexture,o=t.tileset,h=t.scrollFactorX,u=t.scrollFactorY,l=t.alpha,c=t.x,d=t.y,f=t.scaleX,p=t.scaleY,g=a.getTintAppendFloatAlpha,v=0;vthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0;var P,F,R,k,O,D,I=this.renderer.config.roundPixels,B=this.vertexViewF32,Y=this.vertexViewU32,X=E.matrix.matrix,z=o*(c?1:0)-g,N=a*(d?1:0)-v,G=z+o*(c?-1:1),W=N+a*(d?-1:1),U=s,V=r,H=Math.sin(l),j=Math.cos(l),q=j*h,K=H*h,J=-H*u,Z=j*u,Q=U,$=V,tt=X[0],et=X[1],it=X[2],nt=X[3],st=X[4],rt=X[5];if(L){var ot=L[0],at=L[1],ht=L[2],ut=L[3],lt=L[4],ct=L[5],dt=-E.scrollX*f,ft=-E.scrollY*p,pt=ot*tt+at*it,gt=ot*et+at*nt,vt=ht*tt+ut*it,mt=ht*et+ut*nt;P=q*pt+K*vt,F=q*gt+K*mt,R=J*pt+Z*vt,k=J*gt+Z*mt,O=Q*pt+$*vt+(lt*tt+ct*it+(dt*tt+ft*it+st)),D=Q*gt+$*mt+(lt*et+ct*nt+(dt*et+ft*nt+rt))}else P=q*tt+K*it,F=q*et+K*nt,R=J*tt+Z*it,k=J*et+Z*nt,O=(Q-=E.scrollX*f)*tt+($-=E.scrollY*p)*it+st,D=Q*et+$*nt+rt;var yt,xt=z*P+N*R+O,wt=z*F+N*k+D,bt=z*P+W*R+O,Tt=z*F+W*k+D,St=G*P+W*R+O,At=G*F+W*k+D,Ct=G*P+N*R+O,Mt=G*F+N*k+D,Et=m/i+C,_t=y/n+M,Lt=(m+x)/i+C,Pt=(y+w)/n+M;this.setTexture2D(e,0),yt=this.vertexCount*this.vertexComponentCount,I&&(xt|=0,wt|=0,bt|=0,Tt|=0,St|=0,At|=0,Ct|=0,Mt|=0),B[yt+0]=xt,B[yt+1]=wt,B[yt+2]=Et,B[yt+3]=_t,Y[yt+4]=b,B[yt+5]=bt,B[yt+6]=Tt,B[yt+7]=Et,B[yt+8]=Pt,Y[yt+9]=T,B[yt+10]=St,B[yt+11]=At,B[yt+12]=Lt,B[yt+13]=Pt,Y[yt+14]=S,B[yt+15]=xt,B[yt+16]=wt,B[yt+17]=Et,B[yt+18]=_t,Y[yt+19]=b,B[yt+20]=St,B[yt+21]=At,B[yt+22]=Lt,B[yt+23]=Pt,Y[yt+24]=S,B[yt+25]=Ct,B[yt+26]=Mt,B[yt+27]=Lt,B[yt+28]=_t,Y[yt+29]=A,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,o,h,u,l,c){var d=null;c&&(d=c.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var f=this.renderer.config.roundPixels,p=this.vertexViewF32,g=this.vertexViewU32,v=e,m=i,y=v+h,x=m+u,w=l[0],b=l[1],T=l[2],S=l[3],A=l[4],C=l[5];if(d){var M=d[0],E=d[1],_=d[2],L=d[3],P=d[4],F=w*E+b*L,R=T*E+S*L,k=A*E+C*L+d[5];w=w*M+b*_,b=F,T=T*M+S*_,S=R,A=A*M+C*_+P,C=k}var O,D=v*w+m*T+A,I=v*b+m*S+C,B=v*w+x*T+A,Y=v*b+x*S+C,X=y*w+x*T+A,z=y*b+x*S+C,N=y*w+m*T+A,G=y*b+m*S+C,W=t.width,U=t.height,V=r/W,H=o/U,j=(r+h)/W,q=(o+u)/U;n=a.getTintAppendFloatAlpha(n,s),this.setTexture2D(t,0),O=this.vertexCount*this.vertexComponentCount,f&&(D|=0,I|=0,B|=0,Y|=0,X|=0,z|=0,N|=0,G|=0),p[O+0]=D,p[O+1]=I,p[O+2]=V,p[O+3]=H,g[O+4]=n,p[O+5]=B,p[O+6]=Y,p[O+7]=V,p[O+8]=q,g[O+9]=n,p[O+10]=X,p[O+11]=z,p[O+12]=j,p[O+13]=q,g[O+14]=n,p[O+15]=D,p[O+16]=I,p[O+17]=V,p[O+18]=H,g[O+19]=n,p[O+20]=X,p[O+21]=z,p[O+22]=j,p[O+23]=q,g[O+24]=n,p[O+25]=N,p[O+26]=G,p[O+27]=j,p[O+28]=H,g[O+29]=n,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=u},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===i&&(i=!0),e&&("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e)),n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},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(93),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.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(1),o=i(847),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,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"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),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.length=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(67),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(48),s=i(83),r=i(30),o=i(0),a=i(14),h=i(1),u=i(12),l=i(28),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},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},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(9),r=i(68),o=i(57),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=i(0),s=i(18),r=i(2),o=i(117),a=new n({Extends:s,initialize:function(t,e,i,n){this.locked="ontouchstart"in window,this.loaded=!1;var o={type:"audio",extension:r(e,"type",""),key:t,url:r(e,"uri",e),path:i,config:n};s.call(this,o)},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t0&&e.cameraFilter&r._id)){var u=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,c=e.x,d=e.y,f=e.scaleX,p=e.scaleY,g=e.rotation,v=e.commandBuffer,m=a||t.currentContext,y=1,x=1,w=0,b=0,T=1,S=0,A=0,C=0;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,m.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,m.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),m.save(),o){var M=o.matrix;m.transform(M[0],M[1],M[2],M[3],M[4],M[5])}m.translate(c-u,d-l),m.rotate(g),m.scale(f,p),m.fillStyle="#fff",m.globalAlpha=e.alpha;for(var E=0,_=v.length;E<_;++E)switch(v[E]){case n.ARC:m.arc(v[E+1],v[E+2],v[E+3],v[E+4],v[E+5],v[E+6]),E+=6;break;case n.LINE_STYLE:T=v[E+1],w=v[E+2],y=v[E+3],S=(16711680&w)>>>16,A=(65280&w)>>>8,C=255&w,m.strokeStyle="rgba("+S+","+A+","+C+","+y+")",m.lineWidth=T,E+=3;break;case n.FILL_STYLE:b=v[E+1],x=v[E+2],S=(16711680&b)>>>16,A=(65280&b)>>>8,C=255&b,m.fillStyle="rgba("+S+","+A+","+C+","+x+")",E+=2;break;case n.BEGIN_PATH:m.beginPath();break;case n.CLOSE_PATH:m.closePath();break;case n.FILL_PATH:h||m.fill();break;case n.STROKE_PATH:h||m.stroke();break;case n.FILL_RECT:h?m.rect(v[E+1],v[E+2],v[E+3],v[E+4]):m.fillRect(v[E+1],v[E+2],v[E+3],v[E+4]),E+=4;break;case n.FILL_TRIANGLE:m.beginPath(),m.moveTo(v[E+1],v[E+2]),m.lineTo(v[E+3],v[E+4]),m.lineTo(v[E+5],v[E+6]),m.closePath(),h||m.fill(),E+=6;break;case n.STROKE_TRIANGLE:m.beginPath(),m.moveTo(v[E+1],v[E+2]),m.lineTo(v[E+3],v[E+4]),m.lineTo(v[E+5],v[E+6]),m.closePath(),h||m.stroke(),E+=6;break;case n.LINE_TO:m.lineTo(v[E+1],v[E+2]),E+=2;break;case n.MOVE_TO:m.moveTo(v[E+1],v[E+2]),E+=2;break;case n.LINE_FX_TO:m.lineTo(v[E+1],v[E+2]),E+=5;break;case n.MOVE_FX_TO:m.moveTo(v[E+1],v[E+2]),E+=5;break;case n.SAVE:m.save();break;case n.RESTORE:m.restore();break;case n.TRANSLATE:m.translate(v[E+1],v[E+2]),E+=2;break;case n.SCALE:m.scale(v[E+1],v[E+2]),E+=2;break;case n.ROTATE:m.rotate(v[E+1]),E+=1}m.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(161),s=i(105),r=i(61),o=i(15);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,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var o=i?i+r.toString():r.toString();n&&(o=o.concat(n)),s.push(o)}else s.push(r);return s}},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){var n=i(0),s=i(19),r=i(121),o=i(55),a=new n({initialize:function(t,e,i,n){var s=t.manager.game;this.texture=t,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.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){t.config.renderType===s.WEBGL&&(this.glTexture=t.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.pixelArt&&this.setFilter(1)},setFilter:function(t){var e=this.texture.manager.game;e.config.renderType===s.WEBGL&&e.renderer.setTextureFilter(this.glTexture,t)},destroy:function(){this.texture=null,this.image=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(119),r=i(167),o=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.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},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(73),s=i(0),r=i(175),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=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(){if(this.locked="ontouchstart"in window,this.locked){this.lockedActionsQueue=[];var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.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.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(en&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i=0;t--){this.scenes[t].sys.destroy()}this.update=o,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.startListeners()},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},s={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("touchstart",t,s),i.addEventListener("touchmove",t,s),i.addEventListener("touchend",t,s)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("touchstart",t,n),i.addEventListener("touchmove",t,n),i.addEventListener("touchend",t,n)),this.handler=t},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.handler),t.removeEventListener("touchmove",this.handler),t.removeEventListener("touchend",this.handler)},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new s,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.dragState=0,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.movementX=0,this.movementY=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},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}},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},touchmove:function(t){this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.dirty=!0,this.wasTouch=!1},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){this.buttons=1,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},touchend:function(t,e){this.buttons=0,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return 1&this.buttons},rightButtonDown:function(){return 2&this.buttons},middleButtonDown:function(){return 4&this.buttons},backButtonDown:function(){return 8&this.buttons},forwardButtonDown:function(){return 16&this.buttons},destroy:function(){this.camera=null,this.manager=null,this.position=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(112),r=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler,this.locked=!1},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},pointerLockChange:function(t){var e=this.target;this.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,this.manager.queue.push(t)},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},r={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("mousemove",t,r),i.addEventListener("mousedown",t,r),i.addEventListener("mouseup",t,r)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("mousemove",t,n),i.addEventListener("mousedown",t,n),i.addEventListener("mouseup",t,n)),this.handler=t,s.pointerLock&&(this.pointerLockChange=this.pointerLockChange.bind(this),document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.handler),t.removeEventListener("mousedown",this.handler),t.removeEventListener("mouseup",this.handler),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=i(501),o=i(499),a=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});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)=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=this.game.config.resolution,c=this._tempMatrix,f=0;fe.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(23),s=i(0),r=i(200),o=i(199),a=i(4),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),t.updateFrame(this.frames[e])},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,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),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.forward=!0,t.updateFrame(t.currentFrame.nextFrame),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(67);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,i){var n=i(0),s=i(138),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()},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(14),o=i(19),a=i(1),h=i(388),u=i(871),l=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,u,l){var c=t.sys.game.renderer;a.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=c,this.setTexture(u,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.frame.width),this.potHeight=h(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(this,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.oldFrame=null,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){(this.dirty||this.oldFrame!==this.frame)&&(this.oldFrame=this.frame,this.canvasBufferCtx.clearRect(0,0,this.canvasBuffer.width,this.canvasBuffer.height),this.renderer.gl?(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode)):(this.canvasBuffer.width=this.frame.cutWidth,this.canvasBuffer.height=this.frame.cutHeight,this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.frame.cutWidth,this.frame.cutHeight),this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat")),this.dirty=!1)},destroy:function(){this.renderer.gl&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(22),s=i(0),r=i(14),o=i(19),a=i(1),h=i(879),u=i(876),l=i(875),c=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.MatrixStack,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r){if(void 0===s&&(s=32),void 0===r&&(r=32),a.call(this,t,"RenderTexture"),this.initMatrixStack(),this.renderer=t.sys.game.renderer,this.globalTint=16777215,this.globalAlpha=1,this.renderer.type===o.WEBGL){var h=this.renderer.gl;this.gl=h,this.fill=l.fill,this.clear=l.clear,this.draw=l.draw,this.drawFrame=l.drawFrame,this.texture=this.renderer.createTexture2D(0,h.NEAREST,h.NEAREST,h.CLAMP_TO_EDGE,h.CLAMP_TO_EDGE,h.RGBA,null,s,r,!1),this.framebuffer=this.renderer.createFramebuffer(s,r,this.texture,!1)}else this.renderer.type===o.CANVAS&&(this.fill=u.fill,this.clear=u.clear,this.draw=u.draw,this.drawFrame=u.drawFrame,this.canvas=n.create2D(this,s,r),this.context=this.canvas.getContext("2d"));this.setPosition(e,i),this.setSize(s,r),this.initPipeline("TextureTintPipeline")},destroy:function(){a.prototype.destroy.call(this),this.renderer.type===o.WEBGL&&(this.renderer.deleteTexture(this.texture),this.renderer.deleteFramebuffer(this.framebuffer))},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this}});t.exports=c},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(435),a=i(89),h=i(433),u=i(883),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;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}},destroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,o.prototype.destroy.call(this)}});t.exports=c},function(t,e,i){var n=i(895),s=i(892),r=i(0),o=i(14),a=i(119),h=i(1),u=i(89),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,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}});t.exports=l},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(452),a=i(899),h=i(898),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.letterSpacing=0,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this.letterSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this.text=t.toString(),this.updateDisplayOrigin()),this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing};return t.data=e,t}});u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(4),s=i(91),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(6);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){"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(111),r=i(250),o=i(192),a=i(512),h=i(511),u=i(25),l=i(80),c=function(t,e,i,n,s){this.x=t,this.y=e,this.width=i,this.rgb=n,this.alpha=s},d=function(t,e,i,n,s){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,n,s)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,v=[],m=new n({Extends:l,Mixins:[o],initialize:function(t){l.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:h,fragShader:t.fragShader?t.fragShader:a,vertexCapacity:t.vertexCapcity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:2*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.tempTriangle=[{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1}],this.polygonCache=[],this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchFillRect:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m,y){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var x=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount,T=r+a,S=o+h,A=y[0],C=y[1],M=y[2],E=y[3],_=d*A+f*M,L=d*C+f*E,P=p*A+g*M,F=p*C+g*E,R=v*A+m*M+y[4],k=v*C+m*E+y[5],O=r*_+o*P+R,D=r*L+o*F+k,I=r*_+S*P+R,B=r*L+S*F+k,Y=T*_+S*P+R,X=T*L+S*F+k,z=T*_+o*P+R,N=T*L+o*F+k,G=u.getTintAppendFloatAlphaAndSwap(l,c);x[b+0]=O,x[b+1]=D,w[b+2]=G,x[b+3]=I,x[b+4]=B,w[b+5]=G,x[b+6]=Y,x[b+7]=X,w[b+8]=G,x[b+9]=O,x[b+10]=D,w[b+11]=G,x[b+12]=Y,x[b+13]=X,w[b+14]=G,x[b+15]=z,x[b+16]=N,w[b+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m,y,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var b=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=w[0],C=w[1],M=w[2],E=w[3],_=p*A+g*M,L=p*C+g*E,P=v*A+m*M,F=v*C+m*E,R=y*A+x*M+w[4],k=y*C+x*E+w[5],O=r*_+o*P+R,D=r*L+o*F+k,I=a*_+h*P+R,B=a*L+h*F+k,Y=l*_+c*P+R,X=l*L+c*F+k,z=u.getTintAppendFloatAlphaAndSwap(d,f);b[S+0]=O,b[S+1]=D,T[S+2]=z,b[S+3]=I,b[S+4]=B,T[S+5]=z,b[S+6]=Y,b[S+7]=X,T[S+8]=z,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,w){var b=this.tempTriangle;b[0].x=r,b[0].y=o,b[0].width=c,b[0].rgb=d,b[0].alpha=f,b[1].x=a,b[1].y=h,b[1].width=c,b[1].rgb=d,b[1].alpha=f,b[2].x=u,b[2].y=l,b[2].width=c,b[2].rgb=d,b[2].alpha=f,b[3].x=r,b[3].y=o,b[3].width=c,b[3].rgb=d,b[3].alpha=f,this.batchStrokePath(t,e,i,n,s,b,c,d,f,p,g,v,m,y,x,!1,w)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v){this.renderer.setPipeline(this);for(var m,y,x,w,b,T,S,A,C,M,E,_,L,P,F,R,k,O=o.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,Y=0,X=v[0],z=v[1],N=v[2],G=v[3],W=l*X+c*N,U=l*z+c*G,V=d*X+f*N,H=d*z+f*G,j=p*X+g*N+v[4],q=p*z+g*G+v[5],K=u.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,_=(T=D[x+0])*W+(S=D[x+1])*V+j,L=T*U+S*H+q,P=(A=D[w+0])*W+(C=D[w+1])*V+j,F=A*U+C*H+q,R=(M=D[b+0])*W+(E=D[b+1])*V+j,k=M*U+E*H+q,I[Y+0]=_,I[Y+1]=L,B[Y+2]=K,I[Y+3]=P,I[Y+4]=F,B[Y+5]=K,I[Y+6]=R,I[Y+7]=k,B[Y+8]=K,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m){var y,x;this.renderer.setPipeline(this);for(var w,b,T,S,A=r.length,C=this.polygonCache,M=this.vertexViewF32,E=this.vertexViewU32,_=u.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=C[P-1]||C[F-1],b=C[P],M[(T=this.vertexCount*this.vertexComponentCount)+0]=w[6],M[T+1]=w[7],E[T+2]=_(w[8],h),M[T+3]=w[0],M[T+4]=w[1],E[T+5]=_(w[2],h),M[T+6]=b[9],M[T+7]=b[10],E[T+8]=_(b[11],h),M[T+9]=w[0],M[T+10]=w[1],E[T+11]=_(w[2],h),M[T+12]=w[6],M[T+13]=w[7],E[T+14]=_(w[8],h),M[T+15]=b[3],M[T+16]=b[4],E[T+17]=_(b[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,m,y,x,w,b){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var T=b[0],S=b[1],A=b[2],C=b[3],M=g*T+v*A,E=g*S+v*C,_=m*T+y*A,L=m*S+y*C,P=x*T+w*A+b[4],F=x*S+w*C+b[5],R=this.vertexViewF32,k=this.vertexViewU32,O=a-r,D=h-o,I=Math.sqrt(O*O+D*D),B=l*(h-o)/I,Y=l*(r-a)/I,X=c*(h-o)/I,z=c*(r-a)/I,N=a-X,G=h-z,W=r-B,U=o-Y,V=a+X,H=h+z,j=r+B,q=o+Y,K=N*M+G*_+P,J=N*E+G*L+F,Z=W*M+U*_+P,Q=W*E+U*L+F,$=V*M+H*_+P,tt=V*E+H*L+F,et=j*M+q*_+P,it=j*E+q*L+F,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return R[ot+0]=K,R[ot+1]=J,k[ot+2]=rt,R[ot+3]=Z,R[ot+4]=Q,k[ot+5]=st,R[ot+6]=$,R[ot+7]=tt,k[ot+8]=rt,R[ot+9]=Z,R[ot+10]=Q,k[ot+11]=st,R[ot+12]=et,R[ot+13]=it,k[ot+14]=st,R[ot+15]=$,R[ot+16]=tt,k[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var r,o,a,h,u,l,m,y,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,b=t.x,T=t.y,S=t.scaleX,A=t.scaleY,C=t.rotation,M=t.commandBuffer,E=t.alpha,_=1,L=1,P=0,F=0,R=1,k=e.matrix.matrix,O=null,D=0,I=0,B=0,Y=0,X=0,z=0,N=0,G=0,W=0,U=0,V=null,H=Math.sin,j=Math.cos,q=2*Math.PI,K=H(C),J=j(C),Z=J*S,Q=K*S,$=-K*A,tt=J*A,et=b,it=T,nt=k[0],st=k[1],rt=k[2],ot=k[3],at=k[4],ht=k[5];if(n){var ut=n[0],lt=n[1],ct=n[2],dt=n[3],ft=n[4],pt=n[5],gt=-x,vt=-w,mt=ut*nt+lt*rt,yt=ut*st+lt*ot,xt=ct*nt+dt*rt,wt=ct*st+dt*ot;r=Z*mt+Q*xt,o=Z*yt+Q*wt,a=$*mt+tt*xt,h=$*yt+tt*wt,u=et*mt+it*xt+(ft*nt+pt*rt+(gt*nt+vt*rt+at)),l=et*yt+it*wt+(ft*st+pt*ot+(gt*st+vt*ot+ht))}else r=Z*nt+Q*rt,o=Z*st+Q*ot,a=$*nt+tt*rt,h=$*st+tt*ot,u=(et-=x)*nt+(it-=w)*rt+at,l=et*st+it*ot+ht;v.length=0;for(var bt=0,Tt=M.length;bt0&&(W=W%q-q):W>q?W=q:W<0&&(W=q+W%q);D<1;)I=X+j(Y=W*D+G)*N,B=z+H(Y)*N,O.points.push(new c(I,B,R,P,_*E)),D+=.01;I=X+j(Y=W+G)*N,B=z+H(Y)*N,O.points.push(new c(I,B,R,P,_*E)),bt+=6;break;case s.LINE_STYLE:R=M[bt+1],P=M[bt+2],_=M[bt+3],bt+=3;break;case s.FILL_STYLE:F=M[bt+1],L=M[bt+2],bt+=2;break;case s.BEGIN_PATH:v.length=0,O=null;break;case s.CLOSE_PATH:O&&O.points.length&&O.points.push(O.points[0]);break;case s.FILL_PATH:for(m=0,y=v.length;m=0&&n>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,o?(s.disable(s.SCISSOR_TEST),this):(s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?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),this},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},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;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),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?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),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){return 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=this.config.resolution,i=Math.floor(t.x*e),n=Math.floor(t.y*e),s=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,n,s,r),t.backgroundColor.alphaGL>0){var a=t.backgroundColor,h=this.pipelines.FlatTintPipeline;h.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),h.flush()}},postRenderCamera:function(t){var e=this.pipelines.FlatTintPipeline,i=t.flashEffect.postRenderWebGL(e,o.getTintFromFloats);(t.fadeEffect.postRenderWebGL(e,o.getTintFromFloats)||i)&&e.flush(),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()}},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;u0&&(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=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,w=i*a-n*o,b=i*h-s*o,T=n*h-s*a,S=u*p-l*f,A=u*g-c*f,C=u*v-d*f,M=l*g-c*p,E=l*v-d*p,_=c*v-d*g,L=m*_-y*E+x*M+w*C-b*A+T*S;return L?(L=1/L,t[0]=(o*_-a*E+h*M)*L,t[1]=(n*E-i*_-s*M)*L,t[2]=(p*T-g*b+v*w)*L,t[3]=(c*b-l*T-d*w)*L,t[4]=(a*C-r*_-h*A)*L,t[5]=(e*_-n*C+s*A)*L,t[6]=(g*x-f*T-v*y)*L,t[7]=(u*T-c*x+d*y)*L,t[8]=(r*E-o*C+h*S)*L,t[9]=(i*C-e*E-s*S)*L,t[10]=(f*b-p*x+v*m)*L,t[11]=(l*x-u*b-d*m)*L,t[12]=(o*A-r*M-a*S)*L,t[13]=(e*M-i*A+n*S)*L,t[14]=(p*y-f*w-g*m)*L,t[15]=(u*w-l*y+c*m)*L,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-l*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-l*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+l*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-u*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-u*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+u*(n*h-s*a),t[8]=r*(l*v-d*p)-u*(o*v-h*p)+f*(o*d-h*l),t[9]=-(e*(l*v-d*p)-u*(i*v-s*p)+f*(i*d-s*l)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*l)-r*(i*d-s*l)+u*(i*h-s*o)),t[12]=-(r*(l*g-c*p)-u*(o*g-a*p)+f*(o*c-a*l)),t[13]=e*(l*g-c*p)-u*(i*g-n*p)+f*(i*c-n*l),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*l)-r*(i*c-n*l)+u*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(l*v-d*p)+(e*h-s*r)*(l*g-c*p)+(i*a-n*o)*(u*v-d*f)-(i*h-s*o)*(u*g-c*f)+(n*h-s*a)*(u*p-l*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],w=y[1],b=y[2],T=y[3];return e[0]=x*i+w*o+b*l+T*p,e[1]=x*n+w*a+b*c+T*g,e[2]=x*s+w*h+b*d+T*v,e[3]=x*r+w*u+b*f+T*m,x=y[4],w=y[5],b=y[6],T=y[7],e[4]=x*i+w*o+b*l+T*p,e[5]=x*n+w*a+b*c+T*g,e[6]=x*s+w*h+b*d+T*v,e[7]=x*r+w*u+b*f+T*m,x=y[8],w=y[9],b=y[10],T=y[11],e[8]=x*i+w*o+b*l+T*p,e[9]=x*n+w*a+b*c+T*g,e[10]=x*s+w*h+b*d+T*v,e[11]=x*r+w*u+b*f+T*m,x=y[12],w=y[13],b=y[14],T=y[15],e[12]=x*i+w*o+b*l+T*p,e[13]=x*n+w*a+b*c+T*g,e[14]=x*s+w*h+b*d+T*v,e[15]=x*r+w*u+b*f+T*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,u=s*o;return this.set(h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,u*o+i,u*a-n*r,0,h*a-n*o,u*a+n*r,s*a*a+i,0,0,0,0,1),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),u=1-h,l=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],w=i[10],b=i[11],T=n*n*u+h,S=s*n*u+r*a,A=r*n*u-s*a,C=n*s*u-r*a,M=s*s*u+h,E=r*s*u+n*a,_=n*r*u+s*a,L=s*r*u-n*a,P=r*r*u+h;return i[0]=l*T+p*S+y*A,i[1]=c*T+g*S+x*A,i[2]=d*T+v*S+w*A,i[3]=f*T+m*S+b*A,i[4]=l*C+p*M+y*E,i[5]=c*C+g*M+x*E,i[6]=d*C+v*M+w*E,i[7]=f*C+m*M+b*E,i[8]=l*_+p*L+y*P,i[9]=c*_+g*L+x*P,i[10]=d*_+v*L+w*P,i[11]=f*_+m*L+b*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],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},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],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},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],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},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,u=r+r,l=n*a,c=n*h,d=n*u,f=s*h,p=s*u,g=r*u,v=o*a,m=o*h,y=o*u;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(l+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(l+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,u=i*o,l=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=l+m,e[2]=c-v,e[3]=0,e[4]=l-m,e[5]=1-(u+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(u+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),u=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*u,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*u,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,u=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,u=0===u?u:1/u,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},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,u=i.z,l=e.x,c=e.y,d=e.z;if(Math.abs(s-l)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-l,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-u*(p*=v),y=u*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var w=p*x-g*y,b=g*m-f*x,T=f*y-p*m;return(v=Math.sqrt(w*w+b*b+T*T))?(w*=v=1/v,b*=v,T*=v):(w=0,b=0,T=0),n[0]=m,n[1]=w,n[2]=f,n[3]=0,n[4]=y,n[5]=b,n[6]=p,n[7]=0,n[8]=x,n[9]=T,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(w*s+b*r+T*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),u=Math.cos(i);return n[10]=1,n[15]=1,n[0]=u,n[1]=h,n[4]=-h,n[5]=u,h=Math.sin(e),u=Math.cos(e),o[0]=1,o[15]=1,o[5]=u,o[10]=u,o[9]=-h,o[6]=h,h=Math.sin(t),u=Math.cos(t),a[5]=1,a[15]=1,a[0]=u,a[2]=-h,a[8]=h,a[10]=u,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(272),r=i(545),o=i(544),a=i(543),h=i(75),u=i(143),l=i(6),c=i(82),d=i(271),f=new c,p=new d,g=new c,v=new c,m=new s,y=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(27),s=i(276);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(27);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n,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;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(153),r=i(10),o=i(152),a=i(57),h=i(68),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(2),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(620),s=i(309),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(20);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.settings.status!==r.RUNNING?this.manager.queueOp("start",t,e):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==r.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=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)},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}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(52),s=i(16),r={SceneManager:i(180),ScenePlugin:i(320),Settings:i(178),Systems:i(109)};r=s(!1,r,n),t.exports=r},,,,function(t,e,i){var n=i(30),s=i(0),r=i(64),o=i(28),a=i(6),h=new s({initialize:function(t,e){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=e.displayWidth,this.height=e.displayHeight,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},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){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),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){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},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(30),s=i(0),r=i(64),o=i(142),a=i(12),h=i(28),u=i(60),l=i(6),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.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.dirty=!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;if(this.syncBounds){var n=t.getBounds(this._bounds);n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._reset=!0)}else{var s=Math.abs(e.scaleX),r=Math.abs(e.scaleY);s===this._sx&&r===this._sy||(this.width=this.sourceWidth*s,this.height=this.sourceHeight*r,this._sx=s,this._sy=r,this._reset=!0)}this._reset&&(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.dirty=!0,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;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),this.newVelocity.set(this.velocity.x*t,this.velocity.y*t),this.position.x+=this.newVelocity.x,this.position.y+=this.newVelocity.y,this.updateCenter(),this.position.x===this.prev.x&&this.position.y===this.prev.y||(this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),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(),this._reset=!1},postUpdate:function(){this.enable&&this.dirty&&(this.dirty=!1,this._dx=this.deltaX(),this._dy=this.deltaY(),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.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.updateCenter(),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(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.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},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 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},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},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 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(330),s=i(23),r=i(0),o=i(329),a=i(64),h=i(54),u=i(9),l=i(328),c=i(327),d=i(4),f=i(213),p=i(676),g=i(12),v=i(212),m=i(675),y=i(670),x=i(669),w=i(75),b=i(325),T=i(326),S=i(6),A=i(34),C=new r({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.bodies=new w,this.staticBodies=new w,this.pendingDestroy=new w,this.colliders=new f,this.gravity=new S(d(e,"gravity.x",0),d(e,"gravity.y",0)),this.bounds=new g(d(e,"x",0),d(e,"y",0),d(e,"width",t.sys.game.config.width),d(e,"height",t.sys.game.config.height)),this.checkCollision={up:d(e,"checkCollision.up",!0),down:d(e,"checkCollision.down",!0),left:d(e,"checkCollision.left",!0),right:d(e,"checkCollision.right",!0)},this.OVERLAP_BIAS=d(e,"overlapBias",4),this.TILE_BIAS=d(e,"tileBias",16),this.forceX=d(e,"forceX",!1),this.isPaused=d(e,"isPaused",!1),this._total=0,this.drawDebug=d(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:d(e,"debugShowBody",!0),debugShowStaticBody:d(e,"debugShowStaticBody",!0),debugShowVelocity:d(e,"debugShowVelocity",!0),bodyDebugColor:d(e,"debugBodyColor",16711935),staticBodyDebugColor:d(e,"debugStaticBodyColor",255),velocityDebugColor:d(e,"debugVelocityColor",65280)},this.maxEntries=d(e,"maxEntries",16),this.tree=new v(this.maxEntries),this.staticTree=new v(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);var i=1;if(Array.isArray(t))for(i=t.length;i--;)t[i].hasOwnProperty("children")?this.enable(t[i].children.entries,e):this.enableBody(t[i],e);else t.hasOwnProperty("children")?this.enable(t.children.entries,e):this.enableBody(t,e)},enableBody:function(t,e){return null===t.body&&(e===a.DYNAMIC_BODY?(t.body=new n(this,t),this.bodies.set(t.body)):e===a.STATIC_BODY&&(t.body=new b(this,t),this.staticBodies.set(t.body),this.staticTree.insert(t.body))),t},remove:function(t){this.disableBody(t)},disable:function(t){var e=1;if(Array.isArray(t))for(e=t.length;e--;)t[e].hasOwnProperty("children")?this.disable(t[e].children.entries):this.disableGameObjectBody(t[e]);else t.hasOwnProperty("children")?this.disable(t.children.entries):this.disableGameObjectBody(t)},disableGameObjectBody:function(t){return t.body&&(t.body.physicsType===a.DYNAMIC_BODY?this.bodies.delete(t.body):t.body.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t.body),this.staticTree.remove(t.body)),t.body.enable=!1),t},disableBody:function(t){t.physicsType===a.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t)),t.enable=!1},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},setBounds:function(t,e,i,n,s,r,o,a){return this.bounds.setTo(t,e,i,n),void 0!==s&&this.setBoundsCollision(s,r,o,a),this},setBoundsCollision: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.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit("pause"),this},resume:function(){return this.isPaused=!1,this.emit("resume"),this},addCollider:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!1,t,e,i,n,s);return this.colliders.add(r),r},addOverlap:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!0,t,e,i,n,s);return this.colliders.add(r),r},removeCollider:function(t){return this.colliders.remove(t),this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i,n;e/=1e3,this.delta=e;var s=this.bodies.entries,r=s.length;for(i=0;i0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(d.x,d.y,u.right,u.y)-d.radius):d.y>u.bottom&&(d.xu.right&&(a=h(d.x,d.y,u.right,u.bottom)-d.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 f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,m=e.velocity.y,y=e.mass,x=f*Math.cos(o)+p*Math.sin(o),w=f*Math.sin(o)-p*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);return 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,f=t.velocity.x,p=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>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&m>p?t.velocity.y*=-1:m<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&m0&&!e.immovable&&f>m&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+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?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?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=t.isParent&&void 0===t.physicsType?t.children.entries:t,e=e.isParent&&void 0===e.physicsType?e.children.entries:e;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=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.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,g=e.getTilesWithinWorldXY(a,h,u,l);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},y=0;y=0?t:t+2*Math.PI}},function(t,e,i){var n=i(7),s=i(46),r=function(t,e,i,n,r){var o=new s(t,e,n,r,i);return o.type="spritesheet",o};n.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;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&&(t.input.dropZone=n),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);if(e){t.camera=e;for(var i=this.manager.hitTest(t.x,t.y,this._list,e),n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var h=[];for(i=0;i1&&(this.sortGameObjects(h),this.topOnly&&h.splice(1)),this._drag[t.id]=h,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(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},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;n-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._tempZones=[],this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&(r+=this.processUpEvents(n)),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off("transitionstart",this.transitionIn,this),e.off("transitionout",this.transitionOut,this),e.off("transitioncomplete",this.transitionComplete,this),e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.keyboard=null,this.mouse=null,this.gamepad=null},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){t.exports={DUALSHOCK_4:i(358),SNES_USB:i(357),XBOX_360:i(356)}},function(t,e,i){t.exports={Axis:i(188),Button:i(187),Gamepad:i(189),GamepadManager:i(190),Configs:i(359)}},function(t,e,i){t.exports={CreateInteractiveObject:i(159),Gamepad:i(360),InputManager:i(191),InputPlugin:i(355),Keyboard:i(354),Mouse:i(349),Pointer:i(182),Touch:i(348)}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},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,i){var n=i(12);n.Area=i(782),n.Ceil=i(781),n.CeilAll=i(780),n.CenterOn=i(365),n.Clone=i(779),n.Contains=i(28),n.ContainsPoint=i(778),n.ContainsRect=i(777),n.CopyFrom=i(776),n.Decompose=i(372),n.Equals=i(775),n.FitInside=i(774),n.FitOutside=i(773),n.Floor=i(772),n.FloorAll=i(771),n.FromPoints=i(268),n.GetAspectRatio=i(220),n.GetCenter=i(770),n.GetPoint=i(127),n.GetPoints=i(286),n.GetSize=i(769),n.Inflate=i(768),n.MarchingAnts=i(558),n.MergePoints=i(767),n.MergeRect=i(766),n.MergeXY=i(765),n.Offset=i(764),n.OffsetPoint=i(763),n.Overlaps=i(762),n.Perimeter=i(93),n.PerimeterPoint=i(761),n.Random=i(146),n.Scale=i(760),n.Union=i(450),t.exports=n},function(t,e,i){var n=i(0),s=i(221),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n0){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){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){t.exports={CircleToCircle:i(829),CircleToRectangle:i(828),GetRectangleIntersection:i(827),LineToCircle:i(374),LineToLine:i(137),LineToRectangle:i(826),PointToLine:i(373),PointToLineSegment:i(825),RectangleToRectangle:i(375),RectangleToTriangle:i(824),RectangleToValues:i(823),TriangleToCircle:i(822),TriangleToLine:i(821),TriangleToTriangle:i(820)}},function(t,e,i){t.exports={Circle:i(839),Ellipse:i(241),Intersects:i(376),Line:i(819),Point:i(801),Polygon:i(787),Rectangle:i(366),Triangle:i(759)}},function(t,e,i){var n=i(0),s=i(379),r=i(141),o=i(25),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(25),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(21),s=i(13),r=i(8),o=i(102);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(31);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(66);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(8),s=i(13),r=i(107);s.register("graphics",function(t){var e=n(t,"add",!0),i=new r(this.scene,t);return e&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(102);i(11).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(11),s=i(31);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(66);i(11).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(107);i(11).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&&e.cameraFilter&s._id||""===e.text)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=e.canvas;if(o.save(),void 0!==r){var h=r.matrix;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY;t.config.roundPixels&&(u|=0,l|=0),o.translate(u,l),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.translate(a.width*(e.flipX?1:0),a.height*(e.flipY?1:0)),o.scale(e.flipX?-1:1,e.flipY?-1:1),o.drawImage(a,0,0,a.width,a.height,-e.displayOriginX,-e.displayOriginY,a.width,a.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(392),s=i(391),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&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,i){var n=i(0),s=i(33),r=i(58),o=i(4),a=i(31),h=i(57),u=i(6),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(6),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;i=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(239),s=i(238),r=i(237),o=i(236),a=i(235),h=i(234),u=i(233),l=i(232),c=i(231),d=i(230),f=i(229),p=i(228);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,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(48),s=i(0),r=i(14),o=i(432),a=i(431),h=i(884),u=i(2),l=i(139),c=i(397),d=i(103),f=i(434),p=i(396),g=i(12),v=i(79),m=i(6),y=i(34),x=new s({Mixins:[r.BlendMode,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","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(33),r=i(54),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=4294967295,this.color=4294967295,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.color=16777215&this.tint|(255*this.alpha|0)<<24,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.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(437),s=i(436),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(439),s=i(160),s=i(160),t.exports={renderWebGL:n,renderCanvas:s}},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(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(51);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(51);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(12);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e){function i(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,n,s){void 0===e&&(e=0),void 0===n&&(n=0);var r={},o=t.getElementsByTagName("info")[0],a=t.getElementsByTagName("common")[0];r.font=o.getAttribute("face"),r.size=i(o,"size"),r.lineHeight=i(a,"lineHeight")+n,r.chars={};var h=t.getElementsByTagName("char"),u=void 0!==s&&s.trimmed;if(u)var l=s.height,c=s.width;for(var d=0;dy&&(s=y),r>x&&(r=x);var A=y+v-s,C=x+m-r;o-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(70);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(26);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(70);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e,i){var n=i(247);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(26);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,u),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;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--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),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 M=u,E=u,_=0,L=e.sourceIndex,P=0;Pg||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){t.exports=function(t,e){if(["layers","tilewidth","tileheight","tileswide","tileshigh"].forEach(function(t){e[t]}),1===e.layers.length){for(var i=new Phaser.FrameData,n=e.tileheight,s=e.tilewidth,r=e.layers[0].tiles,o=0;o0&&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){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t=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(53),s=i(74),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(53),browser:i(74),features:i(112),input:i(505),audio:i(504),video:i(503),fullscreen:i(502),canvasFeatures:i(193)}},function(t,e,i){var n=i(19);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\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\nuniform bool uInvertMaskAlpha;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = mainColor.a;\r\n\r\n if (!uInvertMaskAlpha)\r\n {\r\n alpha *= (maskColor.a);\r\n }\r\n else\r\n {\r\n alpha *= (1.0 - maskColor.a);\r\n }\r\n \r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n"},function(t,e,i){var n=i(266),s=i(22),r=i(19),o=i(112);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.pixelArt&&s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.pixelArt&&n.setCrisp(t.canvas),1!==h.zoom&&(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(254),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(0),s=i(19),r=i(4),o=i(15),a=i(3),h=i(194),u=i(124),l=new n({initialize:function(t){void 0===t&&(t={});this.width=r(t,"width",1024),this.height=r(t,"height",768),this.zoom=r(t,"zoom",1),this.resolution=r(t,"resolution",1),this.renderType=r(t,"type",s.AUTO),this.parent=r(t,"parent",null),this.canvas=r(t,"canvas",null),this.canvasStyle=r(t,"canvasStyle",null),this.sceneConfig=r(t,"scene",null),this.seed=r(t,"seed",[(Date.now()*Math.random()).toString()]),o.RND.init(this.seed),this.gameTitle=r(t,"title",""),this.gameURL=r(t,"url","https://phaser.io"),this.gameVersion=r(t,"version",""),this.inputKeyboard=r(t,"input.keyboard",!0),this.inputKeyboardEventTarget=r(t,"input.keyboard.target",window),this.inputMouse=r(t,"input.mouse",!0),this.inputMouseEventTarget=r(t,"input.mouse.target",null),this.inputMouseCapture=r(t,"input.mouse.capture",!0),this.inputTouch=r(t,"input.touch",!0),this.inputTouchEventTarget=r(t,"input.touch.target",null),this.inputTouchCapture=r(t,"input.touch.capture",!0),this.inputGamepad=r(t,"input.gamepad",!1),this.disableContextMenu=r(t,"disableContextMenu",!1),this.audio=r(t,"audio"),this.hideBanner=!1===r(t,"banner",null),this.hidePhaser=r(t,"banner.hidePhaser",!1),this.bannerTextColor=r(t,"banner.text","#ffffff"),this.bannerBackgroundColor=r(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(t,"fps",null);var e=r(t,"render",t);this.antialias=r(e,"antialias",!0),this.pixelArt=r(e,"pixelArt",!1),this.autoResize=r(e,"autoResize",!1),this.roundPixels=r(e,"roundPixels",!1),this.transparent=r(e,"transparent",!1),this.clearBeforeRender=r(e,"clearBeforeRender",!0),this.premultipliedAlpha=r(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=r(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=r(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(e,"powerPreference","default");var i=r(t,"backgroundColor",0);this.backgroundColor=u(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=r(t,"callbacks.preBoot",a),this.postBoot=r(t,"callbacks.postBoot",a),this.physics=r(t,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(t,"loader.baseURL",""),this.loaderPath=r(t,"loader.path",""),this.loaderEnableParallel=r(t,"loader.enableParallel",!0),this.loaderMaxParallelDownloads=r(t,"loader.maxParallelDownloads",4),this.loaderCrossOrigin=r(t,"loader.crossOrigin",void 0),this.loaderResponseType=r(t,"loader.responseType",""),this.loaderAsync=r(t,"loader.async",!0),this.loaderUser=r(t,"loader.user",""),this.loaderPassword=r(t,"loader.password",""),this.loaderTimeout=r(t,"loader.timeout",0),this.defaultPlugins=r(t,"plugins",h.DefaultScene);var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(t,"images.default",n+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(t,"images.missing",n+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=l},function(t,e,i){var n=i(122),s=i(198),r=i(196),o=i(22),a=i(0),h=i(516),u=i(515),l=i(76),c=i(507),d=i(506),f=i(263),p=i(9),g=i(191),v=i(3),m=i(10),y=i(180),x=i(177),w=i(170),b=i(483),T=i(482),S=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new w(this),this.cache=new r(this),this.registry=new l(this),this.input=new g(this,this.config),this.scene=new y(this,this.config.sceneConfig),this.device=d,this.sound=x.create(this),this.loop=new b(this,this.config.fps),this.plugins=new m(this,this.config),this.onStepCallback=v,this.pendingDestroy=!1,this.removeCanvas=!1,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),u(this),c(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("ready",this.start,this)},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)),T(this.events),this.events.on("hidden",this.onHidden,this),this.events.on("visible",this.onVisible,this),this.events.on("blur",this.onBlur,this),this.events.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e);var i=this.renderer;i.preRender(),this.events.emit("prerender",i),this.scene.render(i),i.postRender(),this.events.emit("postrender",i)},headlessStep:function(t,e){this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e),this.events.emit("prerender"),this.events.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.loop.blur()},onFocus:function(){this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t){this.pendingDestroy=!0,this.removeCanvas=t},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.onStepCallback=null,this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=S},function(t,e,i){var n=i(0),s=i(9),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){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(27);n.ColorToRGBA=i(908),n.ComponentToHex=i(525),n.GetColor=i(144),n.GetColor32=i(278),n.HexStringToColor=i(279),n.HSLToColor=i(907),n.HSVColorWheel=i(906),n.HSVToRGB=i(523),n.HueToComponent=i(524),n.IntegerToColor=i(277),n.IntegerToRGB=i(276),n.Interpolate=i(905),n.ObjectToColor=i(275),n.RandomRGB=i(904),n.RGBStringToColor=i(274),n.RGBToHSV=i(903),n.RGBToString=i(902),n.ValueToColor=i(124),t.exports=n},function(t,e,i){var n=i(0),s=i(76),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&&this.events.off("destroy",this.destroy,this),this.events=this.systems.events,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.systems.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(76),DataManagerPlugin:i(527)}},function(t,e,i){var n=i(267),s=i(0),r=i(81),o=i(6),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&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(539),s=i(538),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*u,e[5]=g*s+v*a+m*l,e[6]=y*i+x*r+w*h,e[7]=y*n+x*o+w*u,e[8]=y*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=u+v,m[6]=l-g,m[1]=u-v,m[4]=1-(h+f),m[7]=d+p,m[2]=l+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,S=s*l-o*h,A=r*l-o*u,C=c*v-d*g,M=c*m-f*g,E=c*y-p*g,_=d*m-f*v,L=d*y-p*v,P=f*y-p*m,F=x*P-w*L+b*_+T*E-S*M+A*C;return F?(F=1/F,i[0]=(h*P-u*L+l*_)*F,i[1]=(u*E-a*P-l*M)*F,i[2]=(a*L-h*E+l*C)*F,i[3]=(r*L-s*P-o*_)*F,i[4]=(n*P-r*E+o*M)*F,i[5]=(s*E-n*L-o*C)*F,i[6]=(v*A-m*S+y*T)*F,i[7]=(m*b-g*A-y*w)*F,i[8]=(g*S-v*b+y*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(0),s=i(82),r=i(541),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(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(Math.abs(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(82),s=i(272),r=i(542),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(113),s=i(0),r=i(2),o=i(10),a=i(28),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.currentCameraId=1,this.cameras=[],this.cameraPool=[],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(){this.main||this.boot();var t=this.systems.events;t.on("update",this.update,this),t.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=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),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(4),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={BaseCache:i(197),CacheManager:i(196)}},function(t,e,i){t.exports={Animation:i(201),AnimationFrame:i(199),AnimationManager:i(198)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),u=n-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(15),s=i(60),r=i(203),o=i(202),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},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,clearTint:function(){return this.setTint(16777215),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},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){var i={texture:null,frame:null,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(55),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){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var o=this.currentMatrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=a*t+u*e,o[1]=h*t+l*e,o[2]=a*i+u*n,o[3]=h*i+l*n,o[4]=a*s+u*r+c,o[5]=h*s+l*r+d,this},setTransform:function(t,e,i,n,s,r){var o=this.currentMatrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return i[4]=n*t+r*e+a,i[5]=s*t+o*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=o*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],o=Math.sin(t),a=Math.cos(t);return e[0]=i*a+s*o,e[1]=n*a+r*o,e[2]=i*-o+s*a,e[3]=n*-o+r*a,this}};t.exports=i},function(t,e,i){var n=i(12),s=i(284),r=i(6),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){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(48),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(23),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(40),s=i(38),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(41),o=i(37);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(87),s=i(38),r=i(86),o=i(37);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(84),s=i(40),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(84),s=i(42),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(86),s=i(85);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(580),s=i(87),r=i(84);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(43),o=i(86);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(291),s=[];s[n.BOTTOM_CENTER]=i(584),s[n.BOTTOM_LEFT]=i(583),s[n.BOTTOM_RIGHT]=i(582),s[n.CENTER]=i(581),s[n.LEFT_CENTER]=i(579),s[n.RIGHT_CENTER]=i(578),s[n.TOP_CENTER]=i(577),s[n.TOP_LEFT]=i(576),s[n.TOP_RIGHT]=i(575);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(990),Call:i(989),GetFirst:i(988),GetLast:i(987),GridAlign:i(986),IncAlpha:i(985),IncX:i(984),IncXY:i(983),IncY:i(982),PlaceOnCircle:i(981),PlaceOnEllipse:i(980),PlaceOnLine:i(979),PlaceOnRectangle:i(978),PlaceOnTriangle:i(977),PlayAnimation:i(976),PropertyValueInc:i(32),PropertyValueSet:i(24),RandomCircle:i(975),RandomEllipse:i(974),RandomLine:i(973),RandomRectangle:i(972),RandomTriangle:i(971),Rotate:i(970),RotateAround:i(969),RotateAroundDistance:i(968),ScaleX:i(967),ScaleXY:i(966),ScaleY:i(965),SetAlpha:i(964),SetBlendMode:i(963),SetDepth:i(962),SetHitArea:i(961),SetOrigin:i(960),SetRotation:i(959),SetScale:i(958),SetScaleX:i(957),SetScaleY:i(956),SetTint:i(955),SetVisible:i(954),SetX:i(953),SetXY:i(952),SetY:i(951),ShiftPosition:i(950),Shuffle:i(949),SmootherStep:i(948),SmoothStep:i(947),Spread:i(946),ToggleVisible:i(945),WrapInRectangle:i(944)}},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&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(610),s=i(609),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(129);t.exports=function(t){for(var e=[],i=[],s=0;s-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(16);t.exports=function(t){for(var e,i,s,r,o,a=0;a>>0;return n}},function(t,e,i){var n=i(623),s=i(2),r=i(100),o=i(309),a=i(62);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(312),Parse2DArray:i(206),ParseCSV:i(311),Impact:i(305),Tiled:i(310)}},function(t,e,i){var n=i(50),s=i(49),r=i(6);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(20);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(63),s=i(35),r=i(103);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(63),s=i(35),r=i(207);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-c&&m>-d&&v=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(328);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.up=!0:e>0&&(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(671);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.left=!0:e>0&&(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(673);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(674),s=i(672),r=i(326);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(64),s=i(16),r={ArcadePhysics:i(689),Body:i(330),Collider:i(329),Factory:i(336),Group:i(333),Image:i(335),Sprite:i(136),StaticBody:i(325),StaticGroup:i(332),World:i(331)};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(388),IsSize:i(121),IsValue:i(709)}},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 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(267);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[ie-i}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN,this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.state=s.LOADER_DESTROYED,this.systems.events.off("start",this.pluginStart,this),this.list=null,this.inflight=null,this.failed=null,this.queue=null,this.storage=null,this.scene=null,this.systems=null}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(7),s=i(46),r=i(214),o=function(t,e,i,n,o,a){var h=new s(t,e,n,o),u=new r(t,i,n,a);return h.linkFile=u,u.linkFile=h,h.linkType="unityatlas",u.linkType="unityatlas",{texture:h,data:u}};n.register("unityAtlas",function(t,e,i,n,s){var r=new o(t,e,i,this.path,n,s);return this.addFile(r.texture),this.addFile(r.data),this}),t.exports=o},function(t,e,i){var n=i(7),s=i(36),r=i(29),o=function(t,e,i,n,r){var o=new s(t,e,i,r);return o.type="tilemapJSON",o.tilemapFormat=n,o};n.register("tilemapTiledJSON",function(t,e,i){if(Array.isArray(t))for(var n=0;n'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",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(220);t.exports=function(t,e){var i=n(t);return it.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomi&&(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(56),s=i(137);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(374),s=i(56);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(373);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(12),s=i(375);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(54);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(12);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(30);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(30);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(83);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(83);n.Area=i(838),n.Circumference=i(287),n.CircumferencePoint=i(128),n.Clone=i(837),n.Contains=i(30),n.ContainsPoint=i(836),n.ContainsRect=i(835),n.CopyFrom=i(834),n.Equals=i(833),n.GetBounds=i(832),n.GetPoint=i(290),n.GetPoints=i(288),n.Offset=i(831),n.OffsetPoint=i(830),n.Random=i(149),t.exports=n},function(t,e,i){var n=i(0),s=i(378),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(21),s=i(13),r=i(8),o=i(224);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(4),a=i(138);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(224);i(11).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(138);i(11).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(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(846),s=i(845),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(13),s=i(8),r=i(150);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(225);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(245),s=i(21),r=i(13),o=i(8),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(143);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(226);s.register("renderTexture",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",32),a=r(t,"height",32),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(13),s=i(8),r=i(2),o=i(227);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(13),s=i(104);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(242),s=i(21),r=i(13),o=i(8);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(243),r=i(13),o=i(8);r.register("container",function(t){var e=o(t,"x",0),i=o(t,"y",0),r=new s(this.scene,e,i);return n(this.scene,r,t),r})},function(t,e,i){var n=i(244),s=i(21),r=i(13),o=i(8);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(150);i(11).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(225);i(11).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(245);i(11).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(143);i(11).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(11),s=i(226);n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var n=i(11),s=i(395);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(11),s=i(227);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(104);i(11).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(242);i(11).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(243);i(11).register("container",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var n=i(244);i(11).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext,a=e.frame;e.updateTileTexture(),t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var h=a.x-e.originX*e.width,u=a.y-e.originY*e.height,l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY,d=1,f=1;if(e.flipX&&(d=-1,h+=e.width),e.flipY&&(f=-1,u+=e.height),t.config.roundPixels&&(h|=0,u|=0,l|=0,c|=0),o.save(),void 0!==r){var p=r.matrix;o.transform(p[0],p[1],p[2],p[3],p[4],p[5])}o.translate(h,u),o.translate(l,c),o.scale(d,f),o.translate(e.originX*e.width,e.originY*e.height),o.rotate(d*f*e.rotation),o.scale(this.scaleX,this.scaleY),o.translate(-e.originX*e.width,-e.originY*e.height),o.translate(-this.tilePositionX,-this.tilePositionY),o.fillStyle=e.canvasPattern,o.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(870),s=i(869),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(4);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),u=n(e,"offset.x",0),l=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(h).width/i)>a.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},m=0,y=0;y?@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(873),s=i(16),r={Parse:i(872)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);this.renderer.setFramebuffer(this.framebuffer);var s=this.gl;return s.clearColor(e/255,i/255,n/255,1),s.clear(s.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},clear:function(){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;return t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},draw:function(t,e,i,n){var s=t.source[e.sourceIndex].glTexture,r=(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16);return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,0,this.renderer.pipelines.TextureTintPipeline.height,-1e3,1e3),this.renderer.pipelines.TextureTintPipeline.drawTexture(s,i,n,r,this.globalAlpha,e.cutX,e.cutY,e.cutWidth,e.cutHeight,this.currentMatrix,null,this),this.renderer.setFramebuffer(null),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,this.renderer.pipelines.TextureTintPipeline.height,0,-1e3,1e3),this}}},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);return this.context.fillStyle="rgb("+e+","+i+","+n+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this},clear:function(){return this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.restore(),this},draw:function(t,e,i,n){var s=this.currentMatrix;return this.context.globalAlpha=this.globalAlpha,this.context.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),this.context.drawImage(t.source[e.sourceIndex].image,e.cutX,e.cutY,e.cutWidth,e.cutHeight,i,n,e.cutWidth,e.cutWidth),this}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=0,h=0,u=1,l=1;if(e.flipX?(u=-1,a-=e.canvas.width-e.displayOriginX):a-=e.displayOriginX,e.flipY?(l=-1,h-=e.canvas.height-e.displayOriginY):h-=e.displayOriginY,o.save(),void 0!==r){var c=r.matrix;o.transform(c[0],c[1],c[2],c[3],c[4],c[5])}o.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.scale(u,l),o.drawImage(e.canvas,a,h),o.restore()}}},function(t,e,i){var n=i(1),s=i(25);t.exports=function(t,e,i,r,o){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&r._id||this.pipeline.batchTexture(e,e.texture,e.texture.width,e.texture.height,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,e.texture.width,e.texture.height,s.getTintAppendFloatAlpha(e.tintTopLeft,e.alphaTopLeft),s.getTintAppendFloatAlpha(e.tintTopRight,e.alphaTopRight),s.getTintAppendFloatAlpha(e.tintBottomLeft,e.alphaBottomLeft),s.getTintAppendFloatAlpha(e.tintBottomRight,e.alphaBottomRight),0,0,r,o)}},function(t,e,i){var n=i(3),s=i(3);n=i(878),s=i(877),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(432),EdgeZone:i(431),RandomZone:i(396)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.emitters.list;if(!(0===o.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=t.currentContext;if(a.save(),void 0!==r){var h=r.matrix;a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}for(var u=0;u>24&255)/255;if(!(x<=0)){var w=y.frame,b=.5*w.width,T=.5*w.height,S=w.canvasData,A=-b,C=-T,M=y.x-p,E=y.y-g;v&&(M|=0,E|=0),a.globalAlpha=x,a.save(),a.translate(M,E),a.rotate(y.rotation),a.scale(y.scaleX,y.scaleY),a.drawImage(w.source.image,S.sx,S.sy,S.sWidth,S.sHeight,A,C,S.dWidth,S.dHeight),a.restore()}}a.globalAlpha=f}}a.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(882),s=i(881),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(0),s=i(240),r=i(59),o=i(2),a=i(34),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){t.exports={GravityWell:i(435),Particle:i(434),ParticleEmitter:i(433),ParticleEmitterManager:i(227),Zones:i(880)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,u=e.displayCallback,l=s.scrollX*e.scrollFactorX,c=s.scrollY*e.scrollFactorY,d=e.fontData.chars,f=e.fontData.lineHeight,p=0,g=0,v=0,m=0,y=null,x=0,w=0,b=0,T=0,S=0,A=0,C=null,M=0,E=t.currentContext,_=e.frame.source.image,L=h.cutX,P=h.cutY,F=0,R=e.fontSize/e.fontData.size;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,E.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,E.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),E.save(),void 0!==r){var k=r.matrix;E.transform(k[0],k[1],k[2],k[3],k[4],k[5])}E.translate(e.x,e.y),E.rotate(e.rotation),E.translate(-e.displayOriginX,-e.displayOriginY),E.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(E.save(),E.beginPath(),E.rect(0,0,e.cropWidth,e.cropHeight),E.clip());for(var O=t.config.roundPixels,D=0;D0&&e.cropHeight>0&&E.restore(),E.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text.length;n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(887),s=i(886),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,u=e.scrollFactorX,l=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,u=e.scrollFactorX,l=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.getRenderList();t.setBlendMode(e.blendMode);var a=t.gameContext,h=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY;if(a.save(),void 0!==r){var l=r.matrix;a.transform(l[0],l[1],l[2],l[3],l[4],l[5])}for(var c=0;c0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(894),s=i(893),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,u=e.fontData.chars,l=e.fontData.lineHeight,c=e.letterSpacing,d=0,f=0,p=0,g=0,v=null,m=0,y=0,x=0,w=0,b=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,E=h.cutX,_=h.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var P=t.config.roundPixels,F=e.x-s.scrollX*e.scrollFactorX+e.frame.x,R=e.y-s.scrollY*e.scrollFactorY+e.frame.y;if(P&&(F|=0,R|=0),C.save(),void 0!==r){var k=r.matrix;C.transform(k[0],k[1],k[2],k[3],k[4],k[5])}C.translate(F,R),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var O=0;O0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(897),s=i(896),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(451);t.exports=function(t,e,i,s,r,o,a){var h=t.sys.textures.getFrame(i,s),u=t.sys.cache.xml.get(r);if(h&&u){var l=n(u,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:l,texture:i,frame:s}),!0}return!1}},function(t,e,i){var n={DisplayList:i(481),GameObjectCreator:i(13),GameObjectFactory:i(11),UpdateList:i(453),Components:i(14),BuildGameObject:i(21),BuildGameObjectAnimation:i(118),GameObject:i(1),BitmapText:i(245),Blitter:i(244),Container:i(243),DynamicBitmapText:i(242),Graphics:i(107),Group:i(104),Image:i(66),Particles:i(885),PathFollower:i(395),RenderTexture:i(226),RetroFont:i(874),Sprite3D:i(143),Sprite:i(31),Text:i(102),TileSprite:i(225),Zone:i(150),Factories:{Blitter:i(868),Container:i(867),DynamicBitmapText:i(866),Graphics:i(387),Group:i(865),Image:i(386),Particles:i(864),PathFollower:i(863),RenderTexture:i(862),Sprite3D:i(861),Sprite:i(385),StaticBitmapText:i(860),Text:i(384),TileSprite:i(859),Zone:i(858)},Creators:{Blitter:i(857),Container:i(856),DynamicBitmapText:i(855),Graphics:i(383),Group:i(854),Image:i(382),Particles:i(853),RenderTexture:i(852),Sprite3D:i(851),Sprite:i(381),StaticBitmapText:i(850),Text:i(380),TileSprite:i(849),Zone:i(848)}};n.Mesh=i(138),n.Quad=i(224),n.Factories.Mesh=i(844),n.Factories.Quad=i(843),n.Creators.Mesh=i(842),n.Creators.Quad=i(841),n.Light=i(379),i(378),i(840),t.exports=n},function(t,e,i){t.exports={AddToDOM:i(122),DOMContentLoaded:i(263),ParseXML:i(262),RemoveFromDOM:i(261),RequestAnimationFrame:i(260)}},function(t,e,i){var n=i(525);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e>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(266),Pool:i(22),Smoothing:i(123),TouchAction:i(910),UserSelect:i(909)}},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(580),GetBottom:i(44),GetCenterX:i(87),GetCenterY:i(84),GetLeft:i(42),GetOffsetX:i(913),GetOffsetY:i(912),GetRight:i(40),GetTop:i(38),SetBottom:i(43),SetCenterX:i(86),SetCenterY:i(85),SetLeft:i(41),SetRight:i(39),SetTop:i(37)}},function(t,e,i){var n=i(40),s=i(38),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){var n=i(87),s=i(38),r=i(43),o=i(86);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(38),r=i(41),o=i(37);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(84),s=i(40),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(39),o=i(37);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(84),s=i(42),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(41),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(86),o=i(37);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(926),BottomLeft:i(925),BottomRight:i(924),LeftBottom:i(923),LeftCenter:i(922),LeftTop:i(921),RightBottom:i(920),RightCenter:i(919),RightTop:i(918),TopCenter:i(917),TopLeft:i(916),TopRight:i(915)}},function(t,e,i){t.exports={BottomCenter:i(584),BottomLeft:i(583),BottomRight:i(582),Center:i(581),LeftCenter:i(579),QuickSet:i(585),RightCenter:i(578),TopCenter:i(577),TopLeft:i(576),TopRight:i(575)}},function(t,e,i){var n=i(291),s=i(16),r={In:i(928),To:i(927)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(929),Bounds:i(914),Canvas:i(911),Color:i(526),Masks:i(522)}},function(t,e,i){var n=i(0),s=i(6),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(535),r=i(533),o=i(11),a=i(532),h=i(931),u=i(531),l=i(12),c=i(529),d=i(6),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;i1)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} + */ + +var IsPlainObject = __webpack_require__(292); + +// @param {boolean} deep - Perform a deep copy? +// @param {object} target - The target object to copy to. +// @return {object} The extended object. + +/** + * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ + * + * @function Phaser.Utils.Object.Extend + * @since 3.0.0 + * + * @return {object} [description] + */ +var Extend = function () +{ + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') + { + deep = target; + target = arguments[1] || {}; + + // skip the boolean and the target + i = 2; + } + + // extend Phaser if only one argument is passed + if (length === i) + { + target = this; + --i; + } + + for (; i < length; i++) + { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) + { + // Extend the base object + for (name in options) + { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) + { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) + { + if (copyIsArray) + { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } + else + { + clone = src && IsPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = Extend(deep, clone, copy); + + // Don't bring in undefined values + } + else if (copy !== undefined) + { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +module.exports = Extend; + + +/***/ }), +/* 17 */ /***/ (function(module, exports) { /** @@ -3348,105 +3447,6 @@ var FILE_CONST = { module.exports = FILE_CONST; -/***/ }), -/* 17 */ -/***/ (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 IsPlainObject = __webpack_require__(292); - -// @param {boolean} deep - Perform a deep copy? -// @param {object} target - The target object to copy to. -// @return {object} The extended object. - -/** - * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ - * - * @function Phaser.Utils.Object.Extend - * @since 3.0.0 - * - * @return {object} [description] - */ -var Extend = function () -{ - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if (typeof target === 'boolean') - { - deep = target; - target = arguments[1] || {}; - - // skip the boolean and the target - i = 2; - } - - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } - - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) - { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; - - // Prevent never-ending loop - if (target === copy) - { - continue; - } - - // Recurse if we're merging plain objects or arrays - if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) - { - if (copyIsArray) - { - copyIsArray = false; - clone = src && Array.isArray(src) ? src : []; - } - else - { - clone = src && IsPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[name] = Extend(deep, clone, copy); - - // Don't bring in undefined values - } - else if (copy !== undefined) - { - target[name] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -module.exports = Extend; - - /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { @@ -3458,7 +3458,7 @@ module.exports = Extend; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var GetFastValue = __webpack_require__(2); var GetURL = __webpack_require__(117); var MergeXHRSettings = __webpack_require__(116); @@ -3870,7 +3870,7 @@ var File = new Class({ * * @method Phaser.Loader.File.createObjectURL * @static - * @param {Image} image - Image object which 'src' attribute should be set to object URL. + * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL. * @param {Blob} blob - A Blob object to create an object URL for. * @param {string} defaultType - Default mime type used if blob type is not available. */ @@ -3902,7 +3902,7 @@ File.createObjectURL = function (image, blob, defaultType) * * @method Phaser.Loader.File.revokeObjectURL * @static - * @param {Image} image - Image object which 'src' attribute should be revoked. + * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked. */ File.revokeObjectURL = function (image) { @@ -3941,7 +3941,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.5.1', + VERSION: '3.6.0', BlendModes: __webpack_require__(48), @@ -5366,6 +5366,7 @@ var Sprite = new Class({ * [description] * * @method Phaser.GameObjects.Sprite#preUpdate + * @protected * @since 3.0.0 * * @param {number} time - [description] @@ -5492,7 +5493,7 @@ module.exports = Wrap; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -5617,7 +5618,7 @@ module.exports = JSONFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -8241,7 +8242,7 @@ module.exports = RotateMatrix; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var NOOP = __webpack_require__(3); /** @@ -12487,10 +12488,10 @@ var Vector2 = __webpack_require__(6); * @constructor * @since 3.0.0 * - * @param {number} [x1=0] - [description] - * @param {number} [y1=0] - [description] - * @param {number} [x2=0] - [description] - * @param {number} [y2=0] - [description] + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. */ var Line = new Class({ @@ -12504,7 +12505,7 @@ var Line = new Class({ if (y2 === undefined) { y2 = 0; } /** - * [description] + * The x coordinate of the lines starting point. * * @name Phaser.Geom.Line#x1 * @type {number} @@ -12513,7 +12514,7 @@ var Line = new Class({ this.x1 = x1; /** - * [description] + * The y coordinate of the lines starting point. * * @name Phaser.Geom.Line#y1 * @type {number} @@ -12522,7 +12523,7 @@ var Line = new Class({ this.y1 = y1; /** - * [description] + * The x coordinate of the lines ending point. * * @name Phaser.Geom.Line#x2 * @type {number} @@ -12531,7 +12532,7 @@ var Line = new Class({ this.x2 = x2; /** - * [description] + * The y coordinate of the lines ending point. * * @name Phaser.Geom.Line#y2 * @type {number} @@ -12551,7 +12552,7 @@ var Line = new Class({ * @param {float} position - [description] * @param {(Phaser.Geom.Point|object)} [output] - [description] * - * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse. + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. */ getPoint: function (position, output) { @@ -12578,16 +12579,16 @@ var Line = new Class({ }, /** - * [description] + * Get a random Point on the Line. * * @method Phaser.Geom.Line#getRandomPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [point,$return] * - * @param {(Phaser.Geom.Point|object)} [point] - [description] + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A random Point on the Line. */ getRandomPoint: function (point) { @@ -12595,15 +12596,15 @@ var Line = new Class({ }, /** - * [description] + * Set new coordinates for the line endpoints. * * @method Phaser.Geom.Line#setTo * @since 3.0.0 * - * @param {number} [x1=0] - [description] - * @param {number} [y1=0] - [description] - * @param {number} [x2=0] - [description] - * @param {number} [y2=0] - [description] + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. * * @return {Phaser.Geom.Line} This Line object. */ @@ -14730,7 +14731,7 @@ var Text = new Class({ * [description] * * @name Phaser.GameObjects.Text#style - * @type {Phaser.GameObjects.Components.TextStyle} + * @type {Phaser.GameObjects.Text.TextStyle} * @since 3.0.0 */ this.style = new TextStyle(this, style); @@ -15688,7 +15689,7 @@ var Text = new Class({ * @method Phaser.GameObjects.Text#toJSON * @since 3.0.0 * - * @return {object} [description] + * @return {JSONGameObject} A JSON representation of the Game Object. */ toJSON: function () { @@ -17400,7 +17401,7 @@ var Settings = __webpack_require__(178); * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene that owns this Systems instance. - * @param {(string|SettingsConfig)} config - Scene specific configuration settings. + * @param {(string|Phaser.Scenes.Settings.Config)} config - Scene specific configuration settings. */ var Systems = new Class({ @@ -17430,7 +17431,7 @@ var Systems = new Class({ * [description] * * @name Phaser.Scenes.Systems#config - * @type {(string|SettingsConfig)} + * @type {(string|Phaser.Scenes.Settings.Config)} * @since 3.0.0 */ this.config = config; @@ -17439,7 +17440,7 @@ var Systems = new Class({ * [description] * * @name Phaser.Scenes.Systems#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.0.0 */ this.settings = Settings.create(config); @@ -19830,14 +19831,13 @@ var Camera = new Class({ */ /** - * Destroys this Camera instance. + * 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 - * @protected * @since 3.0.0 */ destroy: function () @@ -20245,7 +20245,7 @@ module.exports = Map; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var XHRSettings = __webpack_require__(88); /** @@ -20424,7 +20424,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @classdesc @@ -21022,7 +21022,7 @@ var WebGLPipeline = __webpack_require__(80); * * @class TextureTintPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -21082,7 +21082,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -21091,7 +21091,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#vertexViewU32 + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32 * @type {Uint32Array} * @since 3.0.0 */ @@ -21100,7 +21100,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#maxQuads + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#maxQuads * @type {integer} * @default 2000 * @since 3.0.0 @@ -21110,7 +21110,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#batches + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batches * @type {array} * @since 3.1.0 */ @@ -21122,13 +21122,13 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#setTexture2D + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D * @since 3.1.0 * * @param {WebGLTexture} texture - [description] * @param {integer} textureUnit - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ setTexture2D: function (texture, unit) { @@ -21173,7 +21173,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#pushBatch + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#pushBatch * @since 3.1.0 */ pushBatch: function () @@ -21190,10 +21190,10 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#flush + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush * @since 3.1.0 * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} This Pipeline. + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This Pipeline. */ flush: function () { @@ -21290,14 +21290,15 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ onBind: function () { WebGLPipeline.prototype.onBind.call(this); + this.mvpUpdate(); if (this.batches.length === 0) @@ -21311,14 +21312,14 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ resize: function (width, height, resolution) { @@ -21330,11 +21331,12 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawStaticTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] */ drawStaticTilemapLayer: function (tilemap) { @@ -21365,7 +21367,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] @@ -21405,29 +21407,16 @@ var TextureTintPipeline = new Class({ var vertexCapacity = this.vertexCapacity; var texture = emitterManager.defaultFrame.source.glTexture; var pca, pcb, pcc, pcd, pce, pcf; + var pma, pmb, pmc, pmd, pme, pmf; if (parentMatrix) { - var pma = parentMatrix[0]; - var pmb = parentMatrix[1]; - var pmc = parentMatrix[2]; - var pmd = parentMatrix[3]; - var pme = parentMatrix[4]; - var pmf = parentMatrix[5]; - - pca = cma * pma + cmb * pmc; - pcb = cma * pmb + cmb * pmd; - pcc = cmc * pma + cmd * pmc; - pcd = cmc * pmb + cmd * pmd; - pce = cme * pma + cmf * pmc + pme; - pcf = cme * pmb + cmf * pmd + pmf; - - cma = pca; - cmb = pcb; - cmc = pcc; - cmd = pcd; - cme = pce; - cmf = pcf; + pma = parentMatrix[0]; + pmb = parentMatrix[1]; + pmc = parentMatrix[2]; + pmd = parentMatrix[3]; + pme = parentMatrix[4]; + pmf = parentMatrix[5]; } this.setTexture2D(texture, 0); @@ -21442,6 +21431,31 @@ var TextureTintPipeline = new Class({ var scrollX = cameraScrollX * emitter.scrollFactorX; var scrollY = cameraScrollY * emitter.scrollFactorY; + if (parentMatrix) + { + var cse = -scrollX; + var csf = -scrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + pca = pma * cma + pmb * cmc; + pcb = pma * cmb + pmb * cmd; + pcc = pmc * cma + pmd * cmc; + pcd = pmc * cmb + pmd * cmd; + pce = pme * cma + pmf * cmc + pse; + pcf = pme * cmb + pmf * cmd + psf; + + cma = pca; + cmb = pcb; + cmc = pcc; + cmd = pcd; + cme = pce; + cmf = pcf; + + scrollX = 0.0; + scrollY = 0.0; + } + + if (!emitter.visible || aliveLength === 0) { continue; @@ -21478,11 +21492,11 @@ var TextureTintPipeline = new Class({ var sr = sin(particle.rotation); var cr = cos(particle.rotation); var sra = cr * particle.scaleX; - var srb = -sr * particle.scaleX; - var src = sr * particle.scaleY; + var srb = sr * particle.scaleX; + var src = -sr * particle.scaleY; var srd = cr * particle.scaleY; - var sre = particle.x - scrollX * particle.scrollFactorX; - var srf = particle.y - scrollY * particle.scrollFactorY; + var sre = particle.x - scrollX; + var srf = particle.y - scrollY; var mva = sra * cma + srb * cmc; var mvb = sra * cmb + srb * cmd; var mvc = src * cma + srd * cmc; @@ -21569,7 +21583,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] @@ -21604,8 +21618,6 @@ var TextureTintPipeline = new Class({ var cameraScrollY = camera.scrollY * blitter.scrollFactorY; var batchCount = Math.ceil(length / this.maxQuads); var batchOffset = 0; - var blitterX = blitter.x - cameraScrollX; - var blitterY = blitter.y - cameraScrollY; if (parentMatrix) { @@ -21615,12 +21627,16 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = a * pma + b * pmc; - var pcb = a * pmb + b * pmd; - var pcc = c * pma + d * pmc; - var pcd = c * pmb + d * pmd; - var pce = e * pma + f * pmc + pme; - var pcf = e * pmb + f * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * a + csf * c + e; + var psf = cse * b + csf * d + f; + var pca = pma * a + pmb * c; + var pcb = pma * b + pmb * d; + var pcc = pmc * a + pmd * c; + var pcd = pmc * b + pmd * d; + var pce = pme * a + pmf * c + pse; + var pcf = pme * b + pmf * d + psf; a = pca; b = pcb; @@ -21628,8 +21644,14 @@ var TextureTintPipeline = new Class({ d = pcd; e = pce; f = pcf; + + cameraScrollX = 0.0; + cameraScrollY = 0.0; } + var blitterX = blitter.x - cameraScrollX; + var blitterY = blitter.y - cameraScrollY; + for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(length, this.maxQuads); @@ -21721,7 +21743,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] @@ -21761,11 +21783,9 @@ var TextureTintPipeline = new Class({ var y = -sprite.displayOriginY + frame.y + ((frame.height) * (flipY ? 1.0 : 0.0)); var xw = (roundPixels ? (x|0) : x) + width; var yh = (roundPixels ? (y|0) : y) + height; - var translateX = sprite.x - camera.scrollX * sprite.scrollFactorX; - var translateY = sprite.y - camera.scrollY * sprite.scrollFactorY; var scaleX = sprite.scaleX; var scaleY = sprite.scaleY; - var rotation = -sprite.rotation; + var rotation = sprite.rotation; var alphaTL = sprite._alphaTL; var alphaTR = sprite._alphaTR; var alphaBL = sprite._alphaBL; @@ -21777,11 +21797,11 @@ var TextureTintPipeline = new Class({ var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; - var sre = translateX; - var srf = translateY; + var sre = sprite.x; + var srf = sprite.y; var cma = cameraMatrix[0]; var cmb = cameraMatrix[1]; var cmc = cameraMatrix[2]; @@ -21798,12 +21818,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * sprite.scrollFactorX; + var csf = -camera.scrollY * sprite.scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -21813,6 +21838,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * sprite.scrollFactorX; + srf -= camera.scrollY * sprite.scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -21888,7 +21916,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] @@ -21925,16 +21953,16 @@ var TextureTintPipeline = new Class({ var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; - var translateX = mesh.x - camera.scrollX * mesh.scrollFactorX; - var translateY = mesh.y - camera.scrollY * mesh.scrollFactorY; + var translateX = mesh.x; + var translateY = mesh.y; var scaleX = mesh.scaleX; var scaleY = mesh.scaleY; - var rotation = -mesh.rotation; + var rotation = mesh.rotation; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -21955,12 +21983,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * mesh.scrollFactorX; + var csf = -camera.scrollY * mesh.scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -21970,6 +22003,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * mesh.scrollFactorX; + srf -= camera.scrollY * mesh.scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -22011,7 +22047,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] @@ -22094,17 +22130,17 @@ var TextureTintPipeline = new Class({ var vmax = 0; var lastGlyph = null; var lastCharCode = 0; - var translateX = (srcX - cameraScrollX) + frame.x; - var translateY = (srcY - cameraScrollY) + frame.y; - var rotation = -bitmapText.rotation; + var translateX = srcX + frame.x; + var translateY = srcY + frame.y; + var rotation = bitmapText.rotation; var scaleX = bitmapText.scaleX; var scaleY = bitmapText.scaleY; var letterSpacing = bitmapText.letterSpacing; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -22125,12 +22161,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -22140,6 +22181,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -22280,7 +22324,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] @@ -22363,15 +22407,15 @@ var TextureTintPipeline = new Class({ var lastCharCode = 0; var translateX = srcX + frame.x; var translateY = srcY + frame.y; - var rotation = -bitmapText.rotation; + var rotation = bitmapText.rotation; var scaleX = bitmapText.scaleX; var scaleY = bitmapText.scaleY; var letterSpacing = bitmapText.letterSpacing; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -22394,12 +22438,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -22409,6 +22458,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -22527,14 +22579,12 @@ var TextureTintPipeline = new Class({ y -= bitmapText.displayOriginY; x *= scale; y *= scale; - x -= cameraScrollX; - y -= cameraScrollY; - sr = Math.sin(-rotation); - cr = Math.cos(-rotation); + sr = Math.sin(rotation); + cr = Math.cos(rotation); uta = cr * scale; - utb = -sr * scale; - utc = sr * scale; + utb = sr * scale; + utc = -sr * scale; utd = cr * scale; ute = x; utf = y; @@ -22624,7 +22674,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] @@ -22660,7 +22710,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] @@ -22718,7 +22768,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] @@ -22755,7 +22805,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchTexture + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} gameObject - [description] @@ -22820,7 +22870,6 @@ var TextureTintPipeline = new Class({ } flipY = flipY ^ (texture.isRenderTexture ? 1 : 0); - rotation = -rotation; var roundPixels = this.renderer.config.roundPixels; var vertexViewF32 = this.vertexViewF32; @@ -22832,13 +22881,13 @@ var TextureTintPipeline = new Class({ var y = -displayOriginY + ((srcHeight) * (flipY ? 1.0 : 0.0)); var xw = x + width; var yh = y + height; - var translateX = srcX - camera.scrollX * scrollFactorX; - var translateY = srcY - camera.scrollY * scrollFactorY; + var translateX = srcX; + var translateY = srcY; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -22858,12 +22907,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * scrollFactorX; + var csf = -camera.scrollY * scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -22873,6 +22927,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * scrollFactorX; + srf -= camera.scrollY * scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -22948,7 +23005,7 @@ var TextureTintPipeline = new Class({ /** * Immediately draws a texture with no batching. * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawTexture + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawTexture * @since 3.2.0 * * @param {WebGLTexture} texture [description] @@ -22963,7 +23020,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - [description] * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} This Pipeline. + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This Pipeline. */ drawTexture: function ( texture, @@ -23099,7 +23156,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchGraphics + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchGraphics * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - [description] @@ -23748,8 +23805,8 @@ var LIGHT_COUNT = 10; * [description] * * @class ForwardDiffuseLightPipeline - * @extends Phaser.Renderer.WebGL.TextureTintPipeline - * @memberOf Phaser.Renderer.WebGL + * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -23771,10 +23828,11 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onBind + * @override * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline} [description] */ onBind: function () { @@ -23794,13 +23852,13 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#onRender + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender * @since 3.0.0 * * @param {Phaser.Scene} scene - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] * - * @return {Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline} [description] */ onRender: function (scene, camera) { @@ -23854,14 +23912,15 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawStaticTilemapLayer + * @override * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] - * + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function (tilemap, camera, parentTransformMatrix) { var normalTexture = tilemap.texture.dataSource[0]; @@ -23869,26 +23928,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera); + TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. StaticTilemapLayer rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawStaticTilemapLayer(tilemap, camera); + this.renderer.pipelines.TextureTintPipeline.drawStaticTilemapLayer(tilemap, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - drawEmitterManager: function (emitterManager, camera) + drawEmitterManager: function (emitterManager, camera, parentTransformMatrix) { var normalTexture = emitterManager.texture.dataSource[0]; @@ -23896,26 +23956,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera); + TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. EmitterManager rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawEmitterManager(emitterManager, camera); + this.renderer.pipelines.TextureTintPipeline.drawEmitterManager(emitterManager, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - drawBlitter: function (blitter, camera) + drawBlitter: function (blitter, camera, parentTransformMatrix) { var normalTexture = blitter.texture.dataSource[0]; @@ -23923,26 +23984,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera); + TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Blitter rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawBlitter(blitter, camera); + this.renderer.pipelines.TextureTintPipeline.drawBlitter(blitter, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchSprite: function (sprite, camera) + batchSprite: function (sprite, camera, parentTransformMatrix) { var normalTexture = sprite.texture.dataSource[0]; @@ -23950,26 +24012,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera); + TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Sprite rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchSprite(sprite, camera); + this.renderer.pipelines.TextureTintPipeline.batchSprite(sprite, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchMesh: function (mesh, camera) + batchMesh: function (mesh, camera, parentTransformMatrix) { var normalTexture = mesh.texture.dataSource[0]; @@ -23977,12 +24040,12 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera); + TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Mesh rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchMesh(mesh, camera); + this.renderer.pipelines.TextureTintPipeline.batchMesh(mesh, camera, parentTransformMatrix); } }, @@ -23990,14 +24053,15 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchBitmapText: function (bitmapText, camera) + batchBitmapText: function (bitmapText, camera, parentTransformMatrix) { var normalTexture = bitmapText.texture.dataSource[0]; @@ -24005,26 +24069,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera); + TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. BitmapText rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchBitmapText(bitmapText, camera); + this.renderer.pipelines.TextureTintPipeline.batchBitmapText(bitmapText, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchDynamicBitmapText: function (bitmapText, camera) + batchDynamicBitmapText: function (bitmapText, camera, parentTransformMatrix) { var normalTexture = bitmapText.texture.dataSource[0]; @@ -24032,26 +24097,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera); + TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. DynamicBitmapText rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchDynamicBitmapText(bitmapText, camera); + this.renderer.pipelines.TextureTintPipeline.batchDynamicBitmapText(bitmapText, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchText: function (text, camera) + batchText: function (text, camera, parentTransformMatrix) { var normalTexture = text.texture.dataSource[0]; @@ -24059,26 +24125,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchText.call(this, text, camera); + TextureTintPipeline.prototype.batchText.call(this, text, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Text rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchText(text, camera); + this.renderer.pipelines.TextureTintPipeline.batchText(text, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchDynamicTilemapLayer: function (tilemapLayer, camera) + batchDynamicTilemapLayer: function (tilemapLayer, camera, parentTransformMatrix) { var normalTexture = tilemapLayer.texture.dataSource[0]; @@ -24086,26 +24153,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera); + TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. DynamicTilemapLayer rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchDynamicTilemapLayer(tilemapLayer, camera); + this.renderer.pipelines.TextureTintPipeline.batchDynamicTilemapLayer(tilemapLayer, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchTileSprite: function (tileSprite, camera) + batchTileSprite: function (tileSprite, camera, parentTransformMatrix) { var normalTexture = tileSprite.texture.dataSource[0]; @@ -24113,12 +24181,12 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera); + TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. TileSprite rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchTileSprite(tileSprite, camera); + this.renderer.pipelines.TextureTintPipeline.batchTileSprite(tileSprite, camera, parentTransformMatrix); } } @@ -24297,17 +24365,17 @@ module.exports = Random; var Point = __webpack_require__(5); /** - * [description] + * Returns a random point on a given Line. * * @function Phaser.Geom.Line.Random * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Line} line - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. * - * @return {(Phaser.Geom.Point|object)} [description] + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. */ var Random = function (line, out) { @@ -26196,7 +26264,8 @@ var AudioFile = new Class({ /** * [description] * - * @property {AudioContext} context + * @name Phaser.Loader.FileTypes.AudioFile#context + * @type {AudioContext} * @since 3.0.0 */ this.context = audioContext; @@ -27140,7 +27209,7 @@ var ScaleModes = __webpack_require__(55); * @since 3.0.0 * * @param {Phaser.Textures.Texture} texture - The Texture this TextureSource belongs to. - * @param {(Image|HTMLCanvasElement)} source - The source image data. + * @param {(HTMLImageElement|HTMLCanvasElement)} source - The source image data. * @param {integer} [width] - Optional width of the source image. If not given it's derived from the source itself. * @param {integer} [height] - Optional height of the source image. If not given it's derived from the source itself. */ @@ -27345,7 +27414,7 @@ var TextureSource = __webpack_require__(167); * * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to. * @param {string} key - The unique string-based key of this Texture. - * @param {(Image|HTMLCanvasElement)} source - The source that is used to create the texture. Usually an Image, but can also be a Canvas. + * @param {(HTMLImageElement|HTMLCanvasElement)} source - The source that is used to create the texture. Usually an Image, but can also be a Canvas. * @param {number} [width] - The width of the Texture. This is optional and automatically derived from the source images. * @param {number} [height] - The height of the Texture. This is optional and automatically derived from the source images. */ @@ -27661,7 +27730,7 @@ var Texture = new Class({ * @method Phaser.Textures.Texture#setDataSource * @since 3.0.0 * - * @param {(Image|HTMLCanvasElement)} data - The source image. + * @param {(HTMLImageElement|HTMLCanvasElement)} data - The source image. */ setDataSource: function (data) { @@ -29876,7 +29945,7 @@ module.exports = WebAudioSoundManager; var BaseSound = __webpack_require__(72); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @classdesc @@ -31657,7 +31726,7 @@ var Settings = { * @function Phaser.Scenes.Settings.create * @since 3.0.0 * - * @param {(string|Phaser.Scenes.SettingsConfig)} config - [description] + * @param {(string|Phaser.Scenes.Settings.Config)} config - [description] * * @return {Phaser.Scenes.Settings.Object} [description] */ @@ -31744,7 +31813,7 @@ var Systems = __webpack_require__(109); * @constructor * @since 3.0.0 * - * @param {(string|SettingsConfig)} config - Scene specific configuration settings. + * @param {(string|Phaser.Scenes.Settings.Config)} config - Scene specific configuration settings. */ var Scene = new Class({ @@ -32305,7 +32374,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The config for the Scene + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The config for the Scene * @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added. * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`. * @@ -32709,7 +32778,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - The key of the Scene. - * @param {(string|SettingsConfig)} sceneConfig - The Scene config. + * @param {(string|Phaser.Scenes.Settings.Config)} sceneConfig - The Scene config. * * @return {Phaser.Scene} The created Scene. */ @@ -32793,7 +32862,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - The key to check in the Scene config. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The Scene config. + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The Scene config. * * @return {string} The Scene key. */ @@ -35128,6 +35197,33 @@ var Key = new Class({ * @since 3.0.0 */ this._justUp = false; + }, + + /** + * Resets this Key object back to its default un-pressed state. + * + * @method Phaser.Input.Keyboard.Key.reset + * @since 3.6.0 + * + * @return {Phaser.Input.Keyboard.Key} This Key instance. + */ + reset: function () + { + this.preventDefault = true; + this.enabled = true; + this.isDown = false; + this.isUp = true; + this.altKey = false; + this.ctrlKey = false; + this.shiftKey = false; + this.timeDown = 0; + this.duration = 0; + this.timeUp = 0; + this.repeats = 0; + this._justDown = false; + this._justUp = false; + + return this; } }); @@ -40011,25 +40107,25 @@ var quickselect = __webpack_require__(164); * Spatial index is a special data structure for points and rectangles that allows you to perform queries like * "all items within this bounding box" very efficiently (e.g. hundreds of times faster than looping over all items). * + * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`. + * This is to avoid the eval like function creation that the original library used, which caused CSP policy violations. + * * @class RTree * @memberOf Phaser.Structs * @constructor * @since 3.0.0 */ -function rbush (maxEntries, format) +function rbush (maxEntries) { + var format = [ '.left', '.top', '.right', '.bottom' ]; + if (!(this instanceof rbush)) return new rbush(maxEntries, format); // max entries in a node is 9 by default; min node fill is 40% for best performance this._maxEntries = Math.max(4, maxEntries || 9); this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)); - if (format) - { - this._initFormat(format); - } - this.clear(); } @@ -40460,44 +40556,23 @@ rbush.prototype = { } }, - _initFormat: function (format) + compareMinX: function (a, b) { - // format: [minX, minY, maxX, maxY accessors] - // accessors will be dotted names + return a.left - b.left; + }, - // Because we have historically used eval-based function constructor - // the format accerrsors need to have their leading dots stripped to - // obtain the actual accessor - format = format.map( - function (f) - { - return f.substring(1); - } - ); + compareMinY: function (a, b) + { + return a.top - b.top; + }, - // Do not use string-generated Functions for CSP policies - // Instead a combination of anonymous functions and grabbing properties - // by string is used. - // cf. https://github.com/photonstorm/phaser/issues/3441 - // and https://github.com/photonstorm/phaser/issues/3535 - - var mkCompareFn = function(attr) { - return function(a, b) { - return a[attr] - b[attr]; - }; - }; - - this.compareMinX = mkCompareFn(format[0]); - this.compareMinY = mkCompareFn(format[1]); - - this.toBBox = function(a) - { - return { - minX: a[format[0]], - minY: a[format[1]], - maxX: a[format[2]], - maxY: a[format[3]], - }; + toBBox: function (a) + { + return { + minX: a.left, + minY: a.top, + maxX: a.right, + maxY: a.bottom }; } }; @@ -40620,7 +40695,6 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; - /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { @@ -40848,7 +40922,7 @@ module.exports = ProcessQueue; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); @@ -40951,7 +41025,7 @@ module.exports = TextFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -42627,7 +42701,7 @@ var pathArray = []; * * @class FlatTintPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -42679,7 +42753,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -42688,7 +42762,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#vertexViewU32 + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#vertexViewU32 * @type {Uint32Array} * @since 3.0.0 */ @@ -42697,7 +42771,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#tempTriangle + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#tempTriangle * @type {array} * @since 3.0.0 */ @@ -42711,7 +42785,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#polygonCache + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#polygonCache * @type {array} * @default [] * @since 3.0.0 @@ -42724,10 +42798,10 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.FlatTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} [description] */ onBind: function () { @@ -42740,14 +42814,14 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.FlatTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} [description] */ resize: function (width, height, resolution) { @@ -42760,7 +42834,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillRect + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillRect * @since 3.0.0 * * @param {float} srcX - [description] @@ -42843,7 +42917,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillTriangle + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillTriangle * @since 3.0.0 * * @param {float} srcX - [description] @@ -42915,7 +42989,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchStrokeTriangle + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchStrokeTriangle * @since 3.0.0 * * @param {float} srcX - [description] @@ -42977,7 +43051,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillPath + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillPath * @since 3.0.0 * * @param {float} srcX - [description] @@ -43079,7 +43153,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchStrokePath + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchStrokePath * @since 3.0.0 * * @param {float} srcX - [description] @@ -43172,7 +43246,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchLine + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchLine * @since 3.0.0 * * @param {float} srcX - [description] @@ -43280,7 +43354,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchGraphics + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchGraphics * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - [description] @@ -43302,11 +43376,11 @@ var FlatTintPipeline = new Class({ var cameraScrollX = camera.scrollX * graphics.scrollFactorX; var cameraScrollY = camera.scrollY * graphics.scrollFactorY; - var srcX = graphics.x - cameraScrollX; - var srcY = graphics.y - cameraScrollY; + var srcX = graphics.x; + var srcY = graphics.y; var srcScaleX = graphics.scaleX; var srcScaleY = graphics.scaleY; - var srcRotation = -graphics.rotation; + var srcRotation = graphics.rotation; var commands = graphics.commandBuffer; var alpha = graphics.alpha; var lineAlpha = 1.0; @@ -43334,8 +43408,8 @@ var FlatTintPipeline = new Class({ var sr = sin(srcRotation); var cr = cos(srcRotation); var sra = cr * srcScaleX; - var srb = -sr * srcScaleX; - var src = sr * srcScaleY; + var srb = sr * srcScaleX; + var src = -sr * srcScaleY; var srd = cr * srcScaleY; var sre = srcX; var srf = srcY; @@ -43355,12 +43429,17 @@ var FlatTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -43370,6 +43449,9 @@ var FlatTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -43712,7 +43794,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawStaticTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] @@ -43725,7 +43807,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] @@ -43738,7 +43820,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] @@ -43751,7 +43833,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] @@ -43764,7 +43846,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] @@ -43777,7 +43859,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] @@ -43790,7 +43872,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] @@ -43803,7 +43885,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] @@ -43816,7 +43898,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] @@ -43829,7 +43911,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] @@ -43866,7 +43948,7 @@ var WebGLPipeline = __webpack_require__(80); * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -43910,7 +43992,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -43919,7 +44001,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#maxQuads + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads * @type {number} * @default 1 * @since 3.0.0 @@ -43929,7 +44011,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#resolutionDirty + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty * @type {boolean} * @default true * @since 3.0.0 @@ -43940,10 +44022,10 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.BitmapMaskPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} [description] */ onBind: function () { @@ -43966,14 +44048,14 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.BitmapMaskPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} [description] */ resize: function (width, height, resolution) { @@ -43985,7 +44067,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#beginMask + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#beginMask * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} mask - [description] @@ -44022,7 +44104,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#endMask + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} mask - [description] @@ -50409,7 +50491,7 @@ module.exports = { */ var CONST = __webpack_require__(57); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Tweens @@ -50912,7 +50994,7 @@ module.exports = CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var FilterMode = __webpack_require__(316); /** @@ -51088,7 +51170,7 @@ var ScenePlugin = new Class({ * The settings of the Scene this ScenePlugin belongs to. * * @name Phaser.Scenes.ScenePlugin#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.0.0 */ this.settings = scene.sys.settings; @@ -51282,7 +51364,7 @@ var ScenePlugin = new Class({ }, /** - * @typedef {object} Phaser.Scenes.ScenePlugin#SceneTransitionConfig + * @typedef {object} Phaser.Scenes.ScenePlugin.SceneTransitionConfig * * @property {string} target - The Scene key to transition to. * @property {integer} [duration=1000] - The duration, in ms, for the transition to last. @@ -51328,7 +51410,7 @@ var ScenePlugin = new Class({ * @method Phaser.Scenes.ScenePlugin#transition * @since 3.5.0 * - * @param {Phaser.Scenes.ScenePlugin#SceneTransitionConfig} config - The transition configuration object. + * @param {Phaser.Scenes.ScenePlugin.SceneTransitionConfig} config - The transition configuration object. * * @return {boolean} `true` is the transition was started, otherwise `false`. */ @@ -51387,7 +51469,7 @@ var ScenePlugin = new Class({ } else { - this.manager.start(key); + this.manager.start(key, GetFastValue(config, 'data')); } this.systems.events.emit('transitionout', target, duration); @@ -51497,7 +51579,7 @@ var ScenePlugin = new Class({ * @since 3.0.0 * * @param {string} key - The Scene key. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The config for the Scene. + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The config for the Scene. * @param {boolean} autoStart - Whether to start the Scene after it's added. * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. @@ -51994,7 +52076,7 @@ module.exports = ScenePlugin; */ var CONST = __webpack_require__(52); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Scenes @@ -52122,7 +52204,7 @@ module.exports = SpriteSheetFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -52234,7 +52316,7 @@ module.exports = ScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -52447,7 +52529,7 @@ FileTypesManager.register('multiatlas', function (key, textureURLs, atlasURLs, t */ var AudioFile = __webpack_require__(158); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(36); @@ -52625,7 +52707,7 @@ var JSONFile = __webpack_require__(36); * @param {string} path - The path of the file. * @param {XHRSettingsObject} [xhrSettings] - Optional file specific XHR settings. * - * @return {Phaser.Loader.FileTypes.AnimationJSONFile} A File instance to be added to the Loader. + * @return {Phaser.Loader.FileTypes.JSONFile} A File instance to be added to the Loader. */ var AnimationJSONFile = function (key, url, path, xhrSettings) { @@ -52972,7 +53054,7 @@ var InputPlugin = new Class({ * [description] * * @name Phaser.Input.InputPlugin#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.5.0 */ this.settings = scene.sys.settings; @@ -60483,7 +60565,7 @@ var TimeStep = new Class({ * the TimeStep is actually stopped, not just paused. * * @name Phaser.Boot.TimeStep#running - * @name {boolean} + * @type {boolean} * @readOnly * @default false * @since 3.0.0 @@ -60508,7 +60590,7 @@ var TimeStep = new Class({ * is spiraling out of control. * * @name Phaser.Boot.TimeStep#targetFps - * @name {integer} + * @type {integer} * @default 60 * @since 3.0.0 */ @@ -64006,6 +64088,11 @@ var Game = new Class({ if (this.removeCanvas && this.canvas) { CanvasPool.remove(this.canvas); + + if (this.canvas.parentNode) + { + this.canvas.parentNode.removeChild(this.canvas); + } } this.loop.destroy(); @@ -66219,7 +66306,7 @@ var Flash = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -66651,7 +66738,7 @@ var Fade = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -70719,7 +70806,9 @@ module.exports = { /* 1004 */, /* 1005 */, /* 1006 */, -/* 1007 */ +/* 1007 */, +/* 1008 */, +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -70731,7 +70820,7 @@ module.exports = { __webpack_require__(596); var CONST = __webpack_require__(19); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser diff --git a/dist/phaser-core.min.js b/dist/phaser-core.min.js index bc488949d..5eb403b35 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(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=1007)}([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 o in e)if(e.hasOwnProperty(o)){var h=i(e,o,s);if(!1!==h){if(n((r||t).prototype,o)){if(a.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=e[o]}}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){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,i){var n=i(15),s=i(4);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){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function a(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),o=s?s+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],a]:t._events[o].push(a):(t._events[o]=a,t._eventsCount++),t}function o(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,a=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(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(574),Animation:i(295),BlendMode:i(573),ComputedSize:i(572),Depth:i(571),Flip:i(570),GetBounds:i(569),MatrixStack:i(568),Origin:i(567),Pipeline:i(283),ScaleMode:i(566),ScrollFactor:i(565),Size:i(564),Texture:i(563),Tint:i(562),ToJSON:i(561),Transform:i(560),TransformMatrix:i(60),Visible:i(559)}},function(t,e,i){var n=i(289),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){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_WAITING_LINKFILE:15,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,TEXTURE_ATLAS_JSON_ARRAY:20,TEXTURE_ATLAS_JSON_HASH:21}},function(t,e,i){var n=i(292),s=function(){var t,e,i,r,a,o,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>>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;ns||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(144),r=i(278),a=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 a(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=a},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,i){var n=i(0),s=i(14),r=i(1),a=i(540),o=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,n,a){r.call(this,t,"Sprite"),this.anims=new s.Animation(this),this.setTexture(n,a),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=o},,function(t,e,i){var n=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},,function(t,e,i){var n=i(0),s=i(16),r=i(18),a=i(7),o=i(2),h=new n({Extends:r,initialize:function(t,e,i,n){var a="string"==typeof t?t:o(t,"key",""),h={type:"json",extension:o(t,"extension","json"),responseType:"text",key:a,url:o(t,"file",e),path:i,xhrSettings:o(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});a.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;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 n=i(430);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=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}},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],a=n[2],o=n[3];return n[0]=s*i+a*e,n[1]=r*i+o*e,n[2]=s*-e+a*i,n[3]=r*-e+o*i,this},multiply:function(t){var e=this.matrix,i=t.matrix,n=e[0],s=e[1],r=e[2],a=e[3],o=e[4],h=e[5],u=i[0],l=i[1],c=i[2],d=i[3],f=i[4],p=i[5];return e[0]=u*n+l*r,e[1]=u*s+l*a,e[2]=c*n+d*r,e[3]=c*s+d*a,e[4]=f*n+p*r+o,e[5]=f*s+p*a+h,this},transform:function(t,e,i,n,s,r){var a=this.matrix,o=a[0],h=a[1],u=a[2],l=a[3],c=a[4],d=a[5];return a[0]=t*o+e*u,a[1]=t*h+e*l,a[2]=i*o+n*u,a[3]=i*h+n*l,a[4]=s*o+r*u+c,a[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],a=n[2],o=n[3],h=n[4],u=n[5];return i.x=t*s+e*a+h,i.y=t*r+e*o+u,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=e*s-i*n;return t[0]=s/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-s*r)/o,t[5]=-(e*a-i*r)/o,this},setTransform:function(t,e,i,n,s,r){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=s,a[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],a=i*i,o=n*n,h=s*s,u=r*r,l=Math.sqrt(a+h),c=Math.sqrt(o+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,a=Math.sin(i),o=Math.cos(i);return r[4]=t,r[5]=e,r[0]=o*n,r[1]=a*n,r[2]=-a*s,r[3]=o*s,this},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=n},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},,,,function(t,e,i){var n=i(0),s=i(56),r=i(219),a=i(218),o=i(92),h=i(145),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 a(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 o),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new o),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new o),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(1),a=i(438),o=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=o},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(96),s=i(8),r=i(58),a=i(59),o=i(69),h=i(155),u=i(98),l=i(4),c=i(97),d=i(95),f=i(94);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:u(e),g=h(e),m=o(e,"delay",i.delay),v=o(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=a(l(e,"ease",i.ease),y),w=o(e,"hold",i.hold),T=o(e,"repeat",i.repeat),S=o(e,"repeatDelay",i.repeatDelay),A=r(e,"yoyo",i.yoyo),b=r(e,"flipX",i.flipX),E=r(e,"flipY",i.flipY),_=[],M=0;M=t.length)){for(var i=t.length-1,n=t[e],s=e;s=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:r,onBlur:r,onFocus:r,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,i){var n,s=i(53),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,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,i){var n=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.blockSet=!1,this._frozen=!1,this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){return this.list[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if(this.events.listenerCount("changedata")>0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;nu&&(r=u),a>u&&(a=u),o=s,h=r;;)if(o=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 a=0;a=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,o.size,o.type,o.normalized,r,o.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,i){var n=i(0),s=i(30),r=i(290),a=i(288),o=i(149),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 a(this,t,e,i)},getRandomPoint:function(t){return o(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,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(140),s=i(0),r=i(3),a=i(79),o=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,a.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=o},function(t,e,i){var n=i(47);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(285),r=i(148),a=i(147),o=i(6),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 a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new o),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new o),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,a,o,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:o,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:a,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(0),s=i(13),r=i(11),a=i(57),o=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=a.PENDING_ADD,this._pausedState=a.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===a.ACTIVE},isPaused:function(){return this.state===a.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=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=a.PENDING_REMOVE}},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this},play:function(t){if(this.state!==a.ACTIVE){this.state!==a.PENDING_REMOVE&&this.state!==a.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=a.ACTIVE):(this.countdown=this.calculatedOffset,this.state=a.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=a.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=a.DELAY):n.state=a.PENDING_RENDER}},resume:function(){return this.state===a.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,a=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,a=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,a=s.duration*r)),s.progress=r,s.elapsed=a;var o=s.ease(s.progress);s.current=s.start+(s.end-s.start)*o,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=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=a.PENDING_REMOVE}},stop:function(t){this.state===a.ACTIVE&&void 0!==t&&this.seek(t),this.state!==a.REMOVED&&(this.state=a.PENDING_REMOVE)},update:function(t,e){if(this.state===a.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 a.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,a.REPEAT_DELAY):a.PLAYING_FORWARD}return a.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,a.REPEAT_DELAY):a.PLAYING_FORWARD}return a.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case a.PLAYING_FORWARD:case a.PLAYING_BACKWARD:if(!e.target){e.state=a.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var o,h=e.state===a.PLAYING_FORWARD,u=n/s;o=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*o,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=a.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case a.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=a.PENDING_RENDER);break;case a.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=a.PLAYING_FORWARD);break;case a.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case a.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=a.PLAYING_FORWARD):e.state=a.COMPLETE}return e.state!==a.COMPLETE}});o.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=o},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,a,o=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)o=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":o=function(t,e,i){return i+c};break;case"-":o=function(t,e,i){return i-c};break;case"*":o=function(t,e,i){return i*c};break;case"/":o=function(t,e,i){return i/c};break;default:o=function(){return parseFloat(e)}}}else"function"===u?o=e:"object"===u&&(i(a=e)||n(a))?(n(e)&&(o=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:o,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(4);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(122),s=i(22),r=i(0),a=i(14),o=i(19),h=i(1),u=i(394),l=i(4),c=i(261),d=i(393),f=i(390),p=new r({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Origin,a.Pipeline,a.ScaleMode,a.ScrollFactor,a.Tint,a.Transform,a.Visible,d],initialize:function(t,e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this.canvas=s.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.resolution=1,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.canvasTexture=null,this.dirty=!1,this.initRTL(),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&(this._lineSpacing=r.lineSpacing),this.setText(n),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.canvasTexture=null,this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(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 n="",s=t.replace(/ +/gi," ").split(this.splitRegExp),r=s.length,a=0;au){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,"");s[a+1]=y+" "+(s[a+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;ra?(h>0&&(n+="\n"),n+=o[h]+" ",a=i-u):(a-=l,n+=o[h]+" ")}r0&&(o+=l.lineSpacing*p),i.rtl?a=d-a:"right"===i.align?a+=l.width-l.lineWidths[p]:"center"===i.align&&(a+=(l.width-l.lineWidths[p])/2),this.autoRound&&(a=Math.round(a),o=Math.round(o)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],a,o)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],a,o));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=a.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,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)}});t.exports=p},,,function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(51),r=i(163),a=i(162),o=i(126),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.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(113),s=i(0),r=i(111),a=i(14),o=i(241),h=i(1),u=i(4),l=i(15),c=i(440),d=new s({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Pipeline,a.Transform,a.Visible,a.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),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 u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(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},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,l.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,a=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(a+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(a+i,e+n),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,a){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,a),this},strokeTriangle:function(t,e,i,n,s,a){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,a),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,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 n=1;n-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),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.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(r.game.renderer,this,0,d.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},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){return t?this.resume():this.pause()},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)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(){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)},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;e-v||S>-y||T-v||b>-y||Al&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+a,this.y+o),r.rotate(this.rotation),r.scale(s,s),r.translate(-a,-o),this.shakeEffect.preRender()},removeBounds:function(){return this.useBounds=!1,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=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,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){return this.scene=t,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),this.zoom=t,this},startFollow:function(t,e){return void 0===e&&(e=!1),this._follow=t,this.roundPixels=e,this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e)},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.resetFX(),this.matrix.destroy(),this.culledObjects=[],this.target=void 0,this._bounds=void 0,this.scene=void 0}});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,a):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(17),r=new n({initialize:function(t,e,i,n,s,r,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=a,this.x=0,this.y=0,this.width=r,this.height=a,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*a),this.centerX=Math.floor(r/2),this.centerY=Math.floor(a/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:a,r:n+r,b:s+a},trim:!1,sourceSize:{w:r,h:a},spriteSourceSize:{x:0,y:0,w:r,h:a},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+a*a),drawImage:{sx:n,sy:s,sWidth:r,sHeight:a,dWidth:r,dHeight:a}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=n,o.w=s,o.h=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()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,a=this.source.height,o=this.data.uvs;return o.x0=t/r,o.y0=e/a,o.x1=t/r,o.y1=(e+n)/a,o.x2=(t+i)/r,o.y2=(e+n)/a,o.x3=(t+i)/r,o.y3=e/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(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=s(!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}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(192),r=i(509),a=i(508),o=i(25),h=i(80),u=new n({Extends:h,Mixins:[s],initialize:function(t){h.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:a,fragShader:t.fragShader?t.fragShader:r,vertexCapacity:t.vertexCapacity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+2*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:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:4*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=2e3,this.batches=[],this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var n=i[i.length-1];return e>0?(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},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,a=this.topology,o=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*o));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(l.texture,0),n.drawArrays(a,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s,r,a,o=this.renderer.config.roundPixels,h=t.emitters.list,u=h.length,l=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=this.maxQuads,p=e.scrollX,g=e.scrollY,m=e.matrix.matrix,v=m[0],y=m[1],x=m[2],w=m[3],T=m[4],S=m[5],A=Math.sin,b=Math.cos,E=this.vertexComponentCount,_=this.vertexCapacity,M=t.defaultFrame.source.glTexture;if(n){var C=n[0],k=n[1],P=n[2],L=n[3],F=n[4];s=v*k+y*L,r=x*k+w*L,a=T*k+S*L+n[5],v=v*C+y*P,y=s,x=x*C+w*P,w=r,T=T*C+S*P+F,S=a}this.setTexture2D(M,0);for(var R=0;R=_&&(this.flush(),this.setTexture2D(M,0));for(var X=0;X=_&&(this.flush(),this.setTexture2D(M,0))}}N+=G,I-=G,this.vertexCount>=_&&(this.flush(),this.setTexture2D(M,0))}}}this.setTexture2D(M,0)},drawBlitter:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s=this.renderer.config.roundPixels,r=o.getTintAppendFloatAlpha,a=this.vertexViewF32,h=this.vertexViewU32,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],m=c[4],v=c[5],y=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),T=0,S=t.x-y,A=t.y-x;if(n){var b=n[0],E=n[1],_=n[2],M=n[3],C=n[4],k=d*E+f*M,P=p*E+g*M,L=m*E+v*M+n[5];d=d*b+f*_,f=k,p=p*b+g*_,g=P,m=m*b+v*_+C,v=L}for(var F=0;F=this.vertexCapacity&&this.flush()}T+=R,l-=R,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,a,h,u,l,c=this.renderer.config.roundPixels,d=o.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=e.matrix.matrix,m=t.frame,v=m.texture.source[m.sourceIndex].glTexture,y=!!v.isRenderTexture,x=t.flipX,w=t.flipY^y,T=m.uvs,S=m.width*(x?-1:1),A=m.height*(w?-1:1),b=-t.displayOriginX+m.x+m.width*(x?1:0),E=-t.displayOriginY+m.y+m.height*(w?1:0),_=(c?0|b:b)+S,M=(c?0|E:E)+A,C=t.x-e.scrollX*t.scrollFactorX,k=t.y-e.scrollY*t.scrollFactorY,P=t.scaleX,L=t.scaleY,F=-t.rotation,R=t._alphaTL,O=t._alphaTR,D=t._alphaBL,I=t._alphaBR,B=t._tintTL,N=t._tintTR,U=t._tintBL,Y=t._tintBR,X=Math.sin(F),G=Math.cos(F),z=G*P,W=-X*P,V=X*L,H=G*L,j=C,q=k,K=g[0],J=g[1],Z=g[2],Q=g[3],$=g[4],tt=g[5];if(n){var et=n[0],it=n[1],nt=n[2],st=n[3],rt=K*et+J*nt,at=K*it+J*st,ot=Z*et+Q*nt,ht=Z*it+Q*st;s=z*rt+W*ot,r=z*at+W*ht,a=V*rt+H*ot,h=V*at+H*ht,u=j*rt+q*ot+($*et+tt*nt+n[4]),l=j*at+q*ht+($*it+tt*st+n[5])}else s=z*K+W*Z,r=z*J+W*Q,a=V*K+H*Z,h=V*J+H*Q,u=j*K+q*Z+$,l=j*J+q*Q+tt;var ut,lt=b*s+E*a+u,ct=b*r+E*h+l,dt=b*s+M*a+u,ft=b*r+M*h+l,pt=_*s+M*a+u,gt=_*r+M*h+l,mt=_*s+E*a+u,vt=_*r+E*h+l,yt=d(B,R),xt=d(N,O),wt=d(U,D),Tt=d(Y,I);c&&(lt|=0,ct|=0,dt|=0,ft|=0,pt|=0,gt|=0,mt|=0,vt|=0),this.setTexture2D(v,0),f[(ut=this.vertexCount*this.vertexComponentCount)+0]=lt,f[ut+1]=ct,f[ut+2]=T.x0,f[ut+3]=T.y0,p[ut+4]=yt,f[ut+5]=dt,f[ut+6]=ft,f[ut+7]=T.x1,f[ut+8]=T.y1,p[ut+9]=wt,f[ut+10]=pt,f[ut+11]=gt,f[ut+12]=T.x2,f[ut+13]=T.y2,p[ut+14]=Tt,f[ut+15]=lt,f[ut+16]=ct,f[ut+17]=T.x0,f[ut+18]=T.y0,p[ut+19]=yt,f[ut+20]=pt,f[ut+21]=gt,f[ut+22]=T.x2,f[ut+23]=T.y2,p[ut+24]=Tt,f[ut+25]=mt,f[ut+26]=vt,f[ut+27]=T.x3,f[ut+28]=T.y3,p[ut+29]=xt,this.vertexCount+=6},batchMesh:function(t,e,i){var n=null;i&&(n=i.matrix);var s=t.vertices,r=s.length,a=r/2|0;this.renderer.setPipeline(this),this.vertexCount+a>this.vertexCapacity&&this.flush();var h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=o.getTintAppendFloatAlpha,m=t.uv,v=t.colors,y=t.alphas,x=this.vertexViewF32,w=this.vertexViewU32,T=e.matrix.matrix,S=t.frame,A=t.texture.source[S.sourceIndex].glTexture,b=t.x-e.scrollX*t.scrollFactorX,E=t.y-e.scrollY*t.scrollFactorY,_=t.scaleX,M=t.scaleY,C=-t.rotation,k=Math.sin(C),P=Math.cos(C),L=P*_,F=-k*_,R=k*M,O=P*M,D=b,I=E,B=T[0],N=T[1],U=T[2],Y=T[3],X=T[4],G=T[5],z=0;if(n){var W=n[0],V=n[1],H=n[2],j=n[3],q=B*W+N*H,K=B*V+N*j,J=U*W+Y*H,Z=U*V+Y*j;h=L*q+F*J,u=L*K+F*Z,l=R*q+O*J,c=R*K+O*Z,d=D*q+I*J+(X*W+G*H+n[4]),f=D*K+I*Z+(X*V+G*j+n[5])}else h=L*B+F*U,u=L*N+F*Y,l=R*B+O*U,c=R*N+O*Y,d=D*B+I*U+X,f=D*N+I*Y+G;this.setTexture2D(A,0),z=this.vertexCount*this.vertexComponentCount;for(var Q=0,$=0;Qthis.vertexCapacity&&this.flush();var s,r,a,h,u,l,c,d,f,p,g,m,v,y,x=this.renderer.config.roundPixels,w=t.text,T=w.length,S=o.getTintAppendFloatAlpha,A=this.vertexViewF32,b=this.vertexViewU32,E=e.matrix.matrix,_=e.width+50,M=e.height+50,C=t.frame,k=t.texture.source[C.sourceIndex],P=e.scrollX*t.scrollFactorX,L=e.scrollY*t.scrollFactorY,F=t.fontData,R=F.lineHeight,O=t.fontSize/F.size,D=F.chars,I=t.alpha,B=S(t._tintTL,I),N=S(t._tintTR,I),U=S(t._tintBL,I),Y=S(t._tintBR,I),X=t.x,G=t.y,z=C.cutX,W=C.cutY,V=k.width,H=k.height,j=k.glTexture,q=0,K=0,J=0,Z=0,Q=null,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,at=0,ot=0,ht=0,ut=0,lt=0,ct=null,dt=0,ft=X-P+C.x,pt=G-L+C.y,gt=-t.rotation,mt=t.scaleX,vt=t.scaleY,yt=t.letterSpacing,xt=Math.sin(gt),wt=Math.cos(gt),Tt=wt*mt,St=-xt*mt,At=xt*vt,bt=wt*vt,Et=ft,_t=pt,Mt=E[0],Ct=E[1],kt=E[2],Pt=E[3],Lt=E[4],Ft=E[5],Rt=0;if(n){var Ot=n[0],Dt=n[1],It=n[2],Bt=n[3],Nt=Mt*Ot+Ct*It,Ut=Mt*Dt+Ct*Bt,Yt=kt*Ot+Pt*It,Xt=kt*Dt+Pt*Bt;f=Tt*Nt+St*Yt,p=Tt*Ut+St*Xt,g=At*Nt+bt*Yt,m=At*Ut+bt*Xt,v=Et*Nt+_t*Yt+(Lt*Ot+Ft*It+n[4]),y=Et*Ut+_t*Xt+(Lt*Dt+Ft*Bt+n[5])}else f=Tt*Mt+St*kt,p=Tt*Ct+St*Pt,g=At*Mt+bt*kt,m=At*Ct+bt*Pt,v=Et*Mt+_t*kt+Lt,y=Et*Ct+_t*Pt+Ft;this.setTexture2D(j,0);for(var Gt=0;Gt_||r<-50||r>M)&&(a<-50||a>_||h<-50||h>M)&&(u<-50||u>_||l<-50||l>M)&&(c<-50||c>_||d<-50||d>M)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Rt=this.vertexCount*this.vertexComponentCount,x&&(s|=0,r|=0,a|=0,h|=0,u|=0,l|=0,c|=0,d|=0),A[Rt+0]=s,A[Rt+1]=r,A[Rt+2]=ot,A[Rt+3]=ut,b[Rt+4]=B,A[Rt+5]=a,A[Rt+6]=h,A[Rt+7]=ot,A[Rt+8]=lt,b[Rt+9]=U,A[Rt+10]=u,A[Rt+11]=l,A[Rt+12]=ht,A[Rt+13]=lt,b[Rt+14]=Y,A[Rt+15]=s,A[Rt+16]=r,A[Rt+17]=ot,A[Rt+18]=ut,b[Rt+19]=B,A[Rt+20]=u,A[Rt+21]=l,A[Rt+22]=ht,A[Rt+23]=lt,b[Rt+24]=Y,A[Rt+25]=c,A[Rt+26]=d,A[Rt+27]=ht,A[Rt+28]=ut,b[Rt+29]=N,this.vertexCount+=6))}}else q=0,J=0,K+=R,ct=null},batchDynamicBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,S,A,b,E=this.renderer.config.roundPixels,_=t.displayCallback,M=t.text,C=M.length,k=o.getTintAppendFloatAlpha,P=this.vertexViewF32,L=this.vertexViewU32,F=this.renderer,R=e.matrix.matrix,O=t.frame,D=t.texture.source[O.sourceIndex],I=e.scrollX*t.scrollFactorX,B=e.scrollY*t.scrollFactorY,N=t.scrollX,U=t.scrollY,Y=t.fontData,X=Y.lineHeight,G=t.fontSize/Y.size,z=Y.chars,W=t.alpha,V=k(t._tintTL,W),H=k(t._tintTR,W),j=k(t._tintBL,W),q=k(t._tintBR,W),K=t.x,J=t.y,Z=O.cutX,Q=O.cutY,$=D.width,tt=D.height,et=D.glTexture,it=0,nt=0,st=0,rt=0,at=null,ot=0,ht=0,ut=0,lt=0,ct=0,dt=0,ft=0,pt=0,gt=0,mt=0,vt=0,yt=0,xt=null,wt=0,Tt=K+O.x,St=J+O.y,At=-t.rotation,bt=t.scaleX,Et=t.scaleY,_t=t.letterSpacing,Mt=Math.sin(At),Ct=Math.cos(At),kt=Ct*bt,Pt=-Mt*bt,Lt=Mt*Et,Ft=Ct*Et,Rt=Tt,Ot=St,Dt=R[0],It=R[1],Bt=R[2],Nt=R[3],Ut=R[4],Yt=R[5],Xt=t.cropWidth>0||t.cropHeight>0,Gt=0;if(n){var zt=n[0],Wt=n[1],Vt=n[2],Ht=n[3],jt=Dt*zt+It*Vt,qt=Dt*Wt+It*Ht,Kt=Bt*zt+Nt*Vt,Jt=Bt*Wt+Nt*Ht;x=kt*jt+Pt*Kt,w=kt*qt+Pt*Jt,T=Lt*jt+Ft*Kt,S=Lt*qt+Ft*Jt,A=Rt*jt+Ot*Kt+(Ut*zt+Yt*Vt+n[4]),b=Rt*qt+Ot*Jt+(Ut*Wt+Yt*Ht+n[5])}else x=kt*Dt+Pt*Bt,w=kt*It+Pt*Nt,T=Lt*Dt+Ft*Bt,S=Lt*It+Ft*Nt,A=Rt*Dt+Ot*Bt+Ut,b=Rt*It+Ot*Nt+Yt;this.setTexture2D(et,0),Xt&&F.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var Zt=0;Ztthis.vertexCapacity&&this.flush(),Gt=this.vertexCount*this.vertexComponentCount,E&&(s|=0,r|=0,a|=0,h|=0,u|=0,l|=0,c|=0,d|=0),P[Gt+0]=s,P[Gt+1]=r,P[Gt+2]=gt,P[Gt+3]=vt,L[Gt+4]=V,P[Gt+5]=a,P[Gt+6]=h,P[Gt+7]=gt,P[Gt+8]=yt,L[Gt+9]=j,P[Gt+10]=u,P[Gt+11]=l,P[Gt+12]=mt,P[Gt+13]=yt,L[Gt+14]=q,P[Gt+15]=s,P[Gt+16]=r,P[Gt+17]=gt,P[Gt+18]=vt,L[Gt+19]=V,P[Gt+20]=u,P[Gt+21]=l,P[Gt+22]=mt,P[Gt+23]=yt,L[Gt+24]=q,P[Gt+25]=c,P[Gt+26]=d,P[Gt+27]=mt,P[Gt+28]=vt,L[Gt+29]=H,this.vertexCount+=6}}}else it=0,st=0,nt+=X,xt=null;Xt&&F.popScissor()},batchText:function(t,e,i){var n=o.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),0,0,e,i)},batchDynamicTilemapLayer:function(t,e,i){for(var n=t.culledTiles,s=n.length,r=t.tileset.image.get().source.glTexture,a=t.tileset,h=t.scrollFactorX,u=t.scrollFactorY,l=t.alpha,c=t.x,d=t.y,f=t.scaleX,p=t.scaleY,g=o.getTintAppendFloatAlpha,m=0;mthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,l=-l;var P,L,F,R,O,D,I=this.renderer.config.roundPixels,B=this.vertexViewF32,N=this.vertexViewU32,U=M.matrix.matrix,Y=a*(c?1:0)-g,X=o*(d?1:0)-m,G=Y+a*(c?-1:1),z=X+o*(d?-1:1),W=s-M.scrollX*f,V=r-M.scrollY*p,H=Math.sin(l),j=Math.cos(l),q=j*h,K=-H*h,J=H*u,Z=j*u,Q=W,$=V,tt=U[0],et=U[1],it=U[2],nt=U[3],st=U[4],rt=U[5];if(k){var at=k[0],ot=k[1],ht=k[2],ut=k[3],lt=tt*at+et*ht,ct=tt*ot+et*ut,dt=it*at+nt*ht,ft=it*ot+nt*ut;P=q*lt+K*dt,L=q*ct+K*ft,F=J*lt+Z*dt,R=J*ct+Z*ft,O=Q*lt+$*dt+(st*at+rt*ht+k[4]),D=Q*ct+$*ft+(st*ot+rt*ut+k[5])}else P=q*tt+K*it,L=q*et+K*nt,F=J*tt+Z*it,R=J*et+Z*nt,O=Q*tt+$*it+st,D=Q*et+$*nt+rt;var pt,gt=Y*P+X*F+O,mt=Y*L+X*R+D,vt=Y*P+z*F+O,yt=Y*L+z*R+D,xt=G*P+z*F+O,wt=G*L+z*R+D,Tt=G*P+X*F+O,St=G*L+X*R+D,At=v/i+E,bt=y/n+_,Et=(v+x)/i+E,_t=(y+w)/n+_;this.setTexture2D(e,0),pt=this.vertexCount*this.vertexComponentCount,I&&(gt|=0,mt|=0,vt|=0,yt|=0,xt|=0,wt|=0,Tt|=0,St|=0),B[pt+0]=gt,B[pt+1]=mt,B[pt+2]=At,B[pt+3]=bt,N[pt+4]=T,B[pt+5]=vt,B[pt+6]=yt,B[pt+7]=At,B[pt+8]=_t,N[pt+9]=S,B[pt+10]=xt,B[pt+11]=wt,B[pt+12]=Et,B[pt+13]=_t,N[pt+14]=A,B[pt+15]=gt,B[pt+16]=mt,B[pt+17]=At,B[pt+18]=bt,N[pt+19]=T,B[pt+20]=xt,B[pt+21]=wt,B[pt+22]=Et,B[pt+23]=_t,N[pt+24]=A,B[pt+25]=Tt,B[pt+26]=St,B[pt+27]=Et,B[pt+28]=bt,N[pt+29]=b,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,a,h,u,l,c){var d=null;c&&(d=c.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var f=this.renderer.config.roundPixels,p=this.vertexViewF32,g=this.vertexViewU32,m=e,v=i,y=m+h,x=v+u,w=l[0],T=l[1],S=l[2],A=l[3],b=l[4],E=l[5];if(d){var _=d[0],M=d[1],C=d[2],k=d[3],P=d[4],L=w*M+T*k,F=S*M+A*k,R=b*M+E*k+d[5];w=w*_+T*C,T=L,S=S*_+A*C,A=F,b=b*_+E*C+P,E=R}var O,D=m*w+v*S+b,I=m*T+v*A+E,B=m*w+x*S+b,N=m*T+x*A+E,U=y*w+x*S+b,Y=y*T+x*A+E,X=y*w+v*S+b,G=y*T+v*A+E,z=t.width,W=t.height,V=r/z,H=a/W,j=(r+h)/z,q=(a+u)/W;n=o.getTintAppendFloatAlpha(n,s),this.setTexture2D(t,0),O=this.vertexCount*this.vertexComponentCount,f&&(D|=0,I|=0,B|=0,N|=0,U|=0,Y|=0,X|=0,G|=0),p[O+0]=D,p[O+1]=I,p[O+2]=V,p[O+3]=H,g[O+4]=n,p[O+5]=B,p[O+6]=N,p[O+7]=V,p[O+8]=q,g[O+9]=n,p[O+10]=U,p[O+11]=Y,p[O+12]=j,p[O+13]=q,g[O+14]=n,p[O+15]=D,p[O+16]=I,p[O+17]=V,p[O+18]=H,g[O+19]=n,p[O+20]=U,p[O+21]=Y,p[O+22]=j,p[O+23]=q,g[O+24]=n,p[O+25]=X,p[O+26]=G,p[O+27]=j,p[O+28]=H,g[O+29]=n,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=u},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===i&&(i=!0),e&&("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e)),n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},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(93),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){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 void 0===t[n]?null:t[n]}},function(t,e,i){t.exports={Matrix:i(480),Add:i(473),AddAt:i(472),BringToTop:i(471),CountAllMatching:i(470),Each:i(469),EachInRange:i(468),FindClosestInSorted:i(200),GetAll:i(467),GetFirst:i(466),GetRandom:i(139),MoveDown:i(465),MoveTo:i(464),MoveUp:i(463),NumberArray:i(165),NumberArrayStep:i(462),QuickSelect:i(164),Range:i(246),Remove:i(461),RemoveAt:i(460),RemoveBetween:i(459),RemoveRandomElement:i(458),Replace:i(457),RotateLeft:i(282),RotateRight:i(281),SafeRange:i(26),SendToBack:i(456),SetAll:i(455),Shuffle:i(91),SpliceOne:i(70),StableSort:i(79),Swap:i(454)}},function(t,e,i){var n=i(0),s=i(510),r=i(120),a=new n({Extends:r,initialize:function(t){t.fragShader=s.replace("%LIGHT_COUNT%",10..toString()),r.call(this,t)},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.sys.lights;if(!i)return this;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,a=i.cull(e),o=Math.min(a.length,10),h=e.matrix,u={x:0,y:0},l=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(o<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n=1&&(o=1-o,h=1-h),e.x=t.x1+(i*o+r*h),e.y=t.y1+(s*o+a*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(67),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,u=t.y2,l=0;l1?2-s:s,a=r*Math.cos(i),o=r*Math.sin(i);return e.x=t.x+a*t.radius,e.y=t.y+o*t.radius,e}},,function(t,e,i){var n=i(0),s=i(9),r=i(68),a=i(57),o=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=a.PENDING_ADD,this._pausedState=a.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===a.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=a.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=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=a.PENDING_REMOVE}},update:function(t,e){if(this.state!==a.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 a.ACTIVE:for(var n=this.totalData,s=0;s0?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=o(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=a(e,"yoyo",g.yoyo),g.flipX=a(e,"flipX",g.flipX),g.flipY=a(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 n=i(0),s=i(18),r=i(2),a=i(117),o=new n({Extends:s,initialize:function(t,e,i,n){this.locked="ontouchstart"in window,this.loaded=!1;var a={type:"audio",extension:r(e,"type",""),key:t,url:r(e,"uri",e),path:i,config:n};s.call(this,a)},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t0&&e.cameraFilter&r._id)){var u=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,c=e.x,d=e.y,f=e.scaleX,p=e.scaleY,g=e.rotation,m=e.commandBuffer,v=o||t.currentContext,y=1,x=1,w=0,T=0,S=1,A=0,b=0,E=0;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),a){var _=a.matrix;v.transform(_[0],_[1],_[2],_[3],_[4],_[5])}v.translate(c-u,d-l),v.rotate(g),v.scale(f,p),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var M=0,C=m.length;M>>16,b=(65280&w)>>>8,E=255&w,v.strokeStyle="rgba("+A+","+b+","+E+","+y+")",v.lineWidth=S,M+=3;break;case n.FILL_STYLE:T=m[M+1],x=m[M+2],A=(16711680&T)>>>16,b=(65280&T)>>>8,E=255&T,v.fillStyle="rgba("+A+","+b+","+E+","+x+")",M+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:h||v.fill();break;case n.STROKE_PATH:h||v.stroke();break;case n.FILL_RECT:h?v.rect(m[M+1],m[M+2],m[M+3],m[M+4]):v.fillRect(m[M+1],m[M+2],m[M+3],m[M+4]),M+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(m[M+1],m[M+2]),v.lineTo(m[M+3],m[M+4]),v.lineTo(m[M+5],m[M+6]),v.closePath(),h||v.fill(),M+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(m[M+1],m[M+2]),v.lineTo(m[M+3],m[M+4]),v.lineTo(m[M+5],m[M+6]),v.closePath(),h||v.stroke(),M+=6;break;case n.LINE_TO:v.lineTo(m[M+1],m[M+2]),M+=2;break;case n.MOVE_TO:v.moveTo(m[M+1],m[M+2]),M+=2;break;case n.LINE_FX_TO:v.lineTo(m[M+1],m[M+2]),M+=5;break;case n.MOVE_FX_TO:v.moveTo(m[M+1],m[M+2]),M+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(m[M+1],m[M+2]),M+=2;break;case n.SCALE:v.scale(m[M+1],m[M+2]),M+=2;break;case n.ROTATE:v.rotate(m[M+1]),M+=1}v.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(161),s=i(105),r=i(61),a=i(15);t.exports=function(t,e,i,o){void 0===o&&(o=[]),e||(e=n(t)/i);for(var h=0;hr;){if(a-r>600){var h=a-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(a,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,o)}var g=t[e],m=r,v=a;for(n(t,r,e),o(t[a],g)>0&&n(t,r,a);m0;)v--}0===o(t[r],g)?n(t,r,v):n(t,++v,a),v<=e&&(r=v+1),e<=v&&(a=v-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,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var a=i?i+r.toString():r.toString();n&&(a=a.concat(n)),s.push(a)}else s.push(r);return s}},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){var n=i(0),s=i(19),r=i(121),a=i(55),o=new n({initialize:function(t,e,i,n){var s=t.manager.game;this.texture=t,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=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){t.config.renderType===s.WEBGL&&(this.glTexture=t.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.pixelArt&&this.setFilter(1)},setFilter:function(t){var e=this.texture.manager.game;e.config.renderType===s.WEBGL&&e.renderer.setTextureFilter(this.glTexture,t)},destroy:function(){this.texture=null,this.image=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(119),r=i(167),a=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var a=0;a=0&&t<=a.width&&e>=0&&e<=a.height){t+=s.cutX,e+=s.cutY;var o=this._tempContext;o.clearRect(0,0,1,1),o.drawImage(a,t,e,1,1,0,0,1,1);var h=o.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.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},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(73),s=i(0),r=i(175),a=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=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(){if(this.locked="ontouchstart"in window,this.locked){this.lockedActionsQueue=[];var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.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.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(en&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i=0;t--){this.scenes[t].sys.destroy()}this.update=a,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.startListeners()},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},s={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("touchstart",t,s),i.addEventListener("touchmove",t,s),i.addEventListener("touchend",t,s)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("touchstart",t,n),i.addEventListener("touchmove",t,n),i.addEventListener("touchend",t,n)),this.handler=t},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.handler),t.removeEventListener("touchmove",this.handler),t.removeEventListener("touchend",this.handler)},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new s,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.dragState=0,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.movementX=0,this.movementY=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},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}},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},touchmove:function(t){this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.dirty=!0,this.wasTouch=!1},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){this.buttons=1,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},touchend:function(t,e){this.buttons=0,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return 1&this.buttons},rightButtonDown:function(){return 2&this.buttons},middleButtonDown:function(){return 4&this.buttons},backButtonDown:function(){return 8&this.buttons},forwardButtonDown:function(){return 16&this.buttons},destroy:function(){this.camera=null,this.manager=null,this.position=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(112),r=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler,this.locked=!1},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},pointerLockChange:function(t){var e=this.target;this.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,this.manager.queue.push(t)},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},r={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("mousemove",t,r),i.addEventListener("mousedown",t,r),i.addEventListener("mouseup",t,r)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("mousemove",t,n),i.addEventListener("mousedown",t,n),i.addEventListener("mouseup",t,n)),this.handler=t,s.pointerLock&&(this.pointerLockChange=this.pointerLockChange.bind(this),document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.handler),t.removeEventListener("mousedown",this.handler),t.removeEventListener("mouseup",this.handler),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=i(501),a=i(499),o=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});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)=n.x&&e>=n.y&&t<=n.x+a&&e<=n.y+o))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=this.game.config.resolution,c=this._tempMatrix,f=0;fe.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(23),s=i(0),r=i(200),a=i(199),o=i(4),h=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,o(i,"frames",[]),o(i,"defaultTextureKey",null)),this.frameRate=o(i,"frameRate",null),this.duration=o(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=o(i,"skipMissedFrames",!0),this.delay=o(i,"delay",0),this.repeat=o(i,"repeat",0),this.repeatDelay=o(i,"repeatDelay",0),this.yoyo=o(i,"yoyo",!1),this.showOnStart=o(i,"showOnStart",!1),this.hideOnComplete=o(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 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),t.updateFrame(this.frames[e])},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,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),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.forward=!0,t.updateFrame(t.currentFrame.nextFrame),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 m(t,e,i,s,r){for(var a,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=s||(a=e+Math.ceil((i-e)/s/2)*s,n(t,a,e,i,r),o.push(e,a,a,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,a,o,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),o=g(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,a,h,u,l,d,f,p,g,m,v,y;for(u=l=1/0,n=e;n<=i-e;n++)s=o(t,0,n,this.toBBox),r=o(t,n,i,this.toBBox),f=s,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),a=Math.max(0,v-g)*Math.max(0,y-m),h=c(s)+c(r),a=e;s--)r=t.children[s],h(l,t.leaf?a(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():a(t[i],this.toBBox)},_initFormat:function(t){t=t.map(function(t){return t.substring(1)});var e=function(t){return function(e,i){return e[t]-i[t]}};this.compareMinX=e(t[0]),this.compareMinY=e(t[1]),this.toBBox=function(e){return{minX:e[t[0]],minY:e[t[1]],maxX:e[t[2]],maxY:e[t[3]]}}}},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,m.x=h.x1+(h.x2-h.x1)*g,m.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,m.x=o.x1+(o.x2-o.x1)*g,m.y=o.y1+(o.y2-o.y1)*g),r.push(m)}return r}},function(t,e,i){var n=i(5),s=i(67);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),a=t.getLineB(),o=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(a),l=s(o),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d):(d=(c-=h)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d),i}},,,,,,,,,function(t,e,i){t.exports=i(398)},function(t,e,i){t.exports={In:i(401),Out:i(400),InOut:i(399)}},function(t,e,i){t.exports={In:i(404),Out:i(403),InOut:i(402)}},function(t,e,i){t.exports={In:i(407),Out:i(406),InOut:i(405)}},function(t,e,i){t.exports={In:i(410),Out:i(409),InOut:i(408)}},function(t,e,i){t.exports=i(411)},function(t,e,i){t.exports={In:i(414),Out:i(413),InOut:i(412)}},function(t,e,i){t.exports={In:i(417),Out:i(416),InOut:i(415)}},function(t,e,i){t.exports={In:i(420),Out:i(419),InOut:i(418)}},function(t,e,i){t.exports={In:i(423),Out:i(422),InOut:i(421)}},function(t,e,i){t.exports={In:i(426),Out:i(425),InOut:i(424)}},function(t,e,i){t.exports={In:i(429),Out:i(428),InOut:i(427)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var n=i(106);n.Area=i(449),n.Circumference=i(161),n.CircumferencePoint=i(105),n.Clone=i(448),n.Contains=i(51),n.ContainsPoint=i(447),n.ContainsRect=i(446),n.CopyFrom=i(445),n.Equals=i(444),n.GetBounds=i(443),n.GetPoint=i(163),n.GetPoints=i(162),n.Offset=i(442),n.OffsetPoint=i(441),n.Random=i(126),t.exports=n},,,,,function(t,e,i){var n=i(4),s=i(91),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(6);t.exports=function(t,e,i,s,r,a,o,h){void 0===h&&(h=new n);var u=Math.sin(-r),l=Math.cos(-r),c=l*a,d=-u*a,f=u*o,p=l*o,g=c*p-d*f,m=p/g,v=-d/g,y=-f/g,x=c/g,w=(f*s-p*i)/g,T=-(c*s-d*i)/g;return h.x=t*m+e*y+w,h.y=t*v+e*x+T,h}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,o,h,u,l,f,g,m=e&&e.length,v=m?e[0]*i:t.length,y=s(t,0,v,i,!0),x=[];if(!y)return x;if(m&&(y=function(t,e,i,n){var a,o,h,u,l,f=[];for(a=0,o=e.length;a80*i){n=h=t[0],o=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-o)}return a(y,x,i,n,o,g),x}function s(t,e,i,n,s){var r,a;if(s===E(t,e,i,n)>0)for(r=e;r=e;r-=n)a=S(r,t[r],t[r+1],a);return a&&y(a,a.next)&&(A(a),a=a.next),a}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!==v(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 a(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,a,o,h,u=1;do{for(i=t,t=null,r=null,a=0;i;){for(a++,n=i,o=0,e=0;e0||h>0&&n;)0!==o&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,o--):(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(a>1)}(s)}(t,n,s,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):o(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),A(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?a(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):a(r(t),e,i,n,s,c,1);break}}}function o(t){var e=t.prev,i=t,n=t.next;if(v(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)&&v(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,a=t.next;if(v(s,r,a)>=0)return!1;for(var o=s.xr.x?s.x>a.x?s.x:a.x:r.x>a.x?r.x:a.x,l=s.y>r.y?s.y>a.y?s.y:a.y:r.y>a.y?r.y:a.y,c=f(o,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,a.x,a.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(s.x,s.y,r.x,r.y,a.x,a.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 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,o){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),a(h,e,i,n,s,o),void a(l,e,i,n,s,o)}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,a=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var o=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=s&&o>a){if(a=o,o===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=T(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-a)*(n-o)-(i-a)*(e-o)>=0&&(i-a)*(r-o)-(s-a)*(n-o)>=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,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 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,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,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),n=new b(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function S(t,e,i,n){var s=new b(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function 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 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 E(t,e,i,n){for(var s=0,r=e,a=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e,i){var n=i(0),s=i(111),r=i(250),a=i(192),o=i(512),h=i(511),u=i(25),l=i(80),c=function(t,e,i,n,s){this.x=t,this.y=e,this.width=i,this.rgb=n,this.alpha=s},d=function(t,e,i,n,s){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,n,s)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,m=[],v=new n({Extends:l,Mixins:[a],initialize:function(t){l.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:h,fragShader:t.fragShader?t.fragShader:o,vertexCapacity:t.vertexCapcity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:2*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.tempTriangle=[{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1}],this.polygonCache=[],this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchFillRect:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v,y){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var x=this.vertexViewF32,w=this.vertexViewU32,T=this.vertexCount*this.vertexComponentCount,S=r+o,A=a+h,b=y[0],E=y[1],_=y[2],M=y[3],C=d*b+f*_,k=d*E+f*M,P=p*b+g*_,L=p*E+g*M,F=m*b+v*_+y[4],R=m*E+v*M+y[5],O=r*C+a*P+F,D=r*k+a*L+R,I=r*C+A*P+F,B=r*k+A*L+R,N=S*C+A*P+F,U=S*k+A*L+R,Y=S*C+a*P+F,X=S*k+a*L+R,G=u.getTintAppendFloatAlphaAndSwap(l,c);x[T+0]=O,x[T+1]=D,w[T+2]=G,x[T+3]=I,x[T+4]=B,w[T+5]=G,x[T+6]=N,x[T+7]=U,w[T+8]=G,x[T+9]=O,x[T+10]=D,w[T+11]=G,x[T+12]=N,x[T+13]=U,w[T+14]=G,x[T+15]=Y,x[T+16]=X,w[T+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v,y,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.vertexViewF32,S=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,b=w[0],E=w[1],_=w[2],M=w[3],C=p*b+g*_,k=p*E+g*M,P=m*b+v*_,L=m*E+v*M,F=y*b+x*_+w[4],R=y*E+x*M+w[5],O=r*C+a*P+F,D=r*k+a*L+R,I=o*C+h*P+F,B=o*k+h*L+R,N=l*C+c*P+F,U=l*k+c*L+R,Y=u.getTintAppendFloatAlphaAndSwap(d,f);T[A+0]=O,T[A+1]=D,S[A+2]=Y,T[A+3]=I,T[A+4]=B,S[A+5]=Y,T[A+6]=N,T[A+7]=U,S[A+8]=Y,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,a,o,h,u,l,c,d,f,p,g,m,v,y,x,w){var T=this.tempTriangle;T[0].x=r,T[0].y=a,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=o,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=u,T[2].y=l,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=a,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,m,v,y,x,!1,w)},batchFillPath:function(t,e,i,n,s,a,o,h,l,c,d,f,p,g,m){this.renderer.setPipeline(this);for(var v,y,x,w,T,S,A,b,E,_,M,C,k,P,L,F,R,O=a.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,N=0,U=m[0],Y=m[1],X=m[2],G=m[3],z=l*U+c*X,W=l*Y+c*G,V=d*U+f*X,H=d*Y+f*G,j=p*U+g*X+m[4],q=p*Y+g*G+m[5],K=u.getTintAppendFloatAlphaAndSwap(o,h),J=0;Jthis.vertexCapacity&&this.flush(),N=this.vertexCount*this.vertexComponentCount,C=(S=D[x+0])*z+(A=D[x+1])*V+j,k=S*W+A*H+q,P=(b=D[w+0])*z+(E=D[w+1])*V+j,L=b*W+E*H+q,F=(_=D[T+0])*z+(M=D[T+1])*V+j,R=_*W+M*H+q,I[N+0]=C,I[N+1]=k,B[N+2]=K,I[N+3]=P,I[N+4]=L,B[N+5]=K,I[N+6]=F,I[N+7]=R,B[N+8]=K,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v){var y,x;this.renderer.setPipeline(this);for(var w,T,S,A,b=r.length,E=this.polygonCache,_=this.vertexViewF32,M=this.vertexViewU32,C=u.getTintAppendFloatAlphaAndSwap,k=0;k+1this.vertexCapacity&&this.flush(),w=E[P-1]||E[L-1],T=E[P],_[(S=this.vertexCount*this.vertexComponentCount)+0]=w[6],_[S+1]=w[7],M[S+2]=C(w[8],h),_[S+3]=w[0],_[S+4]=w[1],M[S+5]=C(w[2],h),_[S+6]=T[9],_[S+7]=T[10],M[S+8]=C(T[11],h),_[S+9]=w[0],_[S+10]=w[1],M[S+11]=C(w[2],h),_[S+12]=w[6],_[S+13]=w[7],M[S+14]=C(w[8],h),_[S+15]=T[3],_[S+16]=T[4],M[S+17]=C(T[5],h),this.vertexCount+=6;E.length=0},batchLine:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v,y,x,w,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var S=T[0],A=T[1],b=T[2],E=T[3],_=g*S+m*b,M=g*A+m*E,C=v*S+y*b,k=v*A+y*E,P=x*S+w*b+T[4],L=x*A+w*E+T[5],F=this.vertexViewF32,R=this.vertexViewU32,O=o-r,D=h-a,I=Math.sqrt(O*O+D*D),B=l*(h-a)/I,N=l*(r-o)/I,U=c*(h-a)/I,Y=c*(r-o)/I,X=o-U,G=h-Y,z=r-B,W=a-N,V=o+U,H=h+Y,j=r+B,q=a+N,K=X*_+G*C+P,J=X*M+G*k+L,Z=z*_+W*C+P,Q=z*M+W*k+L,$=V*_+H*C+P,tt=V*M+H*k+L,et=j*_+q*C+P,it=j*M+q*k+L,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),at=this.vertexCount*this.vertexComponentCount;return F[at+0]=K,F[at+1]=J,R[at+2]=rt,F[at+3]=Z,F[at+4]=Q,R[at+5]=st,F[at+6]=$,F[at+7]=tt,R[at+8]=rt,F[at+9]=Z,F[at+10]=Q,R[at+11]=st,F[at+12]=et,F[at+13]=it,R[at+14]=st,F[at+15]=$,F[at+16]=tt,R[at+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var r,a,o,h,u,l,v,y,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,T=t.x-x,S=t.y-w,A=t.scaleX,b=t.scaleY,E=-t.rotation,_=t.commandBuffer,M=t.alpha,C=1,k=1,P=0,L=0,F=1,R=e.matrix.matrix,O=null,D=0,I=0,B=0,N=0,U=0,Y=0,X=0,G=0,z=0,W=0,V=null,H=Math.sin,j=Math.cos,q=2*Math.PI,K=H(E),J=j(E),Z=J*A,Q=-K*A,$=K*b,tt=J*b,et=T,it=S,nt=R[0],st=R[1],rt=R[2],at=R[3],ot=R[4],ht=R[5];if(n){var ut=n[0],lt=n[1],ct=n[2],dt=n[3],ft=nt*ut+st*ct,pt=nt*lt+st*dt,gt=rt*ut+at*ct,mt=rt*lt+at*dt;r=Z*ft+Q*gt,a=Z*pt+Q*mt,o=$*ft+tt*gt,h=$*pt+tt*mt,u=et*ft+it*gt+(ot*ut+ht*ct+n[4]),l=et*pt+it*mt+(ot*lt+ht*dt+n[5])}else r=Z*nt+Q*rt,a=Z*st+Q*at,o=$*nt+tt*rt,h=$*st+tt*at,u=et*nt+it*rt+ot,l=et*st+it*at+ht;m.length=0;for(var vt=0,yt=_.length;vt0&&(z=z%q-q):z>q?z=q:z<0&&(z=q+z%q);D<1;)I=U+j(N=z*D+G)*X,B=Y+H(N)*X,O.points.push(new c(I,B,F,P,C*M)),D+=.01;I=U+j(N=z+G)*X,B=Y+H(N)*X,O.points.push(new c(I,B,F,P,C*M)),vt+=6;break;case s.LINE_STYLE:F=_[vt+1],P=_[vt+2],C=_[vt+3],vt+=3;break;case s.FILL_STYLE:L=_[vt+1],k=_[vt+2],vt+=2;break;case s.BEGIN_PATH:m.length=0,O=null;break;case s.CLOSE_PATH:O&&O.points.length&&O.points.push(O.points[0]);break;case s.FILL_PATH:for(v=0,y=m.length;v=0&&n>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=a,a?(s.disable(s.SCISSOR_TEST),this):(s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,a=this.currentScissor;return s[r+0]=a[0],s[r+1]=a[1],s[r+2]=a[2],s[r+3]=a[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?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),this},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},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;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),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 a=this.gl,o=a.NEAREST,h=a.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=a.REPEAT),n===s.ScaleModes.LINEAR?o=a.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(o=a.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,o,o,h,h,a.RGBA,t):this.createTexture2D(0,o,o,h,h,a.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,a,o,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===a||void 0===a?l.texImage2D(l.TEXTURE_2D,t,r,o,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,a),o=a.width,h=a.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=o,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,a=r.createFramebuffer();if(this.setFramebuffer(a),n){var o=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,o)}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 a.renderTexture=i,this.setFramebuffer(null),a},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){return 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=this.config.resolution,i=Math.floor(t.x*e),n=Math.floor(t.y*e),s=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,n,s,r),t.backgroundColor.alphaGL>0){var o=t.backgroundColor,h=this.pipelines.FlatTintPipeline;h.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,a.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),h.flush()}},postRenderCamera:function(t){var e=this.pipelines.FlatTintPipeline,i=t.flashEffect.postRenderWebGL(e,a.getTintFromFloats);(t.fadeEffect.postRenderWebGL(e,a.getTintFromFloats)||i)&&e.flush(),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()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,a=r.length,o=this.pipelines;for(var h in o)o[h].onRender(t,n);this.preRenderCamera(n);for(var 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(27),s=i(276);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(27);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),a=parseInt(i[3],16);e.setTo(s,r,a)}return e}},,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;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(153),r=i(10),a=i(152),o=i(57),h=i(68),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 a(this,t)},timeline:function(t){var e=a(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;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.settings.status!==r.RUNNING?this.manager.queueOp("start",t,e):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==r.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=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)},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",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(52),s=i(17),r={SceneManager:i(180),ScenePlugin:i(320),Settings:i(178),Systems:i(109)};r=s(!1,r,n),t.exports=r},,,,,,,,,,,,,,,,,,,,function(t,e,i){var n=i(7),s=i(46),r=function(t,e,i,n,r){var a=new s(t,e,n,r,i);return a.type="spritesheet",a};n.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s-1&&(s.splice(o,1),this.clear(a))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;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&&(t.input.dropZone=n),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);if(e){t.camera=e;for(var i=this.manager.hitTest(t.x,t.y,this._list,e),n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var h=[];for(i=0;i1&&(this.sortGameObjects(h),this.topOnly&&h.splice(1)),this._drag[t.id]=h,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&a(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},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;n-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._tempZones=[],this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&(r+=this.processUpEvents(n)),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off("transitionstart",this.transitionIn,this),e.off("transitionout",this.transitionOut,this),e.off("transitioncomplete",this.transitionComplete,this),e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.keyboard=null,this.mouse=null,this.gamepad=null},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",m,"input"),t.exports=m},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){t.exports={DUALSHOCK_4:i(358),SNES_USB:i(357),XBOX_360:i(356)}},function(t,e,i){t.exports={Axis:i(188),Button:i(187),Gamepad:i(189),GamepadManager:i(190),Configs:i(359)}},function(t,e,i){t.exports={CreateInteractiveObject:i(159),Gamepad:i(360),InputManager:i(191),InputPlugin:i(355),Keyboard:i(354),Mouse:i(349),Pointer:i(182),Touch:i(348)}},,,,,,,,,,,,,,,,,,,function(t,e,i){var n=i(21),s=i(13),r=i(8),a=i(102);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var o=new a(this.scene,0,0,e,i);return n(this.scene,o,t),o.autoRound=r(t,"autoRound",!0),o.resolution=r(t,"resolution",1),o})},function(t,e,i){var n=i(21),s=i(118),r=i(13),a=i(8),o=i(31);r.register("sprite",function(t){var e=a(t,"key",null),i=a(t,"frame",null),r=new o(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),a=i(66);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new a(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(8),s=i(13),r=i(107);s.register("graphics",function(t){var e=n(t,"add",!0),i=new r(this.scene,t);return e&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(102);i(11).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(11),s=i(31);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(66);i(11).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(107);i(11).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},,function(t,e,i){var n=i(22);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,a=2*r;r=r*t.baselineY|0,e.width=s,e.height=a,i.fillStyle="#f00",i.fillRect(0,0,s,a),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var o={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,a))return o.ascent=r,o.descent=r+6,o.fontSize=o.ascent+o.descent,n.remove(e),o;var h,u,l=i.getImageData(0,0,s,a).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||""===e.text)){var a=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,a.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,a.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;if(a.save(),void 0!==r){var h=r.matrix;a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY;t.config.roundPixels&&(u|=0,l|=0),a.translate(u,l),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),a.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(392),s=i(391),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,a=[],o=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:o,height:d,lines:h,lineWidths:a,lineSpacing:f,lineHeight:c}}},,,,function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?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(239),s=i(238),r=i(237),a=i(236),o=i(235),h=i(234),u=i(233),l=i(232),c=i(231),d=i(230),f=i(229),p=i(228);t.exports={Power0:u,Power1:l.Out,Power2:a.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:a.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:o.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":a.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":o.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":o.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":o.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},,,,,,function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(437),s=i(436),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(439),s=i(160),s=i(160),t.exports={renderWebGL:n,renderCanvas:s}},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(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(51);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(51);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},,,,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._list=[],this._pendingInsertion=[],this._pendingRemoval=[],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)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-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(70);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(26);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 a=i-e,o=t.splice(e,a);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(70);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var a=e.length-1;a>=0;){var o=e[a];-1!==(r=t.indexOf(o))?(n(t,r),i&&i.call(s,o)):e.pop(),a--}return e}},function(t,e,i){var n=i(247);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),a=0;a=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(26);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 a=s;a0){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,u),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;n>0&&o>a&&(e.splice(a),o=a);for(var h=o;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 a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;i>0&&a>r&&(e.splice(r),a=r);for(var o=0;o0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var o=r/this._target;this.callback(t,r,o),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=o},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 a=s.split("\n"),o=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;cx||o<-x)&&(o=0),o<0&&(o=x+o),-1!==h&&(x=o+(h+1));for(var _=u,M=u,C=0,k=e.sourceIndex,P=0;Pg||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),S>a&&(x=S-a),t.add(w,e,i+m,s+v,h-y,u-x),(m+=h+p)+h>r&&(m=f,v+=u+p)}return t}},function(t,e){t.exports=function(t,e){if(["layers","tilewidth","tileheight","tileswide","tileshigh"].forEach(function(t){e[t]}),1===e.layers.length){for(var i=new Phaser.FrameData,n=e.tileheight,s=e.tilewidth,r=e.layers[0].tiles,a=0;a0&&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){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t=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(53),s=i(74),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(53),browser:i(74),features:i(112),input:i(505),audio:i(504),video:i(503),fullscreen:i(502),canvasFeatures:i(193)}},function(t,e,i){var n=i(19);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,a=t.device.audio;if(s=!a.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!a.webAudio&&!a.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var o,h="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),o=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+o):(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\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\nuniform bool uInvertMaskAlpha;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = mainColor.a;\r\n\r\n if (!uInvertMaskAlpha)\r\n {\r\n alpha *= (maskColor.a);\r\n }\r\n else\r\n {\r\n alpha *= (1.0 - maskColor.a);\r\n }\r\n \r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n"},function(t,e,i){var n=i(266),s=i(22),r=i(19),a=i(112);t.exports=function(t){var e,o,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!a.webGL){if(!a.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.pixelArt&&s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.pixelArt&&n.setCrisp(t.canvas),1!==h.zoom&&(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),o=i(254),h.renderType===r.WEBGL?(t.renderer=new o(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(0),s=i(19),r=i(4),a=i(15),o=i(3),h=i(194),u=i(124),l=new n({initialize:function(t){void 0===t&&(t={});this.width=r(t,"width",1024),this.height=r(t,"height",768),this.zoom=r(t,"zoom",1),this.resolution=r(t,"resolution",1),this.renderType=r(t,"type",s.AUTO),this.parent=r(t,"parent",null),this.canvas=r(t,"canvas",null),this.canvasStyle=r(t,"canvasStyle",null),this.sceneConfig=r(t,"scene",null),this.seed=r(t,"seed",[(Date.now()*Math.random()).toString()]),a.RND.init(this.seed),this.gameTitle=r(t,"title",""),this.gameURL=r(t,"url","https://phaser.io"),this.gameVersion=r(t,"version",""),this.inputKeyboard=r(t,"input.keyboard",!0),this.inputKeyboardEventTarget=r(t,"input.keyboard.target",window),this.inputMouse=r(t,"input.mouse",!0),this.inputMouseEventTarget=r(t,"input.mouse.target",null),this.inputMouseCapture=r(t,"input.mouse.capture",!0),this.inputTouch=r(t,"input.touch",!0),this.inputTouchEventTarget=r(t,"input.touch.target",null),this.inputTouchCapture=r(t,"input.touch.capture",!0),this.inputGamepad=r(t,"input.gamepad",!1),this.disableContextMenu=r(t,"disableContextMenu",!1),this.audio=r(t,"audio"),this.hideBanner=!1===r(t,"banner",null),this.hidePhaser=r(t,"banner.hidePhaser",!1),this.bannerTextColor=r(t,"banner.text","#ffffff"),this.bannerBackgroundColor=r(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(t,"fps",null);var e=r(t,"render",t);this.antialias=r(e,"antialias",!0),this.pixelArt=r(e,"pixelArt",!1),this.autoResize=r(e,"autoResize",!1),this.roundPixels=r(e,"roundPixels",!1),this.transparent=r(e,"transparent",!1),this.clearBeforeRender=r(e,"clearBeforeRender",!0),this.premultipliedAlpha=r(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=r(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=r(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(e,"powerPreference","default");var i=r(t,"backgroundColor",0);this.backgroundColor=u(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=r(t,"callbacks.preBoot",o),this.postBoot=r(t,"callbacks.postBoot",o),this.physics=r(t,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(t,"loader.baseURL",""),this.loaderPath=r(t,"loader.path",""),this.loaderEnableParallel=r(t,"loader.enableParallel",!0),this.loaderMaxParallelDownloads=r(t,"loader.maxParallelDownloads",4),this.loaderCrossOrigin=r(t,"loader.crossOrigin",void 0),this.loaderResponseType=r(t,"loader.responseType",""),this.loaderAsync=r(t,"loader.async",!0),this.loaderUser=r(t,"loader.user",""),this.loaderPassword=r(t,"loader.password",""),this.loaderTimeout=r(t,"loader.timeout",0),this.defaultPlugins=r(t,"plugins",h.DefaultScene);var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(t,"images.default",n+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(t,"images.missing",n+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=l},function(t,e,i){var n=i(122),s=i(198),r=i(196),a=i(22),o=i(0),h=i(516),u=i(515),l=i(76),c=i(507),d=i(506),f=i(263),p=i(9),g=i(191),m=i(3),v=i(10),y=i(180),x=i(177),w=i(170),T=i(483),S=i(482),A=new o({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new w(this),this.cache=new r(this),this.registry=new l(this),this.input=new g(this,this.config),this.scene=new y(this,this.config.sceneConfig),this.device=d,this.sound=x.create(this),this.loop=new T(this,this.config.fps),this.plugins=new v(this,this.config),this.onStepCallback=m,this.pendingDestroy=!1,this.removeCanvas=!1,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),u(this),c(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("ready",this.start,this)},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)),S(this.events),this.events.on("hidden",this.onHidden,this),this.events.on("visible",this.onVisible,this),this.events.on("blur",this.onBlur,this),this.events.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e);var i=this.renderer;i.preRender(),this.events.emit("prerender",i),this.scene.render(i),i.postRender(),this.events.emit("postrender",i)},headlessStep:function(t,e){this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e),this.events.emit("prerender"),this.events.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.loop.blur()},onFocus:function(){this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t){this.pendingDestroy=!0,this.removeCanvas=t},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.onStepCallback=null,this.removeCanvas&&this.canvas&&a.remove(this.canvas),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=A},function(t,e,i){var n=i(0),s=i(9),r=i(10),a=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",a,"events"),t.exports=a},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(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:a}catch(t){n=a}}();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=o(d);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c1)for(var i=1;i0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(539),s=i(538),t.exports={renderWebGL:n,renderCanvas:s}},,,,,,function(t,e,i){var n=i(113),s=i(0),r=i(2),a=i(10),o=i(28),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.currentCameraId=1,this.cameras=[],this.cameraPool=[],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(){this.main||this.boot();var t=this.systems.events;t.on("update",this.update,this),t.once("shutdown",this.shutdown,this)},add:function(t,e,i,s,r,a){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===a&&(a="");var o=null;return this.cameraPool.length>0?(o=this.cameraPool.pop()).setViewport(t,e,i,s):o=new n(t,e,i,s),o.setName(a),o.setScene(this.scene),this.cameras.push(o),r&&(this.main=o),o._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,o},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&o(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,a=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),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},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){var i={texture:null,frame:null,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(55),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){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var a=this.currentMatrix,o=a[0],h=a[1],u=a[2],l=a[3],c=a[4],d=a[5];return a[0]=o*t+u*e,a[1]=h*t+l*e,a[2]=o*i+u*n,a[3]=h*i+l*n,a[4]=o*s+u*r+c,a[5]=h*s+l*r+d,this},setTransform:function(t,e,i,n,s,r){var a=this.currentMatrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=s,a[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],a=i[3],o=i[4],h=i[5];return i[4]=n*t+r*e+o,i[5]=s*t+a*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],a=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=a*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],a=Math.sin(t),o=Math.cos(t);return e[0]=i*o+s*a,e[1]=n*o+r*a,e[2]=i*-a+s*o,e[3]=n*-a+r*o,this}};t.exports=i},function(t,e,i){var n=i(12),s=i(284),r=i(6),a={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,a,o,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),a=t.x,o=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),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,s,a,h),t.y=Math.min(i,r,o,u),t.width=Math.max(e,s,a,h)-t.x,t.height=Math.max(i,r,o,u)-t.y,t}};t.exports=a},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){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(48),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(23),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){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&&(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){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,i){var n=i(15),s=i(4);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){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function a(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new function(t,e,i){this.fn=t,this.context=e,this.once=i||!1}(i,n||t,r),o=s?s+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],a]:t._events[o].push(a):(t._events[o]=a,t._eventsCount++),t}function o(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,a=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(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(574),Animation:i(295),BlendMode:i(573),ComputedSize:i(572),Depth:i(571),Flip:i(570),GetBounds:i(569),MatrixStack:i(568),Origin:i(567),Pipeline:i(283),ScaleMode:i(566),ScrollFactor:i(565),Size:i(564),Texture:i(563),Tint:i(562),ToJSON:i(561),Transform:i(560),TransformMatrix:i(60),Visible:i(559)}},function(t,e,i){var n=i(289),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(292),s=function(){var t,e,i,r,a,o,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>>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;ns||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(144),r=i(278),a=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 a(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=a},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,i){var n=i(0),s=i(14),r=i(1),a=i(540),o=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,n,a){r.call(this,t,"Sprite"),this.anims=new s.Animation(this),this.setTexture(n,a),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=o},,function(t,e,i){var n=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},,function(t,e,i){var n=i(0),s=i(17),r=i(18),a=i(7),o=i(2),h=new n({Extends:r,initialize:function(t,e,i,n){var a="string"==typeof t?t:o(t,"key",""),h={type:"json",extension:o(t,"extension","json"),responseType:"text",key:a,url:o(t,"file",e),path:i,xhrSettings:o(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});a.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;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 n=i(430);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=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}},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],a=n[2],o=n[3];return n[0]=s*i+a*e,n[1]=r*i+o*e,n[2]=s*-e+a*i,n[3]=r*-e+o*i,this},multiply:function(t){var e=this.matrix,i=t.matrix,n=e[0],s=e[1],r=e[2],a=e[3],o=e[4],h=e[5],u=i[0],l=i[1],c=i[2],d=i[3],f=i[4],p=i[5];return e[0]=u*n+l*r,e[1]=u*s+l*a,e[2]=c*n+d*r,e[3]=c*s+d*a,e[4]=f*n+p*r+o,e[5]=f*s+p*a+h,this},transform:function(t,e,i,n,s,r){var a=this.matrix,o=a[0],h=a[1],u=a[2],l=a[3],c=a[4],d=a[5];return a[0]=t*o+e*u,a[1]=t*h+e*l,a[2]=i*o+n*u,a[3]=i*h+n*l,a[4]=s*o+r*u+c,a[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],a=n[2],o=n[3],h=n[4],u=n[5];return i.x=t*s+e*a+h,i.y=t*r+e*o+u,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=e*s-i*n;return t[0]=s/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-s*r)/o,t[5]=-(e*a-i*r)/o,this},setTransform:function(t,e,i,n,s,r){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=s,a[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],a=i*i,o=n*n,h=s*s,u=r*r,l=Math.sqrt(a+h),c=Math.sqrt(o+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,a=Math.sin(i),o=Math.cos(i);return r[4]=t,r[5]=e,r[0]=o*n,r[1]=a*n,r[2]=-a*s,r[3]=o*s,this},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=n},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},,,,function(t,e,i){var n=i(0),s=i(56),r=i(219),a=i(218),o=i(92),h=i(145),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 a(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 o),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new o),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new o),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(1),a=i(438),o=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=o},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(96),s=i(8),r=i(58),a=i(59),o=i(69),h=i(155),u=i(98),l=i(4),c=i(97),d=i(95),f=i(94);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:u(e),g=h(e),m=o(e,"delay",i.delay),v=o(e,"duration",i.duration),y=l(e,"easeParams",i.easeParams),x=a(l(e,"ease",i.ease),y),w=o(e,"hold",i.hold),T=o(e,"repeat",i.repeat),S=o(e,"repeatDelay",i.repeatDelay),A=r(e,"yoyo",i.yoyo),b=r(e,"flipX",i.flipX),E=r(e,"flipY",i.flipY),_=[],C=0;C=t.length)){for(var i=t.length-1,n=t[e],s=e;s=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:r,onBlur:r,onFocus:r,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,i){var n,s=i(53),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,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,i){var n=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.blockSet=!1,this._frozen=!1,this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){return this.list[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if(this.events.listenerCount("changedata")>0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;nu&&(r=u),a>u&&(a=u),o=s,h=r;;)if(o=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 a=0;a=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,o.size,o.type,o.normalized,r,o.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,i){var n=i(0),s=i(30),r=i(290),a=i(288),o=i(149),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 a(this,t,e,i)},getRandomPoint:function(t){return o(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,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(140),s=i(0),r=i(3),a=i(79),o=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,a.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=o},function(t,e,i){var n=i(47);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(285),r=i(148),a=i(147),o=i(6),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 a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new o),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new o),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,a,o,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:o,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:a,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(0),s=i(13),r=i(11),a=i(57),o=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=a.PENDING_ADD,this._pausedState=a.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===a.ACTIVE},isPaused:function(){return this.state===a.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=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=a.PENDING_REMOVE}},pause:function(){if(this.state!==a.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this},play:function(t){if(this.state!==a.ACTIVE){this.state!==a.PENDING_REMOVE&&this.state!==a.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=a.ACTIVE):(this.countdown=this.calculatedOffset,this.state=a.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=a.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=a.DELAY):n.state=a.PENDING_RENDER}},resume:function(){return this.state===a.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,a=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,a=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,a=s.duration*r)),s.progress=r,s.elapsed=a;var o=s.ease(s.progress);s.current=s.start+(s.end-s.start)*o,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=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=a.PENDING_REMOVE}},stop:function(t){this.state===a.ACTIVE&&void 0!==t&&this.seek(t),this.state!==a.REMOVED&&(this.state=a.PENDING_REMOVE)},update:function(t,e){if(this.state===a.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 a.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,a.REPEAT_DELAY):a.PLAYING_FORWARD}return a.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,a.REPEAT_DELAY):a.PLAYING_FORWARD}return a.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case a.PLAYING_FORWARD:case a.PLAYING_BACKWARD:if(!e.target){e.state=a.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var o,h=e.state===a.PLAYING_FORWARD,u=n/s;o=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*o,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=a.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case a.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=a.PENDING_RENDER);break;case a.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=a.PLAYING_FORWARD);break;case a.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case a.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=a.PLAYING_FORWARD):e.state=a.COMPLETE}return e.state!==a.COMPLETE}});o.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=o},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,a,o=function(t,e,i){return i},h=function(t,e,i){return i},u=typeof e;if("number"===u)o=function(){return e};else if("string"===u){var l=e[0],c=parseFloat(e.substr(2));switch(l){case"+":o=function(t,e,i){return i+c};break;case"-":o=function(t,e,i){return i-c};break;case"*":o=function(t,e,i){return i*c};break;case"/":o=function(t,e,i){return i/c};break;default:o=function(){return parseFloat(e)}}}else"function"===u?o=e:"object"===u&&(i(a=e)||n(a))?(n(e)&&(o=e.getEnd),i(e)&&(h=e.getStart)):e.hasOwnProperty("value")&&(r=s(t,e.value));return r||(r={getEnd:o,getStart:h}),r};t.exports=s},function(t,e,i){var n=i(4);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(122),s=i(22),r=i(0),a=i(14),o=i(19),h=i(1),u=i(394),l=i(4),c=i(261),d=i(393),f=i(390),p=new r({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Depth,a.Flip,a.GetBounds,a.Origin,a.Pipeline,a.ScaleMode,a.ScrollFactor,a.Tint,a.Transform,a.Visible,d],initialize:function(t,e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Text"),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this.canvas=s.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.resolution=1,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.canvasTexture=null,this.dirty=!1,this.initRTL(),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&(this._lineSpacing=r.lineSpacing),this.setText(n),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(){this.canvasTexture=null,this.dirty=!0},this)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(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 n="",s=t.replace(/ +/gi," ").split(this.splitRegExp),r=s.length,a=0;au){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,"");s[a+1]=y+" "+(s[a+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;ra?(h>0&&(n+="\n"),n+=o[h]+" ",a=i-u):(a-=l,n+=o[h]+" ")}r0&&(o+=l.lineSpacing*p),i.rtl?a=d-a:"right"===i.align?a+=l.width-l.lineWidths[p]:"center"===i.align&&(a+=(l.width-l.lineWidths[p])/2),this.autoRound&&(a=Math.round(a),o=Math.round(o)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(h[p],a,o)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(h[p],a,o));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=a.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,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)}});t.exports=p},,,function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(51),r=i(163),a=i(162),o=i(126),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.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(113),s=i(0),r=i(111),a=i(14),o=i(241),h=i(1),u=i(4),l=i(15),c=i(440),d=new s({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Pipeline,a.Transform,a.Visible,a.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),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 u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(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},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,l.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,a=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(a+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(a+i,e+n),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,a){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,a),this},strokeTriangle:function(t,e,i,n,s,a){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,a),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,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 n=1;n-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),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.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(r.game.renderer,this,0,d.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},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){return t?this.resume():this.pause()},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)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(){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)},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;e-v||S>-y||T-v||b>-y||Al&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+a,this.y+o),r.rotate(this.rotation),r.scale(s,s),r.translate(-a,-o),this.shakeEffect.preRender()},removeBounds:function(){return this.useBounds=!1,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=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,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){return this.scene=t,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),this.zoom=t,this},startFollow:function(t,e){return void 0===e&&(e=!1),this._follow=t,this.roundPixels=e,this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e)},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.resetFX(),this.matrix.destroy(),this.culledObjects=[],this.target=void 0,this._bounds=void 0,this.scene=void 0}});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,a):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(16),r=new n({initialize:function(t,e,i,n,s,r,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=a,this.x=0,this.y=0,this.width=r,this.height=a,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*a),this.centerX=Math.floor(r/2),this.centerY=Math.floor(a/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:a,r:n+r,b:s+a},trim:!1,sourceSize:{w:r,h:a},spriteSourceSize:{x:0,y:0,w:r,h:a},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+a*a),drawImage:{sx:n,sy:s,sWidth:r,sHeight:a,dWidth:r,dHeight:a}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=n,o.w=s,o.h=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()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,a=this.source.height,o=this.data.uvs;return o.x0=t/r,o.y0=e/a,o.x1=t/r,o.y1=(e+n)/a,o.x2=(t+i)/r,o.y2=(e+n)/a,o.x3=(t+i)/r,o.y3=e/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(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=s(!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}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(192),r=i(509),a=i(508),o=i(25),h=i(80),u=new n({Extends:h,Mixins:[s],initialize:function(t){h.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:a,fragShader:t.fragShader?t.fragShader:r,vertexCapacity:t.vertexCapacity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+2*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:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:4*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=2e3,this.batches=[],this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var n=i[i.length-1];return e>0?(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},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,a=this.topology,o=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*o));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(l.texture,0),n.drawArrays(a,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s,r,a,o,h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=t.emitters.list,m=g.length,v=this.vertexViewF32,y=this.vertexViewU32,x=this.renderer,w=this.maxQuads,T=e.scrollX,S=e.scrollY,A=e.matrix.matrix,b=A[0],E=A[1],_=A[2],C=A[3],M=A[4],k=A[5],P=Math.sin,L=Math.cos,F=this.vertexComponentCount,R=this.vertexCapacity,O=t.defaultFrame.source.glTexture;n&&(h=n[0],u=n[1],l=n[2],c=n[3],d=n[4],f=n[5]),this.setTexture2D(O,0);for(var D=0;D=R&&(this.flush(),this.setTexture2D(O,0));for(var V=0;V=R&&(this.flush(),this.setTexture2D(O,0))}}Y+=H,N-=H,this.vertexCount>=R&&(this.flush(),this.setTexture2D(O,0))}}}this.setTexture2D(O,0)},drawBlitter:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s=this.renderer.config.roundPixels,r=o.getTintAppendFloatAlpha,a=this.vertexViewF32,h=this.vertexViewU32,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],m=c[4],v=c[5],y=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),T=0;if(n){var S=n[0],A=n[1],b=n[2],E=n[3],_=n[4],C=n[5],M=-y,k=-x,P=b*d+E*p,L=b*f+E*g,F=_*d+C*p+(M*d+k*p+m),R=_*f+C*g+(M*f+k*g+v);d=S*d+A*p,f=S*f+A*g,p=P,g=L,m=F,v=R,y=0,x=0}for(var O=t.x-y,D=t.y-x,I=0;I=this.vertexCapacity&&this.flush()}T+=B,l-=B,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,a,h,u,l,c=this.renderer.config.roundPixels,d=o.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=e.matrix.matrix,m=t.frame,v=m.texture.source[m.sourceIndex].glTexture,y=!!v.isRenderTexture,x=t.flipX,w=t.flipY^y,T=m.uvs,S=m.width*(x?-1:1),A=m.height*(w?-1:1),b=-t.displayOriginX+m.x+m.width*(x?1:0),E=-t.displayOriginY+m.y+m.height*(w?1:0),_=(c?0|b:b)+S,C=(c?0|E:E)+A,M=t.scaleX,k=t.scaleY,P=t.rotation,L=t._alphaTL,F=t._alphaTR,R=t._alphaBL,O=t._alphaBR,D=t._tintTL,I=t._tintTR,B=t._tintBL,N=t._tintBR,U=Math.sin(P),Y=Math.cos(P),X=Y*M,G=U*M,z=-U*k,W=Y*k,V=t.x,H=t.y,j=g[0],K=g[1],q=g[2],J=g[3],Z=g[4],Q=g[5];if(n){var $=n[0],tt=n[1],et=n[2],it=n[3],nt=n[4],st=n[5],rt=-e.scrollX*t.scrollFactorX,at=-e.scrollY*t.scrollFactorY,ot=$*j+tt*q,ht=$*K+tt*J,ut=et*j+it*q,lt=et*K+it*J;s=X*ot+G*ut,r=X*ht+G*lt,a=z*ot+W*ut,h=z*ht+W*lt,u=V*ot+H*ut+(nt*j+st*q+(rt*j+at*q+Z)),l=V*ht+H*lt+(nt*K+st*J+(rt*K+at*J+Q))}else s=X*j+G*q,r=X*K+G*J,a=z*j+W*q,h=z*K+W*J,u=(V-=e.scrollX*t.scrollFactorX)*j+(H-=e.scrollY*t.scrollFactorY)*q+Z,l=V*K+H*J+Q;var ct,dt=b*s+E*a+u,ft=b*r+E*h+l,pt=b*s+C*a+u,gt=b*r+C*h+l,mt=_*s+C*a+u,vt=_*r+C*h+l,yt=_*s+E*a+u,xt=_*r+E*h+l,wt=d(D,L),Tt=d(I,F),St=d(B,R),At=d(N,O);c&&(dt|=0,ft|=0,pt|=0,gt|=0,mt|=0,vt|=0,yt|=0,xt|=0),this.setTexture2D(v,0),f[(ct=this.vertexCount*this.vertexComponentCount)+0]=dt,f[ct+1]=ft,f[ct+2]=T.x0,f[ct+3]=T.y0,p[ct+4]=wt,f[ct+5]=pt,f[ct+6]=gt,f[ct+7]=T.x1,f[ct+8]=T.y1,p[ct+9]=St,f[ct+10]=mt,f[ct+11]=vt,f[ct+12]=T.x2,f[ct+13]=T.y2,p[ct+14]=At,f[ct+15]=dt,f[ct+16]=ft,f[ct+17]=T.x0,f[ct+18]=T.y0,p[ct+19]=wt,f[ct+20]=mt,f[ct+21]=vt,f[ct+22]=T.x2,f[ct+23]=T.y2,p[ct+24]=At,f[ct+25]=yt,f[ct+26]=xt,f[ct+27]=T.x3,f[ct+28]=T.y3,p[ct+29]=Tt,this.vertexCount+=6},batchMesh:function(t,e,i){var n=null;i&&(n=i.matrix);var s=t.vertices,r=s.length,a=r/2|0;this.renderer.setPipeline(this),this.vertexCount+a>this.vertexCapacity&&this.flush();var h,u,l,c,d,f,p=this.renderer.config.roundPixels,g=o.getTintAppendFloatAlpha,m=t.uv,v=t.colors,y=t.alphas,x=this.vertexViewF32,w=this.vertexViewU32,T=e.matrix.matrix,S=t.frame,A=t.texture.source[S.sourceIndex].glTexture,b=t.x,E=t.y,_=t.scaleX,C=t.scaleY,M=t.rotation,k=Math.sin(M),P=Math.cos(M),L=P*_,F=k*_,R=-k*C,O=P*C,D=b,I=E,B=T[0],N=T[1],U=T[2],Y=T[3],X=T[4],G=T[5],z=0;if(n){var W=n[0],V=n[1],H=n[2],j=n[3],K=n[4],q=n[5],J=-e.scrollX*t.scrollFactorX,Z=-e.scrollY*t.scrollFactorY,Q=W*B+V*U,$=W*N+V*Y,tt=H*B+j*U,et=H*N+j*Y;h=L*Q+F*tt,u=L*$+F*et,l=R*Q+O*tt,c=R*$+O*et,d=D*Q+I*tt+(K*B+q*U+(J*B+Z*U+X)),f=D*$+I*et+(K*N+q*Y+(J*N+Z*Y+G))}else h=L*B+F*U,u=L*N+F*Y,l=R*B+O*U,c=R*N+O*Y,d=(D-=e.scrollX*t.scrollFactorX)*B+(I-=e.scrollY*t.scrollFactorY)*U+X,f=D*N+I*Y+G;this.setTexture2D(A,0),z=this.vertexCount*this.vertexComponentCount;for(var it=0,nt=0;itthis.vertexCapacity&&this.flush();var s,r,a,h,u,l,c,d,f,p,g,m,v,y,x=this.renderer.config.roundPixels,w=t.text,T=w.length,S=o.getTintAppendFloatAlpha,A=this.vertexViewF32,b=this.vertexViewU32,E=e.matrix.matrix,_=e.width+50,C=e.height+50,M=t.frame,k=t.texture.source[M.sourceIndex],P=e.scrollX*t.scrollFactorX,L=e.scrollY*t.scrollFactorY,F=t.fontData,R=F.lineHeight,O=t.fontSize/F.size,D=F.chars,I=t.alpha,B=S(t._tintTL,I),N=S(t._tintTR,I),U=S(t._tintBL,I),Y=S(t._tintBR,I),X=t.x,G=t.y,z=M.cutX,W=M.cutY,V=k.width,H=k.height,j=k.glTexture,K=0,q=0,J=0,Z=0,Q=null,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,at=0,ot=0,ht=0,ut=0,lt=0,ct=null,dt=0,ft=X+M.x,pt=G+M.y,gt=t.rotation,mt=t.scaleX,vt=t.scaleY,yt=t.letterSpacing,xt=Math.sin(gt),wt=Math.cos(gt),Tt=wt*mt,St=xt*mt,At=-xt*vt,bt=wt*vt,Et=ft,_t=pt,Ct=E[0],Mt=E[1],kt=E[2],Pt=E[3],Lt=E[4],Ft=E[5],Rt=0;if(n){var Ot=n[0],Dt=n[1],It=n[2],Bt=n[3],Nt=n[4],Ut=n[5],Yt=-P,Xt=-L,Gt=Ot*Ct+Dt*kt,zt=Ot*Mt+Dt*Pt,Wt=It*Ct+Bt*kt,Vt=It*Mt+Bt*Pt;f=Tt*Gt+St*Wt,p=Tt*zt+St*Vt,g=At*Gt+bt*Wt,m=At*zt+bt*Vt,v=Et*Gt+_t*Wt+(Nt*Ct+Ut*kt+(Yt*Ct+Xt*kt+Lt)),y=Et*zt+_t*Vt+(Nt*Mt+Ut*Pt+(Yt*Mt+Xt*Pt+Ft))}else f=Tt*Ct+St*kt,p=Tt*Mt+St*Pt,g=At*Ct+bt*kt,m=At*Mt+bt*Pt,v=(Et-=P)*Ct+(_t-=L)*kt+Lt,y=Et*Mt+_t*Pt+Ft;this.setTexture2D(j,0);for(var Ht=0;Ht_||r<-50||r>C)&&(a<-50||a>_||h<-50||h>C)&&(u<-50||u>_||l<-50||l>C)&&(c<-50||c>_||d<-50||d>C)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Rt=this.vertexCount*this.vertexComponentCount,x&&(s|=0,r|=0,a|=0,h|=0,u|=0,l|=0,c|=0,d|=0),A[Rt+0]=s,A[Rt+1]=r,A[Rt+2]=ot,A[Rt+3]=ut,b[Rt+4]=B,A[Rt+5]=a,A[Rt+6]=h,A[Rt+7]=ot,A[Rt+8]=lt,b[Rt+9]=U,A[Rt+10]=u,A[Rt+11]=l,A[Rt+12]=ht,A[Rt+13]=lt,b[Rt+14]=Y,A[Rt+15]=s,A[Rt+16]=r,A[Rt+17]=ot,A[Rt+18]=ut,b[Rt+19]=B,A[Rt+20]=u,A[Rt+21]=l,A[Rt+22]=ht,A[Rt+23]=lt,b[Rt+24]=Y,A[Rt+25]=c,A[Rt+26]=d,A[Rt+27]=ht,A[Rt+28]=ut,b[Rt+29]=N,this.vertexCount+=6))}}else K=0,J=0,q+=R,ct=null},batchDynamicBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,a,h,u,l,c,d,f,p,g,m,v,y,x,w,T,S,A,b,E=this.renderer.config.roundPixels,_=t.displayCallback,C=t.text,M=C.length,k=o.getTintAppendFloatAlpha,P=this.vertexViewF32,L=this.vertexViewU32,F=this.renderer,R=e.matrix.matrix,O=t.frame,D=t.texture.source[O.sourceIndex],I=e.scrollX*t.scrollFactorX,B=e.scrollY*t.scrollFactorY,N=t.scrollX,U=t.scrollY,Y=t.fontData,X=Y.lineHeight,G=t.fontSize/Y.size,z=Y.chars,W=t.alpha,V=k(t._tintTL,W),H=k(t._tintTR,W),j=k(t._tintBL,W),K=k(t._tintBR,W),q=t.x,J=t.y,Z=O.cutX,Q=O.cutY,$=D.width,tt=D.height,et=D.glTexture,it=0,nt=0,st=0,rt=0,at=null,ot=0,ht=0,ut=0,lt=0,ct=0,dt=0,ft=0,pt=0,gt=0,mt=0,vt=0,yt=0,xt=null,wt=0,Tt=q+O.x,St=J+O.y,At=t.rotation,bt=t.scaleX,Et=t.scaleY,_t=t.letterSpacing,Ct=Math.sin(At),Mt=Math.cos(At),kt=Mt*bt,Pt=Ct*bt,Lt=-Ct*Et,Ft=Mt*Et,Rt=Tt,Ot=St,Dt=R[0],It=R[1],Bt=R[2],Nt=R[3],Ut=R[4],Yt=R[5],Xt=t.cropWidth>0||t.cropHeight>0,Gt=0;if(n){var zt=n[0],Wt=n[1],Vt=n[2],Ht=n[3],jt=n[4],Kt=n[5],qt=-I,Jt=-B,Zt=zt*Dt+Wt*Bt,Qt=zt*It+Wt*Nt,$t=Vt*Dt+Ht*Bt,te=Vt*It+Ht*Nt;x=kt*Zt+Pt*$t,w=kt*Qt+Pt*te,T=Lt*Zt+Ft*$t,S=Lt*Qt+Ft*te,A=Rt*Zt+Ot*$t+(jt*Dt+Kt*Bt+(qt*Dt+Jt*Bt+Ut)),b=Rt*Qt+Ot*te+(jt*It+Kt*Nt+(qt*It+Jt*Nt+Yt))}else x=kt*Dt+Pt*Bt,w=kt*It+Pt*Nt,T=Lt*Dt+Ft*Bt,S=Lt*It+Ft*Nt,A=(Rt-=I)*Dt+(Ot-=B)*Bt+Ut,b=Rt*It+Ot*Nt+Yt;this.setTexture2D(et,0),Xt&&F.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var ee=0;eethis.vertexCapacity&&this.flush(),Gt=this.vertexCount*this.vertexComponentCount,E&&(s|=0,r|=0,a|=0,h|=0,u|=0,l|=0,c|=0,d|=0),P[Gt+0]=s,P[Gt+1]=r,P[Gt+2]=gt,P[Gt+3]=vt,L[Gt+4]=V,P[Gt+5]=a,P[Gt+6]=h,P[Gt+7]=gt,P[Gt+8]=yt,L[Gt+9]=j,P[Gt+10]=u,P[Gt+11]=l,P[Gt+12]=mt,P[Gt+13]=yt,L[Gt+14]=K,P[Gt+15]=s,P[Gt+16]=r,P[Gt+17]=gt,P[Gt+18]=vt,L[Gt+19]=V,P[Gt+20]=u,P[Gt+21]=l,P[Gt+22]=mt,P[Gt+23]=yt,L[Gt+24]=K,P[Gt+25]=c,P[Gt+26]=d,P[Gt+27]=mt,P[Gt+28]=vt,L[Gt+29]=H,this.vertexCount+=6}}}else it=0,st=0,nt+=X,xt=null;Xt&&F.popScissor()},batchText:function(t,e,i){var n=o.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),0,0,e,i)},batchDynamicTilemapLayer:function(t,e,i){for(var n=t.culledTiles,s=n.length,r=t.tileset.image.get().source.glTexture,a=t.tileset,h=t.scrollFactorX,u=t.scrollFactorY,l=t.alpha,c=t.x,d=t.y,f=t.scaleX,p=t.scaleY,g=o.getTintAppendFloatAlpha,m=0;mthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0;var P,L,F,R,O,D,I=this.renderer.config.roundPixels,B=this.vertexViewF32,N=this.vertexViewU32,U=C.matrix.matrix,Y=a*(c?1:0)-g,X=o*(d?1:0)-m,G=Y+a*(c?-1:1),z=X+o*(d?-1:1),W=s,V=r,H=Math.sin(l),j=Math.cos(l),K=j*h,q=H*h,J=-H*u,Z=j*u,Q=W,$=V,tt=U[0],et=U[1],it=U[2],nt=U[3],st=U[4],rt=U[5];if(k){var at=k[0],ot=k[1],ht=k[2],ut=k[3],lt=k[4],ct=k[5],dt=-C.scrollX*f,ft=-C.scrollY*p,pt=at*tt+ot*it,gt=at*et+ot*nt,mt=ht*tt+ut*it,vt=ht*et+ut*nt;P=K*pt+q*mt,L=K*gt+q*vt,F=J*pt+Z*mt,R=J*gt+Z*vt,O=Q*pt+$*mt+(lt*tt+ct*it+(dt*tt+ft*it+st)),D=Q*gt+$*vt+(lt*et+ct*nt+(dt*et+ft*nt+rt))}else P=K*tt+q*it,L=K*et+q*nt,F=J*tt+Z*it,R=J*et+Z*nt,O=(Q-=C.scrollX*f)*tt+($-=C.scrollY*p)*it+st,D=Q*et+$*nt+rt;var yt,xt=Y*P+X*F+O,wt=Y*L+X*R+D,Tt=Y*P+z*F+O,St=Y*L+z*R+D,At=G*P+z*F+O,bt=G*L+z*R+D,Et=G*P+X*F+O,_t=G*L+X*R+D,Ct=v/i+E,Mt=y/n+_,kt=(v+x)/i+E,Pt=(y+w)/n+_;this.setTexture2D(e,0),yt=this.vertexCount*this.vertexComponentCount,I&&(xt|=0,wt|=0,Tt|=0,St|=0,At|=0,bt|=0,Et|=0,_t|=0),B[yt+0]=xt,B[yt+1]=wt,B[yt+2]=Ct,B[yt+3]=Mt,N[yt+4]=T,B[yt+5]=Tt,B[yt+6]=St,B[yt+7]=Ct,B[yt+8]=Pt,N[yt+9]=S,B[yt+10]=At,B[yt+11]=bt,B[yt+12]=kt,B[yt+13]=Pt,N[yt+14]=A,B[yt+15]=xt,B[yt+16]=wt,B[yt+17]=Ct,B[yt+18]=Mt,N[yt+19]=T,B[yt+20]=At,B[yt+21]=bt,B[yt+22]=kt,B[yt+23]=Pt,N[yt+24]=A,B[yt+25]=Et,B[yt+26]=_t,B[yt+27]=kt,B[yt+28]=Mt,N[yt+29]=b,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,a,h,u,l,c){var d=null;c&&(d=c.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var f=this.renderer.config.roundPixels,p=this.vertexViewF32,g=this.vertexViewU32,m=e,v=i,y=m+h,x=v+u,w=l[0],T=l[1],S=l[2],A=l[3],b=l[4],E=l[5];if(d){var _=d[0],C=d[1],M=d[2],k=d[3],P=d[4],L=w*C+T*k,F=S*C+A*k,R=b*C+E*k+d[5];w=w*_+T*M,T=L,S=S*_+A*M,A=F,b=b*_+E*M+P,E=R}var O,D=m*w+v*S+b,I=m*T+v*A+E,B=m*w+x*S+b,N=m*T+x*A+E,U=y*w+x*S+b,Y=y*T+x*A+E,X=y*w+v*S+b,G=y*T+v*A+E,z=t.width,W=t.height,V=r/z,H=a/W,j=(r+h)/z,K=(a+u)/W;n=o.getTintAppendFloatAlpha(n,s),this.setTexture2D(t,0),O=this.vertexCount*this.vertexComponentCount,f&&(D|=0,I|=0,B|=0,N|=0,U|=0,Y|=0,X|=0,G|=0),p[O+0]=D,p[O+1]=I,p[O+2]=V,p[O+3]=H,g[O+4]=n,p[O+5]=B,p[O+6]=N,p[O+7]=V,p[O+8]=K,g[O+9]=n,p[O+10]=U,p[O+11]=Y,p[O+12]=j,p[O+13]=K,g[O+14]=n,p[O+15]=D,p[O+16]=I,p[O+17]=V,p[O+18]=H,g[O+19]=n,p[O+20]=U,p[O+21]=Y,p[O+22]=j,p[O+23]=K,g[O+24]=n,p[O+25]=X,p[O+26]=G,p[O+27]=j,p[O+28]=H,g[O+29]=n,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=u},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===i&&(i=!0),e&&("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e)),n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},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(93),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){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 void 0===t[n]?null:t[n]}},function(t,e,i){t.exports={Matrix:i(480),Add:i(473),AddAt:i(472),BringToTop:i(471),CountAllMatching:i(470),Each:i(469),EachInRange:i(468),FindClosestInSorted:i(200),GetAll:i(467),GetFirst:i(466),GetRandom:i(139),MoveDown:i(465),MoveTo:i(464),MoveUp:i(463),NumberArray:i(165),NumberArrayStep:i(462),QuickSelect:i(164),Range:i(246),Remove:i(461),RemoveAt:i(460),RemoveBetween:i(459),RemoveRandomElement:i(458),Replace:i(457),RotateLeft:i(282),RotateRight:i(281),SafeRange:i(26),SendToBack:i(456),SetAll:i(455),Shuffle:i(91),SpliceOne:i(70),StableSort:i(79),Swap:i(454)}},function(t,e,i){var n=i(0),s=i(510),r=i(120),a=new n({Extends:r,initialize:function(t){t.fragShader=s.replace("%LIGHT_COUNT%",10..toString()),r.call(this,t)},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.sys.lights;if(!i)return this;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,a=i.cull(e),o=Math.min(a.length,10),h=e.matrix,u={x:0,y:0},l=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(o<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n=1&&(o=1-o,h=1-h),e.x=t.x1+(i*o+r*h),e.y=t.y1+(s*o+a*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(67),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,u=t.y2,l=0;l1?2-s:s,a=r*Math.cos(i),o=r*Math.sin(i);return e.x=t.x+a*t.radius,e.y=t.y+o*t.radius,e}},,function(t,e,i){var n=i(0),s=i(9),r=i(68),a=i(57),o=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=a.PENDING_ADD,this._pausedState=a.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===a.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=a.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=a.LOOP_DELAY):this.state=a.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=a.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=a.PENDING_REMOVE}},update:function(t,e){if(this.state!==a.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 a.ACTIVE:for(var n=this.totalData,s=0;s0?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=o(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=a(e,"yoyo",g.yoyo),g.flipX=a(e,"flipX",g.flipX),g.flipY=a(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 n=i(0),s=i(18),r=i(2),a=i(117),o=new n({Extends:s,initialize:function(t,e,i,n){this.locked="ontouchstart"in window,this.loaded=!1;var a={type:"audio",extension:r(e,"type",""),key:t,url:r(e,"uri",e),path:i,config:n};s.call(this,a)},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t0&&e.cameraFilter&r._id)){var u=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,c=e.x,d=e.y,f=e.scaleX,p=e.scaleY,g=e.rotation,m=e.commandBuffer,v=o||t.currentContext,y=1,x=1,w=0,T=0,S=1,A=0,b=0,E=0;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),a){var _=a.matrix;v.transform(_[0],_[1],_[2],_[3],_[4],_[5])}v.translate(c-u,d-l),v.rotate(g),v.scale(f,p),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=m.length;C>>16,b=(65280&w)>>>8,E=255&w,v.strokeStyle="rgba("+A+","+b+","+E+","+y+")",v.lineWidth=S,C+=3;break;case n.FILL_STYLE:T=m[C+1],x=m[C+2],A=(16711680&T)>>>16,b=(65280&T)>>>8,E=255&T,v.fillStyle="rgba("+A+","+b+","+E+","+x+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:h||v.fill();break;case n.STROKE_PATH:h||v.stroke();break;case n.FILL_RECT:h?v.rect(m[C+1],m[C+2],m[C+3],m[C+4]):v.fillRect(m[C+1],m[C+2],m[C+3],m[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(m[C+1],m[C+2]),v.lineTo(m[C+3],m[C+4]),v.lineTo(m[C+5],m[C+6]),v.closePath(),h||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(m[C+1],m[C+2]),v.lineTo(m[C+3],m[C+4]),v.lineTo(m[C+5],m[C+6]),v.closePath(),h||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(m[C+1],m[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(m[C+1],m[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(m[C+1],m[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(m[C+1],m[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(m[C+1],m[C+2]),C+=2;break;case n.SCALE:v.scale(m[C+1],m[C+2]),C+=2;break;case n.ROTATE:v.rotate(m[C+1]),C+=1}v.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(161),s=i(105),r=i(61),a=i(15);t.exports=function(t,e,i,o){void 0===o&&(o=[]),e||(e=n(t)/i);for(var h=0;hr;){if(a-r>600){var h=a-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(a,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,o)}var g=t[e],m=r,v=a;for(n(t,r,e),o(t[a],g)>0&&n(t,r,a);m0;)v--}0===o(t[r],g)?n(t,r,v):n(t,++v,a),v<=e&&(r=v+1),e<=v&&(a=v-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,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var a=i?i+r.toString():r.toString();n&&(a=a.concat(n)),s.push(a)}else s.push(r);return s}},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){var n=i(0),s=i(19),r=i(121),a=i(55),o=new n({initialize:function(t,e,i,n){var s=t.manager.game;this.texture=t,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=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){t.config.renderType===s.WEBGL&&(this.glTexture=t.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.pixelArt&&this.setFilter(1)},setFilter:function(t){var e=this.texture.manager.game;e.config.renderType===s.WEBGL&&e.renderer.setTextureFilter(this.glTexture,t)},destroy:function(){this.texture=null,this.image=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(119),r=i(167),a=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var a=0;a=0&&t<=a.width&&e>=0&&e<=a.height){t+=s.cutX,e+=s.cutY;var o=this._tempContext;o.clearRect(0,0,1,1),o.drawImage(a,t,e,1,1,0,0,1,1);var h=o.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.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},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(73),s=i(0),r=i(175),a=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=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(){if(this.locked="ontouchstart"in window,this.locked){this.lockedActionsQueue=[];var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.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.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(en&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i=0;t--){this.scenes[t].sys.destroy()}this.update=a,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.startListeners()},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},s={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("touchstart",t,s),i.addEventListener("touchmove",t,s),i.addEventListener("touchend",t,s)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("touchstart",t,n),i.addEventListener("touchmove",t,n),i.addEventListener("touchend",t,n)),this.handler=t},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.handler),t.removeEventListener("touchmove",this.handler),t.removeEventListener("touchend",this.handler)},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new s,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.dragState=0,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.movementX=0,this.movementY=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},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}},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},touchmove:function(t){this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.dirty=!0,this.wasTouch=!1},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){this.buttons=1,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},touchend:function(t,e){this.buttons=0,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return 1&this.buttons},rightButtonDown:function(){return 2&this.buttons},middleButtonDown:function(){return 4&this.buttons},backButtonDown:function(){return 8&this.buttons},forwardButtonDown:function(){return 16&this.buttons},destroy:function(){this.camera=null,this.manager=null,this.position=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(112),r=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler,this.locked=!1},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},pointerLockChange:function(t){var e=this.target;this.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,this.manager.queue.push(t)},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},r={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("mousemove",t,r),i.addEventListener("mousedown",t,r),i.addEventListener("mouseup",t,r)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("mousemove",t,n),i.addEventListener("mousedown",t,n),i.addEventListener("mouseup",t,n)),this.handler=t,s.pointerLock&&(this.pointerLockChange=this.pointerLockChange.bind(this),document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.handler),t.removeEventListener("mousedown",this.handler),t.removeEventListener("mouseup",this.handler),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=i(501),a=i(499),o=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});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)=n.x&&e>=n.y&&t<=n.x+a&&e<=n.y+o))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=this.game.config.resolution,c=this._tempMatrix,f=0;fe.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(23),s=i(0),r=i(200),a=i(199),o=i(4),h=new s({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,o(i,"frames",[]),o(i,"defaultTextureKey",null)),this.frameRate=o(i,"frameRate",null),this.duration=o(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=o(i,"skipMissedFrames",!0),this.delay=o(i,"delay",0),this.repeat=o(i,"repeat",0),this.repeatDelay=o(i,"repeatDelay",0),this.yoyo=o(i,"yoyo",!1),this.showOnStart=o(i,"showOnStart",!1),this.hideOnComplete=o(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 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),t.updateFrame(this.frames[e])},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,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),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.forward=!0,t.updateFrame(t.currentFrame.nextFrame),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 m(t,e,i,s,r){for(var a,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=s||(a=e+Math.ceil((i-e)/s/2)*s,n(t,a,e,i,r),o.push(e,a,a,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,a,o,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),o=g(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,a,h,u,l,d,f,p,g,m,v,y;for(u=l=1/0,n=e;n<=i-e;n++)s=o(t,0,n,this.toBBox),r=o(t,n,i,this.toBBox),f=s,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),a=Math.max(0,v-g)*Math.max(0,y-m),h=c(s)+c(r),a=e;s--)r=t.children[s],h(l,t.leaf?a(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():a(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,m.x=h.x1+(h.x2-h.x1)*g,m.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,m.x=o.x1+(o.x2-o.x1)*g,m.y=o.y1+(o.y2-o.y1)*g),r.push(m)}return r}},function(t,e,i){var n=i(5),s=i(67);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.getLineA(),a=t.getLineB(),o=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(a),l=s(o),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d):(d=(c-=h)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d),i}},,,,,,,,,function(t,e,i){t.exports=i(398)},function(t,e,i){t.exports={In:i(401),Out:i(400),InOut:i(399)}},function(t,e,i){t.exports={In:i(404),Out:i(403),InOut:i(402)}},function(t,e,i){t.exports={In:i(407),Out:i(406),InOut:i(405)}},function(t,e,i){t.exports={In:i(410),Out:i(409),InOut:i(408)}},function(t,e,i){t.exports=i(411)},function(t,e,i){t.exports={In:i(414),Out:i(413),InOut:i(412)}},function(t,e,i){t.exports={In:i(417),Out:i(416),InOut:i(415)}},function(t,e,i){t.exports={In:i(420),Out:i(419),InOut:i(418)}},function(t,e,i){t.exports={In:i(423),Out:i(422),InOut:i(421)}},function(t,e,i){t.exports={In:i(426),Out:i(425),InOut:i(424)}},function(t,e,i){t.exports={In:i(429),Out:i(428),InOut:i(427)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var n=i(106);n.Area=i(449),n.Circumference=i(161),n.CircumferencePoint=i(105),n.Clone=i(448),n.Contains=i(51),n.ContainsPoint=i(447),n.ContainsRect=i(446),n.CopyFrom=i(445),n.Equals=i(444),n.GetBounds=i(443),n.GetPoint=i(163),n.GetPoints=i(162),n.Offset=i(442),n.OffsetPoint=i(441),n.Random=i(126),t.exports=n},,,,,function(t,e,i){var n=i(4),s=i(91),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(6);t.exports=function(t,e,i,s,r,a,o,h){void 0===h&&(h=new n);var u=Math.sin(-r),l=Math.cos(-r),c=l*a,d=-u*a,f=u*o,p=l*o,g=c*p-d*f,m=p/g,v=-d/g,y=-f/g,x=c/g,w=(f*s-p*i)/g,T=-(c*s-d*i)/g;return h.x=t*m+e*y+w,h.y=t*v+e*x+T,h}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,o,h,u,l,f,g,m=e&&e.length,v=m?e[0]*i:t.length,y=s(t,0,v,i,!0),x=[];if(!y)return x;if(m&&(y=function(t,e,i,n){var a,o,h,u,l,f=[];for(a=0,o=e.length;a80*i){n=h=t[0],o=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-o)}return a(y,x,i,n,o,g),x}function s(t,e,i,n,s){var r,a;if(s===E(t,e,i,n)>0)for(r=e;r=e;r-=n)a=S(r,t[r],t[r+1],a);return a&&y(a,a.next)&&(A(a),a=a.next),a}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!==v(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 a(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,a,o,h,u=1;do{for(i=t,t=null,r=null,a=0;i;){for(a++,n=i,o=0,e=0;e0||h>0&&n;)0!==o&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,o--):(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(a>1)}(s)}(t,n,s,c);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):o(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),A(t),t=g.next,m=g.next;else if((t=g)===m){d?1===d?a(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):a(r(t),e,i,n,s,c,1);break}}}function o(t){var e=t.prev,i=t,n=t.next;if(v(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)&&v(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,a=t.next;if(v(s,r,a)>=0)return!1;for(var o=s.xr.x?s.x>a.x?s.x:a.x:r.x>a.x?r.x:a.x,l=s.y>r.y?s.y>a.y?s.y:a.y:r.y>a.y?r.y:a.y,c=f(o,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,a.x,a.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(s.x,s.y,r.x,r.y,a.x,a.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 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,o){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),a(h,e,i,n,s,o),void a(l,e,i,n,s,o)}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,a=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var o=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=s&&o>a){if(a=o,o===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=T(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-a)*(n-o)-(i-a)*(e-o)>=0&&(i-a)*(r-o)-(s-a)*(n-o)>=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,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 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,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,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),n=new b(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function S(t,e,i,n){var s=new b(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function 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 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 E(t,e,i,n){for(var s=0,r=e,a=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e,i){var n=i(0),s=i(111),r=i(250),a=i(192),o=i(512),h=i(511),u=i(25),l=i(80),c=function(t,e,i,n,s){this.x=t,this.y=e,this.width=i,this.rgb=n,this.alpha=s},d=function(t,e,i,n,s){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,n,s)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,m=[],v=new n({Extends:l,Mixins:[a],initialize:function(t){l.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:h,fragShader:t.fragShader?t.fragShader:o,vertexCapacity:t.vertexCapcity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:2*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.tempTriangle=[{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1}],this.polygonCache=[],this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchFillRect:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v,y){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var x=this.vertexViewF32,w=this.vertexViewU32,T=this.vertexCount*this.vertexComponentCount,S=r+o,A=a+h,b=y[0],E=y[1],_=y[2],C=y[3],M=d*b+f*_,k=d*E+f*C,P=p*b+g*_,L=p*E+g*C,F=m*b+v*_+y[4],R=m*E+v*C+y[5],O=r*M+a*P+F,D=r*k+a*L+R,I=r*M+A*P+F,B=r*k+A*L+R,N=S*M+A*P+F,U=S*k+A*L+R,Y=S*M+a*P+F,X=S*k+a*L+R,G=u.getTintAppendFloatAlphaAndSwap(l,c);x[T+0]=O,x[T+1]=D,w[T+2]=G,x[T+3]=I,x[T+4]=B,w[T+5]=G,x[T+6]=N,x[T+7]=U,w[T+8]=G,x[T+9]=O,x[T+10]=D,w[T+11]=G,x[T+12]=N,x[T+13]=U,w[T+14]=G,x[T+15]=Y,x[T+16]=X,w[T+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v,y,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.vertexViewF32,S=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,b=w[0],E=w[1],_=w[2],C=w[3],M=p*b+g*_,k=p*E+g*C,P=m*b+v*_,L=m*E+v*C,F=y*b+x*_+w[4],R=y*E+x*C+w[5],O=r*M+a*P+F,D=r*k+a*L+R,I=o*M+h*P+F,B=o*k+h*L+R,N=l*M+c*P+F,U=l*k+c*L+R,Y=u.getTintAppendFloatAlphaAndSwap(d,f);T[A+0]=O,T[A+1]=D,S[A+2]=Y,T[A+3]=I,T[A+4]=B,S[A+5]=Y,T[A+6]=N,T[A+7]=U,S[A+8]=Y,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,a,o,h,u,l,c,d,f,p,g,m,v,y,x,w){var T=this.tempTriangle;T[0].x=r,T[0].y=a,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=o,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=u,T[2].y=l,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=a,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,m,v,y,x,!1,w)},batchFillPath:function(t,e,i,n,s,a,o,h,l,c,d,f,p,g,m){this.renderer.setPipeline(this);for(var v,y,x,w,T,S,A,b,E,_,C,M,k,P,L,F,R,O=a.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,N=0,U=m[0],Y=m[1],X=m[2],G=m[3],z=l*U+c*X,W=l*Y+c*G,V=d*U+f*X,H=d*Y+f*G,j=p*U+g*X+m[4],K=p*Y+g*G+m[5],q=u.getTintAppendFloatAlphaAndSwap(o,h),J=0;Jthis.vertexCapacity&&this.flush(),N=this.vertexCount*this.vertexComponentCount,M=(S=D[x+0])*z+(A=D[x+1])*V+j,k=S*W+A*H+K,P=(b=D[w+0])*z+(E=D[w+1])*V+j,L=b*W+E*H+K,F=(_=D[T+0])*z+(C=D[T+1])*V+j,R=_*W+C*H+K,I[N+0]=M,I[N+1]=k,B[N+2]=q,I[N+3]=P,I[N+4]=L,B[N+5]=q,I[N+6]=F,I[N+7]=R,B[N+8]=q,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v){var y,x;this.renderer.setPipeline(this);for(var w,T,S,A,b=r.length,E=this.polygonCache,_=this.vertexViewF32,C=this.vertexViewU32,M=u.getTintAppendFloatAlphaAndSwap,k=0;k+1this.vertexCapacity&&this.flush(),w=E[P-1]||E[L-1],T=E[P],_[(S=this.vertexCount*this.vertexComponentCount)+0]=w[6],_[S+1]=w[7],C[S+2]=M(w[8],h),_[S+3]=w[0],_[S+4]=w[1],C[S+5]=M(w[2],h),_[S+6]=T[9],_[S+7]=T[10],C[S+8]=M(T[11],h),_[S+9]=w[0],_[S+10]=w[1],C[S+11]=M(w[2],h),_[S+12]=w[6],_[S+13]=w[7],C[S+14]=M(w[8],h),_[S+15]=T[3],_[S+16]=T[4],C[S+17]=M(T[5],h),this.vertexCount+=6;E.length=0},batchLine:function(t,e,i,n,s,r,a,o,h,l,c,d,f,p,g,m,v,y,x,w,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var S=T[0],A=T[1],b=T[2],E=T[3],_=g*S+m*b,C=g*A+m*E,M=v*S+y*b,k=v*A+y*E,P=x*S+w*b+T[4],L=x*A+w*E+T[5],F=this.vertexViewF32,R=this.vertexViewU32,O=o-r,D=h-a,I=Math.sqrt(O*O+D*D),B=l*(h-a)/I,N=l*(r-o)/I,U=c*(h-a)/I,Y=c*(r-o)/I,X=o-U,G=h-Y,z=r-B,W=a-N,V=o+U,H=h+Y,j=r+B,K=a+N,q=X*_+G*M+P,J=X*C+G*k+L,Z=z*_+W*M+P,Q=z*C+W*k+L,$=V*_+H*M+P,tt=V*C+H*k+L,et=j*_+K*M+P,it=j*C+K*k+L,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),at=this.vertexCount*this.vertexComponentCount;return F[at+0]=q,F[at+1]=J,R[at+2]=rt,F[at+3]=Z,F[at+4]=Q,R[at+5]=st,F[at+6]=$,F[at+7]=tt,R[at+8]=rt,F[at+9]=Z,F[at+10]=Q,R[at+11]=st,F[at+12]=et,F[at+13]=it,R[at+14]=st,F[at+15]=$,F[at+16]=tt,R[at+17]=rt,this.vertexCount+=6,[q,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var r,a,o,h,u,l,v,y,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,T=t.x,S=t.y,A=t.scaleX,b=t.scaleY,E=t.rotation,_=t.commandBuffer,C=t.alpha,M=1,k=1,P=0,L=0,F=1,R=e.matrix.matrix,O=null,D=0,I=0,B=0,N=0,U=0,Y=0,X=0,G=0,z=0,W=0,V=null,H=Math.sin,j=Math.cos,K=2*Math.PI,q=H(E),J=j(E),Z=J*A,Q=q*A,$=-q*b,tt=J*b,et=T,it=S,nt=R[0],st=R[1],rt=R[2],at=R[3],ot=R[4],ht=R[5];if(n){var ut=n[0],lt=n[1],ct=n[2],dt=n[3],ft=n[4],pt=n[5],gt=-x,mt=-w,vt=ut*nt+lt*rt,yt=ut*st+lt*at,xt=ct*nt+dt*rt,wt=ct*st+dt*at;r=Z*vt+Q*xt,a=Z*yt+Q*wt,o=$*vt+tt*xt,h=$*yt+tt*wt,u=et*vt+it*xt+(ft*nt+pt*rt+(gt*nt+mt*rt+ot)),l=et*yt+it*wt+(ft*st+pt*at+(gt*st+mt*at+ht))}else r=Z*nt+Q*rt,a=Z*st+Q*at,o=$*nt+tt*rt,h=$*st+tt*at,u=(et-=x)*nt+(it-=w)*rt+ot,l=et*st+it*at+ht;m.length=0;for(var Tt=0,St=_.length;Tt0&&(z=z%K-K):z>K?z=K:z<0&&(z=K+z%K);D<1;)I=U+j(N=z*D+G)*X,B=Y+H(N)*X,O.points.push(new c(I,B,F,P,M*C)),D+=.01;I=U+j(N=z+G)*X,B=Y+H(N)*X,O.points.push(new c(I,B,F,P,M*C)),Tt+=6;break;case s.LINE_STYLE:F=_[Tt+1],P=_[Tt+2],M=_[Tt+3],Tt+=3;break;case s.FILL_STYLE:L=_[Tt+1],k=_[Tt+2],Tt+=2;break;case s.BEGIN_PATH:m.length=0,O=null;break;case s.CLOSE_PATH:O&&O.points.length&&O.points.push(O.points[0]);break;case s.FILL_PATH:for(v=0,y=m.length;v=0&&n>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=a,a?(s.disable(s.SCISSOR_TEST),this):(s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,a=this.currentScissor;return s[r+0]=a[0],s[r+1]=a[1],s[r+2]=a[2],s[r+3]=a[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?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),this},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},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;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),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 a=this.gl,o=a.NEAREST,h=a.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=a.REPEAT),n===s.ScaleModes.LINEAR?o=a.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(o=a.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,o,o,h,h,a.RGBA,t):this.createTexture2D(0,o,o,h,h,a.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,a,o,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===a||void 0===a?l.texImage2D(l.TEXTURE_2D,t,r,o,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,a),o=a.width,h=a.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=o,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,a=r.createFramebuffer();if(this.setFramebuffer(a),n){var o=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,o),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,o)}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 a.renderTexture=i,this.setFramebuffer(null),a},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){return 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=this.config.resolution,i=Math.floor(t.x*e),n=Math.floor(t.y*e),s=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,n,s,r),t.backgroundColor.alphaGL>0){var o=t.backgroundColor,h=this.pipelines.FlatTintPipeline;h.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,a.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),h.flush()}},postRenderCamera:function(t){var e=this.pipelines.FlatTintPipeline,i=t.flashEffect.postRenderWebGL(e,a.getTintFromFloats);(t.fadeEffect.postRenderWebGL(e,a.getTintFromFloats)||i)&&e.flush(),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()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,a=r.length,o=this.pipelines;for(var h in o)o[h].onRender(t,n);this.preRenderCamera(n);for(var 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(27),s=i(276);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(27);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),a=parseInt(i[3],16);e.setTo(s,r,a)}return e}},,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;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(153),r=i(10),a=i(152),o=i(57),h=i(68),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 a(this,t)},timeline:function(t){var e=a(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;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.settings.status!==r.RUNNING?this.manager.queueOp("start",t,e):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==r.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=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)},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",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(52),s=i(16),r={SceneManager:i(180),ScenePlugin:i(320),Settings:i(178),Systems:i(109)};r=s(!1,r,n),t.exports=r},,,,,,,,,,,,,,,,,,,,function(t,e,i){var n=i(7),s=i(46),r=function(t,e,i,n,r){var a=new s(t,e,n,r,i);return a.type="spritesheet",a};n.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s-1&&(s.splice(o,1),this.clear(a))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;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&&(t.input.dropZone=n),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);if(e){t.camera=e;for(var i=this.manager.hitTest(t.x,t.y,this._list,e),n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var h=[];for(i=0;i1&&(this.sortGameObjects(h),this.topOnly&&h.splice(1)),this._drag[t.id]=h,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&a(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},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;n-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._tempZones=[],this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&(r+=this.processUpEvents(n)),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off("transitionstart",this.transitionIn,this),e.off("transitionout",this.transitionOut,this),e.off("transitioncomplete",this.transitionComplete,this),e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.keyboard=null,this.mouse=null,this.gamepad=null},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",m,"input"),t.exports=m},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){t.exports={DUALSHOCK_4:i(358),SNES_USB:i(357),XBOX_360:i(356)}},function(t,e,i){t.exports={Axis:i(188),Button:i(187),Gamepad:i(189),GamepadManager:i(190),Configs:i(359)}},function(t,e,i){t.exports={CreateInteractiveObject:i(159),Gamepad:i(360),InputManager:i(191),InputPlugin:i(355),Keyboard:i(354),Mouse:i(349),Pointer:i(182),Touch:i(348)}},,,,,,,,,,,,,,,,,,,function(t,e,i){var n=i(21),s=i(13),r=i(8),a=i(102);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var o=new a(this.scene,0,0,e,i);return n(this.scene,o,t),o.autoRound=r(t,"autoRound",!0),o.resolution=r(t,"resolution",1),o})},function(t,e,i){var n=i(21),s=i(118),r=i(13),a=i(8),o=i(31);r.register("sprite",function(t){var e=a(t,"key",null),i=a(t,"frame",null),r=new o(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),a=i(66);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new a(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(8),s=i(13),r=i(107);s.register("graphics",function(t){var e=n(t,"add",!0),i=new r(this.scene,t);return e&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(102);i(11).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(11),s=i(31);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(66);i(11).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(107);i(11).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},,function(t,e,i){var n=i(22);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,a=2*r;r=r*t.baselineY|0,e.width=s,e.height=a,i.fillStyle="#f00",i.fillRect(0,0,s,a),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var o={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,a))return o.ascent=r,o.descent=r+6,o.fontSize=o.ascent+o.descent,n.remove(e),o;var h,u,l=i.getImageData(0,0,s,a).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||""===e.text)){var a=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,a.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,a.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;if(a.save(),void 0!==r){var h=r.matrix;a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY;t.config.roundPixels&&(u|=0,l|=0),a.translate(u,l),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),a.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(392),s=i(391),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,a=[],o=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:o,height:d,lines:h,lineWidths:a,lineSpacing:f,lineHeight:c}}},,,,function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?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(239),s=i(238),r=i(237),a=i(236),o=i(235),h=i(234),u=i(233),l=i(232),c=i(231),d=i(230),f=i(229),p=i(228);t.exports={Power0:u,Power1:l.Out,Power2:a.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:a.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:o.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":a.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":o.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":o.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":o.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},,,,,,function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(437),s=i(436),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(439),s=i(160),s=i(160),t.exports={renderWebGL:n,renderCanvas:s}},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(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(51);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(51);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},,,,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._list=[],this._pendingInsertion=[],this._pendingRemoval=[],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)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-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(70);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(26);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 a=i-e,o=t.splice(e,a);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(70);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var a=e.length-1;a>=0;){var o=e[a];-1!==(r=t.indexOf(o))?(n(t,r),i&&i.call(s,o)):e.pop(),a--}return e}},function(t,e,i){var n=i(247);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),a=0;a=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(26);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 a=s;a0){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,u),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;n>0&&o>a&&(e.splice(a),o=a);for(var h=o;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 a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;i>0&&a>r&&(e.splice(r),a=r);for(var o=0;o0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var o=r/this._target;this.callback(t,r,o),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=o},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 a=s.split("\n"),o=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",u="",l={x:0,y:0,width:0,height:0},c=0;cx||o<-x)&&(o=0),o<0&&(o=x+o),-1!==h&&(x=o+(h+1));for(var _=u,C=u,M=0,k=e.sourceIndex,P=0;Pg||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),S>a&&(x=S-a),t.add(w,e,i+m,s+v,h-y,u-x),(m+=h+p)+h>r&&(m=f,v+=u+p)}return t}},function(t,e){t.exports=function(t,e){if(["layers","tilewidth","tileheight","tileswide","tileshigh"].forEach(function(t){e[t]}),1===e.layers.length){for(var i=new Phaser.FrameData,n=e.tileheight,s=e.tilewidth,r=e.layers[0].tiles,a=0;a0&&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){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t=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(53),s=i(74),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(53),browser:i(74),features:i(112),input:i(505),audio:i(504),video:i(503),fullscreen:i(502),canvasFeatures:i(193)}},function(t,e,i){var n=i(19);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,a=t.device.audio;if(s=!a.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!a.webAudio&&!a.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var o,h="",u=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),u.push("background: "+t),o=t}),u[u.length-1]="color: "+e.bannerTextColor+"; background: "+o):(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\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\nuniform bool uInvertMaskAlpha;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = mainColor.a;\r\n\r\n if (!uInvertMaskAlpha)\r\n {\r\n alpha *= (maskColor.a);\r\n }\r\n else\r\n {\r\n alpha *= (1.0 - maskColor.a);\r\n }\r\n \r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n"},function(t,e,i){var n=i(266),s=i(22),r=i(19),a=i(112);t.exports=function(t){var e,o,h=t.config;if(h.renderType!==r.HEADLESS)if(h.renderType===r.CANVAS||h.renderType!==r.CANVAS&&!a.webGL){if(!a.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");h.renderType=r.CANVAS}else h.renderType=r.WEBGL;h.pixelArt&&s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.pixelArt&&n.setCrisp(t.canvas),1!==h.zoom&&(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),o=i(254),h.renderType===r.WEBGL?(t.renderer=new o(t),t.context=null):(t.renderer=new e(t),t.context=t.renderer.gameContext))}},function(t,e,i){var n=i(0),s=i(19),r=i(4),a=i(15),o=i(3),h=i(194),u=i(124),l=new n({initialize:function(t){void 0===t&&(t={});this.width=r(t,"width",1024),this.height=r(t,"height",768),this.zoom=r(t,"zoom",1),this.resolution=r(t,"resolution",1),this.renderType=r(t,"type",s.AUTO),this.parent=r(t,"parent",null),this.canvas=r(t,"canvas",null),this.canvasStyle=r(t,"canvasStyle",null),this.sceneConfig=r(t,"scene",null),this.seed=r(t,"seed",[(Date.now()*Math.random()).toString()]),a.RND.init(this.seed),this.gameTitle=r(t,"title",""),this.gameURL=r(t,"url","https://phaser.io"),this.gameVersion=r(t,"version",""),this.inputKeyboard=r(t,"input.keyboard",!0),this.inputKeyboardEventTarget=r(t,"input.keyboard.target",window),this.inputMouse=r(t,"input.mouse",!0),this.inputMouseEventTarget=r(t,"input.mouse.target",null),this.inputMouseCapture=r(t,"input.mouse.capture",!0),this.inputTouch=r(t,"input.touch",!0),this.inputTouchEventTarget=r(t,"input.touch.target",null),this.inputTouchCapture=r(t,"input.touch.capture",!0),this.inputGamepad=r(t,"input.gamepad",!1),this.disableContextMenu=r(t,"disableContextMenu",!1),this.audio=r(t,"audio"),this.hideBanner=!1===r(t,"banner",null),this.hidePhaser=r(t,"banner.hidePhaser",!1),this.bannerTextColor=r(t,"banner.text","#ffffff"),this.bannerBackgroundColor=r(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(t,"fps",null);var e=r(t,"render",t);this.antialias=r(e,"antialias",!0),this.pixelArt=r(e,"pixelArt",!1),this.autoResize=r(e,"autoResize",!1),this.roundPixels=r(e,"roundPixels",!1),this.transparent=r(e,"transparent",!1),this.clearBeforeRender=r(e,"clearBeforeRender",!0),this.premultipliedAlpha=r(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=r(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=r(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(e,"powerPreference","default");var i=r(t,"backgroundColor",0);this.backgroundColor=u(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=r(t,"callbacks.preBoot",o),this.postBoot=r(t,"callbacks.postBoot",o),this.physics=r(t,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(t,"loader.baseURL",""),this.loaderPath=r(t,"loader.path",""),this.loaderEnableParallel=r(t,"loader.enableParallel",!0),this.loaderMaxParallelDownloads=r(t,"loader.maxParallelDownloads",4),this.loaderCrossOrigin=r(t,"loader.crossOrigin",void 0),this.loaderResponseType=r(t,"loader.responseType",""),this.loaderAsync=r(t,"loader.async",!0),this.loaderUser=r(t,"loader.user",""),this.loaderPassword=r(t,"loader.password",""),this.loaderTimeout=r(t,"loader.timeout",0),this.defaultPlugins=r(t,"plugins",h.DefaultScene);var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(t,"images.default",n+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(t,"images.missing",n+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=l},function(t,e,i){var n=i(122),s=i(198),r=i(196),a=i(22),o=i(0),h=i(516),u=i(515),l=i(76),c=i(507),d=i(506),f=i(263),p=i(9),g=i(191),m=i(3),v=i(10),y=i(180),x=i(177),w=i(170),T=i(483),S=i(482),A=new o({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new w(this),this.cache=new r(this),this.registry=new l(this),this.input=new g(this,this.config),this.scene=new y(this,this.config.sceneConfig),this.device=d,this.sound=x.create(this),this.loop=new T(this,this.config.fps),this.plugins=new v(this,this.config),this.onStepCallback=m,this.pendingDestroy=!1,this.removeCanvas=!1,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),u(this),c(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("ready",this.start,this)},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)),S(this.events),this.events.on("hidden",this.onHidden,this),this.events.on("visible",this.onVisible,this),this.events.on("blur",this.onBlur,this),this.events.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e);var i=this.renderer;i.preRender(),this.events.emit("prerender",i),this.scene.render(i),i.postRender(),this.events.emit("postrender",i)},headlessStep:function(t,e){this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e),this.events.emit("prerender"),this.events.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.loop.blur()},onFocus:function(){this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t){this.pendingDestroy=!0,this.removeCanvas=t},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.onStepCallback=null,this.removeCanvas&&this.canvas&&(a.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=A},function(t,e,i){var n=i(0),s=i(9),r=i(10),a=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",a,"events"),t.exports=a},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(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:a}catch(t){n=a}}();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=o(d);l=!0;for(var e=u.length;e;){for(h=u,u=[];++c1)for(var i=1;i0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(539),s=i(538),t.exports={renderWebGL:n,renderCanvas:s}},,,,,,function(t,e,i){var n=i(113),s=i(0),r=i(2),a=i(10),o=i(28),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.currentCameraId=1,this.cameras=[],this.cameraPool=[],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(){this.main||this.boot();var t=this.systems.events;t.on("update",this.update,this),t.once("shutdown",this.shutdown,this)},add:function(t,e,i,s,r,a){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===a&&(a="");var o=null;return this.cameraPool.length>0?(o=this.cameraPool.pop()).setViewport(t,e,i,s):o=new n(t,e,i,s),o.setName(a),o.setScene(this.scene),this.cameras.push(o),r&&(this.main=o),o._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,o},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&o(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,a=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),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},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){var i={texture:null,frame:null,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(55),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){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var a=this.currentMatrix,o=a[0],h=a[1],u=a[2],l=a[3],c=a[4],d=a[5];return a[0]=o*t+u*e,a[1]=h*t+l*e,a[2]=o*i+u*n,a[3]=h*i+l*n,a[4]=o*s+u*r+c,a[5]=h*s+l*r+d,this},setTransform:function(t,e,i,n,s,r){var a=this.currentMatrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=s,a[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],a=i[3],o=i[4],h=i[5];return i[4]=n*t+r*e+o,i[5]=s*t+a*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],a=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=a*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],a=Math.sin(t),o=Math.cos(t);return e[0]=i*o+s*a,e[1]=n*o+r*a,e[2]=i*-a+s*o,e[3]=n*-a+r*o,this}};t.exports=i},function(t,e,i){var n=i(12),s=i(284),r=i(6),a={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,a,o,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),a=t.x,o=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),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,u=t.y;return t.x=Math.min(e,s,a,h),t.y=Math.min(i,r,o,u),t.width=Math.max(e,s,a,h)-t.x,t.height=Math.max(i,r,o,u)-t.y,t}};t.exports=a},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){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(48),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(23),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){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;s + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var IsPlainObject = __webpack_require__(292); + +// @param {boolean} deep - Perform a deep copy? +// @param {object} target - The target object to copy to. +// @return {object} The extended object. + +/** + * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ + * + * @function Phaser.Utils.Object.Extend + * @since 3.0.0 + * + * @return {object} [description] + */ +var Extend = function () +{ + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') + { + deep = target; + target = arguments[1] || {}; + + // skip the boolean and the target + i = 2; + } + + // extend Phaser if only one argument is passed + if (length === i) + { + target = this; + --i; + } + + for (; i < length; i++) + { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) + { + // Extend the base object + for (name in options) + { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) + { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) + { + if (copyIsArray) + { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } + else + { + clone = src && IsPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = Extend(deep, clone, copy); + + // Don't bring in undefined values + } + else if (copy !== undefined) + { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +module.exports = Extend; + + +/***/ }), +/* 17 */ /***/ (function(module, exports) { /** @@ -3348,105 +3447,6 @@ var FILE_CONST = { module.exports = FILE_CONST; -/***/ }), -/* 17 */ -/***/ (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 IsPlainObject = __webpack_require__(292); - -// @param {boolean} deep - Perform a deep copy? -// @param {object} target - The target object to copy to. -// @return {object} The extended object. - -/** - * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ - * - * @function Phaser.Utils.Object.Extend - * @since 3.0.0 - * - * @return {object} [description] - */ -var Extend = function () -{ - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if (typeof target === 'boolean') - { - deep = target; - target = arguments[1] || {}; - - // skip the boolean and the target - i = 2; - } - - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } - - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) - { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; - - // Prevent never-ending loop - if (target === copy) - { - continue; - } - - // Recurse if we're merging plain objects or arrays - if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) - { - if (copyIsArray) - { - copyIsArray = false; - clone = src && Array.isArray(src) ? src : []; - } - else - { - clone = src && IsPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[name] = Extend(deep, clone, copy); - - // Don't bring in undefined values - } - else if (copy !== undefined) - { - target[name] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -module.exports = Extend; - - /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { @@ -3458,7 +3458,7 @@ module.exports = Extend; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var GetFastValue = __webpack_require__(2); var GetURL = __webpack_require__(117); var MergeXHRSettings = __webpack_require__(116); @@ -3870,7 +3870,7 @@ var File = new Class({ * * @method Phaser.Loader.File.createObjectURL * @static - * @param {Image} image - Image object which 'src' attribute should be set to object URL. + * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL. * @param {Blob} blob - A Blob object to create an object URL for. * @param {string} defaultType - Default mime type used if blob type is not available. */ @@ -3902,7 +3902,7 @@ File.createObjectURL = function (image, blob, defaultType) * * @method Phaser.Loader.File.revokeObjectURL * @static - * @param {Image} image - Image object which 'src' attribute should be revoked. + * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked. */ File.revokeObjectURL = function (image) { @@ -3941,7 +3941,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.5.1', + VERSION: '3.6.0', BlendModes: __webpack_require__(48), @@ -5577,6 +5577,7 @@ var Sprite = new Class({ * [description] * * @method Phaser.GameObjects.Sprite#preUpdate + * @protected * @since 3.0.0 * * @param {number} time - [description] @@ -5834,7 +5835,7 @@ module.exports = CalculateFacesWithin; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -6735,7 +6736,7 @@ module.exports = Common; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -10429,7 +10430,7 @@ module.exports = RotateMatrix; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var NOOP = __webpack_require__(3); /** @@ -14663,7 +14664,7 @@ var Curve = new Class({ * @method Phaser.Curves.Curve#draw * @since 3.0.0 * - * @generic {Phaser.GameObjects.Graphics} G - [out,$return] + * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return] * * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn. * @param {integer} [pointsTotal=32] - The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance. @@ -17375,10 +17376,10 @@ var Vector2 = __webpack_require__(6); * @constructor * @since 3.0.0 * - * @param {number} [x1=0] - [description] - * @param {number} [y1=0] - [description] - * @param {number} [x2=0] - [description] - * @param {number} [y2=0] - [description] + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. */ var Line = new Class({ @@ -17392,7 +17393,7 @@ var Line = new Class({ if (y2 === undefined) { y2 = 0; } /** - * [description] + * The x coordinate of the lines starting point. * * @name Phaser.Geom.Line#x1 * @type {number} @@ -17401,7 +17402,7 @@ var Line = new Class({ this.x1 = x1; /** - * [description] + * The y coordinate of the lines starting point. * * @name Phaser.Geom.Line#y1 * @type {number} @@ -17410,7 +17411,7 @@ var Line = new Class({ this.y1 = y1; /** - * [description] + * The x coordinate of the lines ending point. * * @name Phaser.Geom.Line#x2 * @type {number} @@ -17419,7 +17420,7 @@ var Line = new Class({ this.x2 = x2; /** - * [description] + * The y coordinate of the lines ending point. * * @name Phaser.Geom.Line#y2 * @type {number} @@ -17439,7 +17440,7 @@ var Line = new Class({ * @param {float} position - [description] * @param {(Phaser.Geom.Point|object)} [output] - [description] * - * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse. + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. */ getPoint: function (position, output) { @@ -17466,16 +17467,16 @@ var Line = new Class({ }, /** - * [description] + * Get a random Point on the Line. * * @method Phaser.Geom.Line#getRandomPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [point,$return] * - * @param {(Phaser.Geom.Point|object)} [point] - [description] + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A random Point on the Line. */ getRandomPoint: function (point) { @@ -17483,15 +17484,15 @@ var Line = new Class({ }, /** - * [description] + * Set new coordinates for the line endpoints. * * @method Phaser.Geom.Line#setTo * @since 3.0.0 * - * @param {number} [x1=0] - [description] - * @param {number} [y1=0] - [description] - * @param {number} [x2=0] - [description] - * @param {number} [y2=0] - [description] + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. * * @return {Phaser.Geom.Line} This Line object. */ @@ -20068,7 +20069,7 @@ var Text = new Class({ * [description] * * @name Phaser.GameObjects.Text#style - * @type {Phaser.GameObjects.Components.TextStyle} + * @type {Phaser.GameObjects.Text.TextStyle} * @since 3.0.0 */ this.style = new TextStyle(this, style); @@ -21026,7 +21027,7 @@ var Text = new Class({ * @method Phaser.GameObjects.Text#toJSON * @since 3.0.0 * - * @return {object} [description] + * @return {JSONGameObject} A JSON representation of the Game Object. */ toJSON: function () { @@ -21669,7 +21670,7 @@ var Group = new Class({ }, /** - * Removes a member of this group. + * Removes a member of this Group and optionally removes it from the Scene and / or destroys it. * * Calls {@link Phaser.GameObjects.Group#removeCallback}. * @@ -21677,13 +21678,15 @@ var Group = new Class({ * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove. - * @param {boolean} [removeFromScene=false] - Also remove the group member from the scene. + * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to. + * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member. * * @return {Phaser.GameObjects.Group} This Group object. */ - remove: function (child, removeFromScene) + remove: function (child, removeFromScene, destroyChild) { if (removeFromScene === undefined) { removeFromScene = false; } + if (destroyChild === undefined) { destroyChild = false; } if (!this.children.contains(child)) { @@ -21697,36 +21700,42 @@ var Group = new Class({ this.removeCallback.call(this, child); } - if (removeFromScene) + child.off('destroy', this.remove, this); + + if (destroyChild) { - this.scene.sys.displayList.remove(child); + child.destroy(); + } + else if (removeFromScene) + { + child.scene.sys.displayList.remove(child); if (child.preUpdate) { - this.scene.sys.updateList.remove(child); + child.scene.sys.updateList.remove(child); } } - child.off('destroy', this.remove, this); - return this; }, /** - * Removes all members of this group. + * Removes all members of this Group and optionally removes them from the Scene and / or destroys them. * * Does not call {@link Phaser.GameObjects.Group#removeCallback}. * * @method Phaser.GameObjects.Group#clear * @since 3.0.0 * - * @param {boolean} [removeFromScene=false] - Also remove each group member from the scene. + * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene. + * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members. * * @return {Phaser.GameObjects.Group} This group. */ - clear: function (removeFromScene) + clear: function (removeFromScene, destroyChild) { if (removeFromScene === undefined) { removeFromScene = false; } + if (destroyChild === undefined) { destroyChild = false; } var children = this.children; @@ -21736,13 +21745,17 @@ var Group = new Class({ gameObject.off('destroy', this.remove, this); - if (removeFromScene) + if (destroyChild) { - this.scene.sys.displayList.remove(gameObject); + gameObject.destroy(); + } + else if (removeFromScene) + { + gameObject.scene.sys.displayList.remove(gameObject); if (gameObject.preUpdate) { - this.scene.sys.updateList.remove(gameObject); + gameObject.scene.sys.updateList.remove(gameObject); } } } @@ -21794,7 +21807,7 @@ var Group = new Class({ }, /** - * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, * assigns `x` and `y`, and returns the member. * * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. @@ -21814,33 +21827,178 @@ var Group = new Class({ * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. */ getFirst: function (state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(true, 1, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getFirstNth + * @since 3.6.0 + * + * @param {integer} nth - The nth matching Group member to search for. + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getFirstNth: function (nth, state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(true, nth, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getLast + * @since 3.6.0 + * + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getLast: function (state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(false, 1, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getLastNth + * @since 3.6.0 + * + * @param {integer} nth - The nth matching Group member to search for. + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getLastNth: function (nth, state, createIfNull, x, y, key, frame, visible) + { + return this.getHandler(false, nth, state, createIfNull, x, y, key, frame, visible); + }, + + /** + * Scans the group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, + * assigns `x` and `y`, and returns the member. + * + * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`. + * Unless a new member is created, `key`, `frame`, and `visible` are ignored. + * + * @method Phaser.GameObjects.Group#getHandler + * @private + * @since 3.6.0 + * + * @param {boolean} forwards - Search front to back or back to front? + * @param {integer} nth - Stop matching after nth successful matches. + * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match. + * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments. + * @param {number} [x] - The horizontal position of the Game Object in the world. + * @param {number} [y] - The vertical position of the Game Object in the world. + * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created). + * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created). + * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). + * + * @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null. + */ + getHandler: function (forwards, nth, state, createIfNull, x, y, key, frame, visible) { if (state === undefined) { state = false; } if (createIfNull === undefined) { createIfNull = false; } var gameObject; + var i; + var total = 0; var children = this.children.entries; - for (var i = 0; i < children.length; i++) + if (forwards) { - gameObject = children[i]; - - if (gameObject.active === state) + for (i = 0; i < children.length; i++) { - if (typeof(x) === 'number') - { - gameObject.x = x; - } + gameObject = children[i]; - if (typeof(y) === 'number') + if (gameObject.active === state) { - gameObject.y = y; - } + total++; - return gameObject; + if (total === nth) + { + break; + } + } + else + { + gameObject = null; + } } } + else + { + for (i = children.length - 1; i >= 0; i--) + { + gameObject = children[i]; + + if (gameObject.active === state) + { + total++; + + if (total === nth) + { + break; + } + } + else + { + gameObject = null; + } + } + } + + if (gameObject) + { + if (typeof(x) === 'number') + { + gameObject.x = x; + } + + if (typeof(y) === 'number') + { + gameObject.y = y; + } + + return gameObject; + } // Got this far? We need to create or bail if (createIfNull) @@ -23791,7 +23949,7 @@ var Settings = __webpack_require__(178); * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene that owns this Systems instance. - * @param {(string|SettingsConfig)} config - Scene specific configuration settings. + * @param {(string|Phaser.Scenes.Settings.Config)} config - Scene specific configuration settings. */ var Systems = new Class({ @@ -23821,7 +23979,7 @@ var Systems = new Class({ * [description] * * @name Phaser.Scenes.Systems#config - * @type {(string|SettingsConfig)} + * @type {(string|Phaser.Scenes.Settings.Config)} * @since 3.0.0 */ this.config = config; @@ -23830,7 +23988,7 @@ var Systems = new Class({ * [description] * * @name Phaser.Scenes.Systems#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.0.0 */ this.settings = Settings.create(config); @@ -26221,14 +26379,13 @@ var Camera = new Class({ */ /** - * Destroys this Camera instance. + * 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 - * @protected * @since 3.0.0 */ destroy: function () @@ -26879,7 +27036,7 @@ module.exports = Vector; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var XHRSettings = __webpack_require__(88); /** @@ -27058,7 +27215,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @classdesc @@ -27656,7 +27813,7 @@ var WebGLPipeline = __webpack_require__(80); * * @class TextureTintPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -27716,7 +27873,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -27725,7 +27882,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#vertexViewU32 + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32 * @type {Uint32Array} * @since 3.0.0 */ @@ -27734,7 +27891,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#maxQuads + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#maxQuads * @type {integer} * @default 2000 * @since 3.0.0 @@ -27744,7 +27901,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.TextureTintPipeline#batches + * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batches * @type {array} * @since 3.1.0 */ @@ -27756,13 +27913,13 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#setTexture2D + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D * @since 3.1.0 * * @param {WebGLTexture} texture - [description] * @param {integer} textureUnit - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ setTexture2D: function (texture, unit) { @@ -27807,7 +27964,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#pushBatch + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#pushBatch * @since 3.1.0 */ pushBatch: function () @@ -27824,10 +27981,10 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#flush + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush * @since 3.1.0 * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} This Pipeline. + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This Pipeline. */ flush: function () { @@ -27924,14 +28081,15 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ onBind: function () { WebGLPipeline.prototype.onBind.call(this); + this.mvpUpdate(); if (this.batches.length === 0) @@ -27945,14 +28103,14 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} [description] */ resize: function (width, height, resolution) { @@ -27964,11 +28122,12 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawStaticTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] */ drawStaticTilemapLayer: function (tilemap) { @@ -27999,7 +28158,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] @@ -28039,29 +28198,16 @@ var TextureTintPipeline = new Class({ var vertexCapacity = this.vertexCapacity; var texture = emitterManager.defaultFrame.source.glTexture; var pca, pcb, pcc, pcd, pce, pcf; + var pma, pmb, pmc, pmd, pme, pmf; if (parentMatrix) { - var pma = parentMatrix[0]; - var pmb = parentMatrix[1]; - var pmc = parentMatrix[2]; - var pmd = parentMatrix[3]; - var pme = parentMatrix[4]; - var pmf = parentMatrix[5]; - - pca = cma * pma + cmb * pmc; - pcb = cma * pmb + cmb * pmd; - pcc = cmc * pma + cmd * pmc; - pcd = cmc * pmb + cmd * pmd; - pce = cme * pma + cmf * pmc + pme; - pcf = cme * pmb + cmf * pmd + pmf; - - cma = pca; - cmb = pcb; - cmc = pcc; - cmd = pcd; - cme = pce; - cmf = pcf; + pma = parentMatrix[0]; + pmb = parentMatrix[1]; + pmc = parentMatrix[2]; + pmd = parentMatrix[3]; + pme = parentMatrix[4]; + pmf = parentMatrix[5]; } this.setTexture2D(texture, 0); @@ -28076,6 +28222,31 @@ var TextureTintPipeline = new Class({ var scrollX = cameraScrollX * emitter.scrollFactorX; var scrollY = cameraScrollY * emitter.scrollFactorY; + if (parentMatrix) + { + var cse = -scrollX; + var csf = -scrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + pca = pma * cma + pmb * cmc; + pcb = pma * cmb + pmb * cmd; + pcc = pmc * cma + pmd * cmc; + pcd = pmc * cmb + pmd * cmd; + pce = pme * cma + pmf * cmc + pse; + pcf = pme * cmb + pmf * cmd + psf; + + cma = pca; + cmb = pcb; + cmc = pcc; + cmd = pcd; + cme = pce; + cmf = pcf; + + scrollX = 0.0; + scrollY = 0.0; + } + + if (!emitter.visible || aliveLength === 0) { continue; @@ -28112,11 +28283,11 @@ var TextureTintPipeline = new Class({ var sr = sin(particle.rotation); var cr = cos(particle.rotation); var sra = cr * particle.scaleX; - var srb = -sr * particle.scaleX; - var src = sr * particle.scaleY; + var srb = sr * particle.scaleX; + var src = -sr * particle.scaleY; var srd = cr * particle.scaleY; - var sre = particle.x - scrollX * particle.scrollFactorX; - var srf = particle.y - scrollY * particle.scrollFactorY; + var sre = particle.x - scrollX; + var srf = particle.y - scrollY; var mva = sra * cma + srb * cmc; var mvb = sra * cmb + srb * cmd; var mvc = src * cma + srd * cmc; @@ -28203,7 +28374,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] @@ -28238,8 +28409,6 @@ var TextureTintPipeline = new Class({ var cameraScrollY = camera.scrollY * blitter.scrollFactorY; var batchCount = Math.ceil(length / this.maxQuads); var batchOffset = 0; - var blitterX = blitter.x - cameraScrollX; - var blitterY = blitter.y - cameraScrollY; if (parentMatrix) { @@ -28249,12 +28418,16 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = a * pma + b * pmc; - var pcb = a * pmb + b * pmd; - var pcc = c * pma + d * pmc; - var pcd = c * pmb + d * pmd; - var pce = e * pma + f * pmc + pme; - var pcf = e * pmb + f * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * a + csf * c + e; + var psf = cse * b + csf * d + f; + var pca = pma * a + pmb * c; + var pcb = pma * b + pmb * d; + var pcc = pmc * a + pmd * c; + var pcd = pmc * b + pmd * d; + var pce = pme * a + pmf * c + pse; + var pcf = pme * b + pmf * d + psf; a = pca; b = pcb; @@ -28262,8 +28435,14 @@ var TextureTintPipeline = new Class({ d = pcd; e = pce; f = pcf; + + cameraScrollX = 0.0; + cameraScrollY = 0.0; } + var blitterX = blitter.x - cameraScrollX; + var blitterY = blitter.y - cameraScrollY; + for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(length, this.maxQuads); @@ -28355,7 +28534,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] @@ -28395,11 +28574,9 @@ var TextureTintPipeline = new Class({ var y = -sprite.displayOriginY + frame.y + ((frame.height) * (flipY ? 1.0 : 0.0)); var xw = (roundPixels ? (x|0) : x) + width; var yh = (roundPixels ? (y|0) : y) + height; - var translateX = sprite.x - camera.scrollX * sprite.scrollFactorX; - var translateY = sprite.y - camera.scrollY * sprite.scrollFactorY; var scaleX = sprite.scaleX; var scaleY = sprite.scaleY; - var rotation = -sprite.rotation; + var rotation = sprite.rotation; var alphaTL = sprite._alphaTL; var alphaTR = sprite._alphaTR; var alphaBL = sprite._alphaBL; @@ -28411,11 +28588,11 @@ var TextureTintPipeline = new Class({ var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; - var sre = translateX; - var srf = translateY; + var sre = sprite.x; + var srf = sprite.y; var cma = cameraMatrix[0]; var cmb = cameraMatrix[1]; var cmc = cameraMatrix[2]; @@ -28432,12 +28609,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * sprite.scrollFactorX; + var csf = -camera.scrollY * sprite.scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -28447,6 +28629,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * sprite.scrollFactorX; + srf -= camera.scrollY * sprite.scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -28522,7 +28707,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] @@ -28559,16 +28744,16 @@ var TextureTintPipeline = new Class({ var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; - var translateX = mesh.x - camera.scrollX * mesh.scrollFactorX; - var translateY = mesh.y - camera.scrollY * mesh.scrollFactorY; + var translateX = mesh.x; + var translateY = mesh.y; var scaleX = mesh.scaleX; var scaleY = mesh.scaleY; - var rotation = -mesh.rotation; + var rotation = mesh.rotation; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -28589,12 +28774,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * mesh.scrollFactorX; + var csf = -camera.scrollY * mesh.scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -28604,6 +28794,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * mesh.scrollFactorX; + srf -= camera.scrollY * mesh.scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -28645,7 +28838,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] @@ -28728,17 +28921,17 @@ var TextureTintPipeline = new Class({ var vmax = 0; var lastGlyph = null; var lastCharCode = 0; - var translateX = (srcX - cameraScrollX) + frame.x; - var translateY = (srcY - cameraScrollY) + frame.y; - var rotation = -bitmapText.rotation; + var translateX = srcX + frame.x; + var translateY = srcY + frame.y; + var rotation = bitmapText.rotation; var scaleX = bitmapText.scaleX; var scaleY = bitmapText.scaleY; var letterSpacing = bitmapText.letterSpacing; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -28759,12 +28952,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -28774,6 +28972,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -28914,7 +29115,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] @@ -28997,15 +29198,15 @@ var TextureTintPipeline = new Class({ var lastCharCode = 0; var translateX = srcX + frame.x; var translateY = srcY + frame.y; - var rotation = -bitmapText.rotation; + var rotation = bitmapText.rotation; var scaleX = bitmapText.scaleX; var scaleY = bitmapText.scaleY; var letterSpacing = bitmapText.letterSpacing; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -29028,12 +29229,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -29043,6 +29249,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -29161,14 +29370,12 @@ var TextureTintPipeline = new Class({ y -= bitmapText.displayOriginY; x *= scale; y *= scale; - x -= cameraScrollX; - y -= cameraScrollY; - sr = Math.sin(-rotation); - cr = Math.cos(-rotation); + sr = Math.sin(rotation); + cr = Math.cos(rotation); uta = cr * scale; - utb = -sr * scale; - utc = sr * scale; + utb = sr * scale; + utc = -sr * scale; utd = cr * scale; ute = x; utf = y; @@ -29258,7 +29465,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] @@ -29294,7 +29501,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] @@ -29352,7 +29559,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] @@ -29389,7 +29596,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchTexture + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} gameObject - [description] @@ -29454,7 +29661,6 @@ var TextureTintPipeline = new Class({ } flipY = flipY ^ (texture.isRenderTexture ? 1 : 0); - rotation = -rotation; var roundPixels = this.renderer.config.roundPixels; var vertexViewF32 = this.vertexViewF32; @@ -29466,13 +29672,13 @@ var TextureTintPipeline = new Class({ var y = -displayOriginY + ((srcHeight) * (flipY ? 1.0 : 0.0)); var xw = x + width; var yh = y + height; - var translateX = srcX - camera.scrollX * scrollFactorX; - var translateY = srcY - camera.scrollY * scrollFactorY; + var translateX = srcX; + var translateY = srcY; var sr = Math.sin(rotation); var cr = Math.cos(rotation); var sra = cr * scaleX; - var srb = -sr * scaleX; - var src = sr * scaleY; + var srb = sr * scaleX; + var src = -sr * scaleY; var srd = cr * scaleY; var sre = translateX; var srf = translateY; @@ -29492,12 +29698,17 @@ var TextureTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -camera.scrollX * scrollFactorX; + var csf = -camera.scrollY * scrollFactorY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -29507,6 +29718,9 @@ var TextureTintPipeline = new Class({ } else { + sre -= camera.scrollX * scrollFactorX; + srf -= camera.scrollY * scrollFactorY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -29582,7 +29796,7 @@ var TextureTintPipeline = new Class({ /** * Immediately draws a texture with no batching. * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#drawTexture + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawTexture * @since 3.2.0 * * @param {WebGLTexture} texture [description] @@ -29597,7 +29811,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - [description] * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * - * @return {Phaser.Renderer.WebGL.TextureTintPipeline} This Pipeline. + * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This Pipeline. */ drawTexture: function ( texture, @@ -29733,7 +29947,7 @@ var TextureTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.TextureTintPipeline#batchGraphics + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchGraphics * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - [description] @@ -31498,7 +31712,6 @@ var Sprite = __webpack_require__(31); * @extends Phaser.Physics.Arcade.Components.Size * @extends Phaser.Physics.Arcade.Components.Velocity * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.Animation * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip @@ -31896,8 +32109,8 @@ var LIGHT_COUNT = 10; * [description] * * @class ForwardDiffuseLightPipeline - * @extends Phaser.Renderer.WebGL.TextureTintPipeline - * @memberOf Phaser.Renderer.WebGL + * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -31919,10 +32132,11 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onBind + * @override * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline} [description] */ onBind: function () { @@ -31942,13 +32156,13 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#onRender + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender * @since 3.0.0 * * @param {Phaser.Scene} scene - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] * - * @return {Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline} [description] */ onRender: function (scene, camera) { @@ -32002,14 +32216,15 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawStaticTilemapLayer + * @override * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] - * + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function (tilemap, camera, parentTransformMatrix) { var normalTexture = tilemap.texture.dataSource[0]; @@ -32017,26 +32232,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera); + TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. StaticTilemapLayer rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawStaticTilemapLayer(tilemap, camera); + this.renderer.pipelines.TextureTintPipeline.drawStaticTilemapLayer(tilemap, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - drawEmitterManager: function (emitterManager, camera) + drawEmitterManager: function (emitterManager, camera, parentTransformMatrix) { var normalTexture = emitterManager.texture.dataSource[0]; @@ -32044,26 +32260,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera); + TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. EmitterManager rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawEmitterManager(emitterManager, camera); + this.renderer.pipelines.TextureTintPipeline.drawEmitterManager(emitterManager, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - drawBlitter: function (blitter, camera) + drawBlitter: function (blitter, camera, parentTransformMatrix) { var normalTexture = blitter.texture.dataSource[0]; @@ -32071,26 +32288,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera); + TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Blitter rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.drawBlitter(blitter, camera); + this.renderer.pipelines.TextureTintPipeline.drawBlitter(blitter, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchSprite: function (sprite, camera) + batchSprite: function (sprite, camera, parentTransformMatrix) { var normalTexture = sprite.texture.dataSource[0]; @@ -32098,26 +32316,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera); + TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Sprite rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchSprite(sprite, camera); + this.renderer.pipelines.TextureTintPipeline.batchSprite(sprite, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchMesh: function (mesh, camera) + batchMesh: function (mesh, camera, parentTransformMatrix) { var normalTexture = mesh.texture.dataSource[0]; @@ -32125,12 +32344,12 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera); + TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Mesh rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchMesh(mesh, camera); + this.renderer.pipelines.TextureTintPipeline.batchMesh(mesh, camera, parentTransformMatrix); } }, @@ -32138,14 +32357,15 @@ var ForwardDiffuseLightPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchBitmapText: function (bitmapText, camera) + batchBitmapText: function (bitmapText, camera, parentTransformMatrix) { var normalTexture = bitmapText.texture.dataSource[0]; @@ -32153,26 +32373,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera); + TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. BitmapText rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchBitmapText(bitmapText, camera); + this.renderer.pipelines.TextureTintPipeline.batchBitmapText(bitmapText, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchDynamicBitmapText: function (bitmapText, camera) + batchDynamicBitmapText: function (bitmapText, camera, parentTransformMatrix) { var normalTexture = bitmapText.texture.dataSource[0]; @@ -32180,26 +32401,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera); + TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. DynamicBitmapText rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchDynamicBitmapText(bitmapText, camera); + this.renderer.pipelines.TextureTintPipeline.batchDynamicBitmapText(bitmapText, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchText: function (text, camera) + batchText: function (text, camera, parentTransformMatrix) { var normalTexture = text.texture.dataSource[0]; @@ -32207,26 +32429,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchText.call(this, text, camera); + TextureTintPipeline.prototype.batchText.call(this, text, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. Text rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchText(text, camera); + this.renderer.pipelines.TextureTintPipeline.batchText(text, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchDynamicTilemapLayer: function (tilemapLayer, camera) + batchDynamicTilemapLayer: function (tilemapLayer, camera, parentTransformMatrix) { var normalTexture = tilemapLayer.texture.dataSource[0]; @@ -32234,26 +32457,27 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera); + TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. DynamicTilemapLayer rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchDynamicTilemapLayer(tilemapLayer, camera); + this.renderer.pipelines.TextureTintPipeline.batchDynamicTilemapLayer(tilemapLayer, camera, parentTransformMatrix); } }, /** * [description] * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - [description] * */ - batchTileSprite: function (tileSprite, camera) + batchTileSprite: function (tileSprite, camera, parentTransformMatrix) { var normalTexture = tileSprite.texture.dataSource[0]; @@ -32261,12 +32485,12 @@ var ForwardDiffuseLightPipeline = new Class({ { this.renderer.setPipeline(this); this.setTexture2D(normalTexture.glTexture, 1); - TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera); + TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera, parentTransformMatrix); } else { console.warn('Normal map texture missing for using Light2D pipeline. TileSprite rendered with default pipeline.'); - this.renderer.pipelines.TextureTintPipeline.batchTileSprite(tileSprite, camera); + this.renderer.pipelines.TextureTintPipeline.batchTileSprite(tileSprite, camera, parentTransformMatrix); } } @@ -32710,17 +32934,17 @@ module.exports = Random; var Point = __webpack_require__(5); /** - * [description] + * Returns a random point on a given Line. * * @function Phaser.Geom.Line.Random * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Line} line - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. * - * @return {(Phaser.Geom.Point|object)} [description] + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. */ var Random = function (line, out) { @@ -34897,7 +35121,8 @@ var AudioFile = new Class({ /** * [description] * - * @property {AudioContext} context + * @name Phaser.Loader.FileTypes.AudioFile#context + * @type {AudioContext} * @since 3.0.0 */ this.context = audioContext; @@ -35841,7 +36066,7 @@ var ScaleModes = __webpack_require__(55); * @since 3.0.0 * * @param {Phaser.Textures.Texture} texture - The Texture this TextureSource belongs to. - * @param {(Image|HTMLCanvasElement)} source - The source image data. + * @param {(HTMLImageElement|HTMLCanvasElement)} source - The source image data. * @param {integer} [width] - Optional width of the source image. If not given it's derived from the source itself. * @param {integer} [height] - Optional height of the source image. If not given it's derived from the source itself. */ @@ -36046,7 +36271,7 @@ var TextureSource = __webpack_require__(167); * * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to. * @param {string} key - The unique string-based key of this Texture. - * @param {(Image|HTMLCanvasElement)} source - The source that is used to create the texture. Usually an Image, but can also be a Canvas. + * @param {(HTMLImageElement|HTMLCanvasElement)} source - The source that is used to create the texture. Usually an Image, but can also be a Canvas. * @param {number} [width] - The width of the Texture. This is optional and automatically derived from the source images. * @param {number} [height] - The height of the Texture. This is optional and automatically derived from the source images. */ @@ -36362,7 +36587,7 @@ var Texture = new Class({ * @method Phaser.Textures.Texture#setDataSource * @since 3.0.0 * - * @param {(Image|HTMLCanvasElement)} data - The source image. + * @param {(HTMLImageElement|HTMLCanvasElement)} data - The source image. */ setDataSource: function (data) { @@ -38577,7 +38802,7 @@ module.exports = WebAudioSoundManager; var BaseSound = __webpack_require__(72); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @classdesc @@ -40358,7 +40583,7 @@ var Settings = { * @function Phaser.Scenes.Settings.create * @since 3.0.0 * - * @param {(string|Phaser.Scenes.SettingsConfig)} config - [description] + * @param {(string|Phaser.Scenes.Settings.Config)} config - [description] * * @return {Phaser.Scenes.Settings.Object} [description] */ @@ -40445,7 +40670,7 @@ var Systems = __webpack_require__(109); * @constructor * @since 3.0.0 * - * @param {(string|SettingsConfig)} config - Scene specific configuration settings. + * @param {(string|Phaser.Scenes.Settings.Config)} config - Scene specific configuration settings. */ var Scene = new Class({ @@ -41006,7 +41231,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The config for the Scene + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The config for the Scene * @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added. * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`. * @@ -41410,7 +41635,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - The key of the Scene. - * @param {(string|SettingsConfig)} sceneConfig - The Scene config. + * @param {(string|Phaser.Scenes.Settings.Config)} sceneConfig - The Scene config. * * @return {Phaser.Scene} The created Scene. */ @@ -41494,7 +41719,7 @@ var SceneManager = new Class({ * @since 3.0.0 * * @param {string} key - The key to check in the Scene config. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The Scene config. + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The Scene config. * * @return {string} The Scene key. */ @@ -43829,6 +44054,33 @@ var Key = new Class({ * @since 3.0.0 */ this._justUp = false; + }, + + /** + * Resets this Key object back to its default un-pressed state. + * + * @method Phaser.Input.Keyboard.Key.reset + * @since 3.6.0 + * + * @return {Phaser.Input.Keyboard.Key} This Key instance. + */ + reset: function () + { + this.preventDefault = true; + this.enabled = true; + this.isDown = false; + this.isUp = true; + this.altKey = false; + this.ctrlKey = false; + this.shiftKey = false; + this.timeDown = 0; + this.duration = 0; + this.timeUp = 0; + this.repeats = 0; + this._justDown = false; + this._justUp = false; + + return this; } }); @@ -49772,7 +50024,7 @@ var Common = __webpack_require__(45); var Body = __webpack_require__(77); var Bounds = __webpack_require__(134); var Vector = __webpack_require__(115); -var decomp = __webpack_require__(998); +var decomp = __webpack_require__(1000); (function() { @@ -50105,25 +50357,25 @@ var quickselect = __webpack_require__(164); * Spatial index is a special data structure for points and rectangles that allows you to perform queries like * "all items within this bounding box" very efficiently (e.g. hundreds of times faster than looping over all items). * + * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`. + * This is to avoid the eval like function creation that the original library used, which caused CSP policy violations. + * * @class RTree * @memberOf Phaser.Structs * @constructor * @since 3.0.0 */ -function rbush (maxEntries, format) +function rbush (maxEntries) { + var format = [ '.left', '.top', '.right', '.bottom' ]; + if (!(this instanceof rbush)) return new rbush(maxEntries, format); // max entries in a node is 9 by default; min node fill is 40% for best performance this._maxEntries = Math.max(4, maxEntries || 9); this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)); - if (format) - { - this._initFormat(format); - } - this.clear(); } @@ -50554,44 +50806,23 @@ rbush.prototype = { } }, - _initFormat: function (format) + compareMinX: function (a, b) { - // format: [minX, minY, maxX, maxY accessors] - // accessors will be dotted names + return a.left - b.left; + }, - // Because we have historically used eval-based function constructor - // the format accerrsors need to have their leading dots stripped to - // obtain the actual accessor - format = format.map( - function (f) - { - return f.substring(1); - } - ); + compareMinY: function (a, b) + { + return a.top - b.top; + }, - // Do not use string-generated Functions for CSP policies - // Instead a combination of anonymous functions and grabbing properties - // by string is used. - // cf. https://github.com/photonstorm/phaser/issues/3441 - // and https://github.com/photonstorm/phaser/issues/3535 - - var mkCompareFn = function(attr) { - return function(a, b) { - return a[attr] - b[attr]; - }; - }; - - this.compareMinX = mkCompareFn(format[0]); - this.compareMinY = mkCompareFn(format[1]); - - this.toBBox = function(a) - { - return { - minX: a[format[0]], - minY: a[format[1]], - maxX: a[format[2]], - maxY: a[format[3]], - }; + toBBox: function (a) + { + return { + minX: a.left, + minY: a.top, + maxX: a.right, + maxY: a.bottom }; } }; @@ -50714,7 +50945,6 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; - /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { @@ -50942,7 +51172,7 @@ module.exports = ProcessQueue; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); @@ -51045,7 +51275,7 @@ module.exports = TextFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -52569,9 +52799,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var CONST = __webpack_require__(19); var GameObject = __webpack_require__(1); -var Render = __webpack_require__(876); -var RenderTextureCanvas = __webpack_require__(873); -var RenderTextureWebGL = __webpack_require__(872); +var Render = __webpack_require__(879); +var RenderTextureCanvas = __webpack_require__(876); +var RenderTextureWebGL = __webpack_require__(875); /** * @classdesc @@ -52799,7 +53029,7 @@ var GameObject = __webpack_require__(1); var GravityWell = __webpack_require__(435); var List = __webpack_require__(89); var ParticleEmitter = __webpack_require__(433); -var Render = __webpack_require__(880); +var Render = __webpack_require__(883); /** * @classdesc @@ -53544,7 +53774,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var GameObject = __webpack_require__(1); var GetBitmapTextSize = __webpack_require__(452); -var Render = __webpack_require__(885); +var Render = __webpack_require__(888); /** * @typedef {object} DisplayCallbackConfig @@ -53910,7 +54140,7 @@ var DynamicBitmapText = new Class({ * @method Phaser.GameObjects.DynamicBitmapText#toJSON * @since 3.0.0 * - * @return {JSONGameObject.} [description] + * @return {JSONBitmapText} [description] */ toJSON: function () { @@ -53950,7 +54180,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var GameObject = __webpack_require__(1); var Rectangle = __webpack_require__(12); -var Render = __webpack_require__(888); +var Render = __webpack_require__(891); var Union = __webpack_require__(450); var Vector2 = __webpack_require__(6); @@ -53958,11 +54188,6 @@ var Vector2 = __webpack_require__(6); * @classdesc * A Container Game Object. * - * WARNING: EXPERIMENTAL. There are several known cases where Containers will not behave correctly, - * especially if you use a multi-camera or transformed camera set-up. We are still working on them, - * but wanted to release as part of 3.4 under a beta feature flag, because in the main they work - * are and worth getting used to. - * * A Container, as the name implies, can 'contain' other types of Game Object. * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. * By default it will be removed from the Display List and instead added to the Containers own internal list. @@ -53984,8 +54209,10 @@ var Vector2 = __webpack_require__(6); * to use as their hit area. Container children can also be enabled for input, independent of the Container. * * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, - * if Container children are enabled for physics you may get unexpected results,such as offset bodies, - * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0x0. + * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies, + * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children + * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure + * your game to work around this. * * It's important to understand the impact of using Containers. They add additional processing overhead into * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true @@ -55181,8 +55408,8 @@ module.exports = Container; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(892); -var Bob = __webpack_require__(889); +var BlitterRender = __webpack_require__(895); +var Bob = __webpack_require__(892); var Class = __webpack_require__(0); var Components = __webpack_require__(14); var Frame = __webpack_require__(119); @@ -55450,9 +55677,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var GameObject = __webpack_require__(1); var GetBitmapTextSize = __webpack_require__(452); -var ParseFromAtlas = __webpack_require__(897); -var ParseRetroFont = __webpack_require__(896); -var Render = __webpack_require__(895); +var ParseFromAtlas = __webpack_require__(899); +var Render = __webpack_require__(898); /** * @typedef {object} TextBounds @@ -55471,6 +55697,7 @@ var Render = __webpack_require__(895); /** * @typedef {object} JSONBitmapText + * @extends {JSONGameObject} * * @property {string} font - [description] * @property {string} text - [description] @@ -55730,7 +55957,7 @@ var BitmapText = new Class({ * @method Phaser.GameObjects.BitmapText#toJSON * @since 3.0.0 * - * @return {JSONGameObject.} [description] + * @return {JSONBitmapText} [description] */ toJSON: function () { @@ -55752,7 +55979,6 @@ var BitmapText = new Class({ }); -BitmapText.ParseRetroFont = ParseRetroFont; BitmapText.ParseFromAtlas = ParseFromAtlas; module.exports = BitmapText; @@ -56752,7 +56978,7 @@ var pathArray = []; * * @class FlatTintPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -56804,7 +57030,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -56813,7 +57039,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#vertexViewU32 + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#vertexViewU32 * @type {Uint32Array} * @since 3.0.0 */ @@ -56822,7 +57048,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#tempTriangle + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#tempTriangle * @type {array} * @since 3.0.0 */ @@ -56836,7 +57062,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.FlatTintPipeline#polygonCache + * @name Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#polygonCache * @type {array} * @default [] * @since 3.0.0 @@ -56849,10 +57075,10 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.FlatTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} [description] */ onBind: function () { @@ -56865,14 +57091,14 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.FlatTintPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} [description] */ resize: function (width, height, resolution) { @@ -56885,7 +57111,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillRect + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillRect * @since 3.0.0 * * @param {float} srcX - [description] @@ -56968,7 +57194,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillTriangle + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillTriangle * @since 3.0.0 * * @param {float} srcX - [description] @@ -57040,7 +57266,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchStrokeTriangle + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchStrokeTriangle * @since 3.0.0 * * @param {float} srcX - [description] @@ -57102,7 +57328,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchFillPath + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchFillPath * @since 3.0.0 * * @param {float} srcX - [description] @@ -57204,7 +57430,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchStrokePath + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchStrokePath * @since 3.0.0 * * @param {float} srcX - [description] @@ -57297,7 +57523,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchLine + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchLine * @since 3.0.0 * * @param {float} srcX - [description] @@ -57405,7 +57631,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchGraphics + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchGraphics * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - [description] @@ -57427,11 +57653,11 @@ var FlatTintPipeline = new Class({ var cameraScrollX = camera.scrollX * graphics.scrollFactorX; var cameraScrollY = camera.scrollY * graphics.scrollFactorY; - var srcX = graphics.x - cameraScrollX; - var srcY = graphics.y - cameraScrollY; + var srcX = graphics.x; + var srcY = graphics.y; var srcScaleX = graphics.scaleX; var srcScaleY = graphics.scaleY; - var srcRotation = -graphics.rotation; + var srcRotation = graphics.rotation; var commands = graphics.commandBuffer; var alpha = graphics.alpha; var lineAlpha = 1.0; @@ -57459,8 +57685,8 @@ var FlatTintPipeline = new Class({ var sr = sin(srcRotation); var cr = cos(srcRotation); var sra = cr * srcScaleX; - var srb = -sr * srcScaleX; - var src = sr * srcScaleY; + var srb = sr * srcScaleX; + var src = -sr * srcScaleY; var srd = cr * srcScaleY; var sre = srcX; var srf = srcY; @@ -57480,12 +57706,17 @@ var FlatTintPipeline = new Class({ var pmd = parentMatrix[3]; var pme = parentMatrix[4]; var pmf = parentMatrix[5]; - var pca = cma * pma + cmb * pmc; - var pcb = cma * pmb + cmb * pmd; - var pcc = cmc * pma + cmd * pmc; - var pcd = cmc * pmb + cmd * pmd; - var pce = cme * pma + cmf * pmc + pme; - var pcf = cme * pmb + cmf * pmd + pmf; + var cse = -cameraScrollX; + var csf = -cameraScrollY; + var pse = cse * cma + csf * cmc + cme; + var psf = cse * cmb + csf * cmd + cmf; + var pca = pma * cma + pmb * cmc; + var pcb = pma * cmb + pmb * cmd; + var pcc = pmc * cma + pmd * cmc; + var pcd = pmc * cmb + pmd * cmd; + var pce = pme * cma + pmf * cmc + pse; + var pcf = pme * cmb + pmf * cmd + psf; + mva = sra * pca + srb * pcc; mvb = sra * pcb + srb * pcd; mvc = src * pca + srd * pcc; @@ -57495,6 +57726,9 @@ var FlatTintPipeline = new Class({ } else { + sre -= cameraScrollX; + srf -= cameraScrollY; + mva = sra * cma + srb * cmc; mvb = sra * cmb + srb * cmd; mvc = src * cma + srd * cmc; @@ -57837,7 +58071,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawStaticTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawStaticTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] @@ -57850,7 +58084,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawEmitterManager + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawEmitterManager * @since 3.0.0 * * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - [description] @@ -57863,7 +58097,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#drawBlitter + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#drawBlitter * @since 3.0.0 * * @param {Phaser.GameObjects.Blitter} blitter - [description] @@ -57876,7 +58110,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchSprite * @since 3.0.0 * * @param {Phaser.GameObjects.Sprite} sprite - [description] @@ -57889,7 +58123,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchMesh + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchMesh * @since 3.0.0 * * @param {Phaser.GameObjects.Mesh} mesh - [description] @@ -57902,7 +58136,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] @@ -57915,7 +58149,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchDynamicBitmapText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchDynamicBitmapText * @since 3.0.0 * * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] @@ -57928,7 +58162,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchText + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchText * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - [description] @@ -57941,7 +58175,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchDynamicTilemapLayer + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchDynamicTilemapLayer * @since 3.0.0 * * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] @@ -57954,7 +58188,7 @@ var FlatTintPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.FlatTintPipeline#batchTileSprite + * @method Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline#batchTileSprite * @since 3.0.0 * * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] @@ -57991,7 +58225,7 @@ var WebGLPipeline = __webpack_require__(80); * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberOf Phaser.Renderer.WebGL + * @memberOf Phaser.Renderer.WebGL.Pipelines * @constructor * @since 3.0.0 * @@ -58035,7 +58269,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -58044,7 +58278,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#maxQuads + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads * @type {number} * @default 1 * @since 3.0.0 @@ -58054,7 +58288,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @name Phaser.Renderer.WebGL.BitmapMaskPipeline#resolutionDirty + * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty * @type {boolean} * @default true * @since 3.0.0 @@ -58065,10 +58299,10 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind * @since 3.0.0 * - * @return {Phaser.Renderer.WebGL.BitmapMaskPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} [description] */ onBind: function () { @@ -58091,14 +58325,14 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize * @since 3.0.0 * * @param {number} width - [description] * @param {number} height - [description] * @param {number} resolution - [description] * - * @return {Phaser.Renderer.WebGL.BitmapMaskPipeline} [description] + * @return {Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline} [description] */ resize: function (width, height, resolution) { @@ -58110,7 +58344,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#beginMask + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#beginMask * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} mask - [description] @@ -58147,7 +58381,7 @@ var BitmapMaskPipeline = new Class({ /** * [description] * - * @method Phaser.Renderer.WebGL.BitmapMaskPipeline#endMask + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} mask - [description] @@ -68428,7 +68662,7 @@ module.exports = { */ var CONST = __webpack_require__(57); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Tweens @@ -71027,7 +71261,7 @@ module.exports = DynamicTilemapLayer; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(33); var DynamicTilemapLayer = __webpack_require__(303); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var Formats = __webpack_require__(29); var LayerData = __webpack_require__(100); var Rotate = __webpack_require__(337); @@ -71935,7 +72169,7 @@ var Tilemap = new Class({ * on at least one side. * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that * have at least one interesting face. - * @param {LayerData} layer - [description] + * @param {LayerData} [layer] - [description] * * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid. */ @@ -74210,7 +74444,7 @@ module.exports = CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); var FilterMode = __webpack_require__(316); /** @@ -74386,7 +74620,7 @@ var ScenePlugin = new Class({ * The settings of the Scene this ScenePlugin belongs to. * * @name Phaser.Scenes.ScenePlugin#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.0.0 */ this.settings = scene.sys.settings; @@ -74580,7 +74814,7 @@ var ScenePlugin = new Class({ }, /** - * @typedef {object} Phaser.Scenes.ScenePlugin#SceneTransitionConfig + * @typedef {object} Phaser.Scenes.ScenePlugin.SceneTransitionConfig * * @property {string} target - The Scene key to transition to. * @property {integer} [duration=1000] - The duration, in ms, for the transition to last. @@ -74626,7 +74860,7 @@ var ScenePlugin = new Class({ * @method Phaser.Scenes.ScenePlugin#transition * @since 3.5.0 * - * @param {Phaser.Scenes.ScenePlugin#SceneTransitionConfig} config - The transition configuration object. + * @param {Phaser.Scenes.ScenePlugin.SceneTransitionConfig} config - The transition configuration object. * * @return {boolean} `true` is the transition was started, otherwise `false`. */ @@ -74685,7 +74919,7 @@ var ScenePlugin = new Class({ } else { - this.manager.start(key); + this.manager.start(key, GetFastValue(config, 'data')); } this.systems.events.emit('transitionout', target, duration); @@ -74795,7 +75029,7 @@ var ScenePlugin = new Class({ * @since 3.0.0 * * @param {string} key - The Scene key. - * @param {(Phaser.Scene|SettingsConfig|function)} sceneConfig - The config for the Scene. + * @param {(Phaser.Scene|Phaser.Scenes.Settings.Config|function)} sceneConfig - The config for the Scene. * @param {boolean} autoStart - Whether to start the Scene after it's added. * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. @@ -75292,7 +75526,7 @@ module.exports = ScenePlugin; */ var CONST = __webpack_require__(52); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Scenes @@ -79059,7 +79293,7 @@ var World = new Class({ * @type {Phaser.Structs.RTree} * @since 3.0.0 */ - this.tree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]); + this.tree = new RTree(this.maxEntries); /** * [description] @@ -79068,7 +79302,7 @@ var World = new Class({ * @type {Phaser.Structs.RTree} * @since 3.0.0 */ - this.staticTree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]); + this.staticTree = new RTree(this.maxEntries); /** * [description] @@ -80685,9 +80919,9 @@ var StaticPhysicsGroup = new Class({ */ this.world = world; - config.createCallback = this.createCallback; - config.removeCallback = this.removeCallback; - config.createMultipleCallback = this.createMultipleCallback; + config.createCallback = this.createCallbackHandler; + config.removeCallback = this.removeCallbackHandler; + config.createMultipleCallback = this.createMultipleCallbackHandler; config.classType = ArcadeSprite; @@ -80706,12 +80940,12 @@ var StaticPhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.StaticGroup#createCallback + * @method Phaser.Physics.Arcade.StaticGroup#createCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - createCallback: function (child) + createCallbackHandler: function (child) { if (!child.body) { @@ -80722,12 +80956,12 @@ var StaticPhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.StaticGroup#removeCallback + * @method Phaser.Physics.Arcade.StaticGroup#removeCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - removeCallback: function (child) + removeCallbackHandler: function (child) { if (child.body) { @@ -80738,12 +80972,12 @@ var StaticPhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.StaticGroup#createMultipleCallback + * @method Phaser.Physics.Arcade.StaticGroup#createMultipleCallbackHandler * @since 3.0.0 * * @param {object} entries - [description] */ - createMultipleCallback: function () + createMultipleCallbackHandler: function () { this.refresh(); }, @@ -80880,8 +81114,8 @@ var PhysicsGroup = new Class({ */ this.world = world; - config.createCallback = this.createCallback; - config.removeCallback = this.removeCallback; + config.createCallback = this.createCallbackHandler; + config.removeCallback = this.removeCallbackHandler; config.classType = GetFastValue(config, 'classType', ArcadeSprite); @@ -80928,12 +81162,12 @@ var PhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.Group#createCallback + * @method Phaser.Physics.Arcade.Group#createCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - createCallback: function (child) + createCallbackHandler: function (child) { if (!child.body) { @@ -80951,12 +81185,12 @@ var PhysicsGroup = new Class({ /** * [description] * - * @method Phaser.Physics.Arcade.Group#removeCallback + * @method Phaser.Physics.Arcade.Group#removeCallbackHandler * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} child - [description] */ - removeCallback: function (child) + removeCallbackHandler: function (child) { if (child.body) { @@ -81672,7 +81906,7 @@ module.exports = SpriteSheetFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -81784,7 +82018,7 @@ module.exports = ScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -81997,7 +82231,7 @@ FileTypesManager.register('multiatlas', function (key, textureURLs, atlasURLs, t */ var AudioFile = __webpack_require__(158); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(36); @@ -82175,7 +82409,7 @@ var JSONFile = __webpack_require__(36); * @param {string} path - The path of the file. * @param {XHRSettingsObject} [xhrSettings] - Optional file specific XHR settings. * - * @return {Phaser.Loader.FileTypes.AnimationJSONFile} A File instance to be added to the Loader. + * @return {Phaser.Loader.FileTypes.JSONFile} A File instance to be added to the Loader. */ var AnimationJSONFile = function (key, url, path, xhrSettings) { @@ -82522,7 +82756,7 @@ var InputPlugin = new Class({ * [description] * * @name Phaser.Input.InputPlugin#settings - * @type {SettingsObject} + * @type {Phaser.Scenes.Settings.Object} * @since 3.5.0 */ this.settings = scene.sys.settings; @@ -89638,7 +89872,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(14); var DeathZone = __webpack_require__(432); var EdgeZone = __webpack_require__(431); -var EmitterOp = __webpack_require__(881); +var EmitterOp = __webpack_require__(884); var GetFastValue = __webpack_require__(2); var GetRandom = __webpack_require__(139); var HasAny = __webpack_require__(397); @@ -91819,26 +92053,6 @@ var Particle = new Class({ */ this.rotation = 0; - /** - * The horizontal scroll factor of this Particle. - * - * @name Phaser.GameObjects.Particles.Particle#scrollFactorX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.scrollFactorX = 1; - - /** - * The vertical scroll factor of this Particle. - * - * @name Phaser.GameObjects.Particles.Particle#scrollFactorY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.scrollFactorY = 1; - /** * The tint applied to this Particle. * @@ -95416,7 +95630,7 @@ var TimeStep = new Class({ * the TimeStep is actually stopped, not just paused. * * @name Phaser.Boot.TimeStep#running - * @name {boolean} + * @type {boolean} * @readOnly * @default false * @since 3.0.0 @@ -95441,7 +95655,7 @@ var TimeStep = new Class({ * is spiraling out of control. * * @name Phaser.Boot.TimeStep#targetFps - * @name {integer} + * @type {integer} * @default 60 * @since 3.0.0 */ @@ -98939,6 +99153,11 @@ var Game = new Class({ if (this.removeCanvas && this.canvas) { CanvasPool.remove(this.canvas); + + if (this.canvas.parentNode) + { + this.canvas.parentNode.removeChild(this.canvas); + } } this.loop.destroy(); @@ -99898,23 +100117,23 @@ module.exports = ComponentToHex; var Color = __webpack_require__(27); -Color.ColorToRGBA = __webpack_require__(906); +Color.ColorToRGBA = __webpack_require__(908); Color.ComponentToHex = __webpack_require__(525); Color.GetColor = __webpack_require__(144); Color.GetColor32 = __webpack_require__(278); Color.HexStringToColor = __webpack_require__(279); -Color.HSLToColor = __webpack_require__(905); -Color.HSVColorWheel = __webpack_require__(904); +Color.HSLToColor = __webpack_require__(907); +Color.HSVColorWheel = __webpack_require__(906); Color.HSVToRGB = __webpack_require__(523); Color.HueToComponent = __webpack_require__(524); Color.IntegerToColor = __webpack_require__(277); Color.IntegerToRGB = __webpack_require__(276); -Color.Interpolate = __webpack_require__(903); +Color.Interpolate = __webpack_require__(905); Color.ObjectToColor = __webpack_require__(275); -Color.RandomRGB = __webpack_require__(902); +Color.RandomRGB = __webpack_require__(904); Color.RGBStringToColor = __webpack_require__(274); -Color.RGBToHSV = __webpack_require__(901); -Color.RGBToString = __webpack_require__(900); +Color.RGBToHSV = __webpack_require__(903); +Color.RGBToString = __webpack_require__(902); Color.ValueToColor = __webpack_require__(124); module.exports = Color; @@ -100630,7 +100849,7 @@ var LineCurve = new Class({ /** * [description] * - * @property Phaser.Curves.LineCurve#p1 + * @name Phaser.Curves.LineCurve#p1 * @type {Phaser.Math.Vector2} * @since 3.0.0 */ @@ -100744,6 +100963,8 @@ var LineCurve = new Class({ * * @method Phaser.Curves.LineCurve#getTangent * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] * * @return {Phaser.Math.Vector2} [description] */ @@ -101666,7 +101887,7 @@ var CubicBezierCurve = new Class({ * @method Phaser.Curves.CubicBezierCurve#draw * @since 3.0.0 * - * @generic {Phaser.GameObjects.Graphics} G - [out,$return] + * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return] * * @param {Phaser.GameObjects.Graphics} graphics - [description] * @param {integer} [pointsTotal=32] - [description] @@ -104831,7 +105052,7 @@ var Flash = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -105263,7 +105484,7 @@ var Fade = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -109820,55 +110041,55 @@ module.exports = QuickSet; module.exports = { - Angle: __webpack_require__(988), - Call: __webpack_require__(987), - GetFirst: __webpack_require__(986), - GetLast: __webpack_require__(985), - GridAlign: __webpack_require__(984), - IncAlpha: __webpack_require__(983), - IncX: __webpack_require__(982), - IncXY: __webpack_require__(981), - IncY: __webpack_require__(980), - PlaceOnCircle: __webpack_require__(979), - PlaceOnEllipse: __webpack_require__(978), - PlaceOnLine: __webpack_require__(977), - PlaceOnRectangle: __webpack_require__(976), - PlaceOnTriangle: __webpack_require__(975), - PlayAnimation: __webpack_require__(974), + Angle: __webpack_require__(990), + Call: __webpack_require__(989), + GetFirst: __webpack_require__(988), + GetLast: __webpack_require__(987), + GridAlign: __webpack_require__(986), + IncAlpha: __webpack_require__(985), + IncX: __webpack_require__(984), + IncXY: __webpack_require__(983), + IncY: __webpack_require__(982), + PlaceOnCircle: __webpack_require__(981), + PlaceOnEllipse: __webpack_require__(980), + PlaceOnLine: __webpack_require__(979), + PlaceOnRectangle: __webpack_require__(978), + PlaceOnTriangle: __webpack_require__(977), + PlayAnimation: __webpack_require__(976), PropertyValueInc: __webpack_require__(32), PropertyValueSet: __webpack_require__(24), - RandomCircle: __webpack_require__(973), - RandomEllipse: __webpack_require__(972), - RandomLine: __webpack_require__(971), - RandomRectangle: __webpack_require__(970), - RandomTriangle: __webpack_require__(969), - Rotate: __webpack_require__(968), - RotateAround: __webpack_require__(967), - RotateAroundDistance: __webpack_require__(966), - ScaleX: __webpack_require__(965), - ScaleXY: __webpack_require__(964), - ScaleY: __webpack_require__(963), - SetAlpha: __webpack_require__(962), - SetBlendMode: __webpack_require__(961), - SetDepth: __webpack_require__(960), - SetHitArea: __webpack_require__(959), - SetOrigin: __webpack_require__(958), - SetRotation: __webpack_require__(957), - SetScale: __webpack_require__(956), - SetScaleX: __webpack_require__(955), - SetScaleY: __webpack_require__(954), - SetTint: __webpack_require__(953), - SetVisible: __webpack_require__(952), - SetX: __webpack_require__(951), - SetXY: __webpack_require__(950), - SetY: __webpack_require__(949), - ShiftPosition: __webpack_require__(948), - Shuffle: __webpack_require__(947), - SmootherStep: __webpack_require__(946), - SmoothStep: __webpack_require__(945), - Spread: __webpack_require__(944), - ToggleVisible: __webpack_require__(943), - WrapInRectangle: __webpack_require__(942) + RandomCircle: __webpack_require__(975), + RandomEllipse: __webpack_require__(974), + RandomLine: __webpack_require__(973), + RandomRectangle: __webpack_require__(972), + RandomTriangle: __webpack_require__(971), + Rotate: __webpack_require__(970), + RotateAround: __webpack_require__(969), + RotateAroundDistance: __webpack_require__(968), + ScaleX: __webpack_require__(967), + ScaleXY: __webpack_require__(966), + ScaleY: __webpack_require__(965), + SetAlpha: __webpack_require__(964), + SetBlendMode: __webpack_require__(963), + SetDepth: __webpack_require__(962), + SetHitArea: __webpack_require__(961), + SetOrigin: __webpack_require__(960), + SetRotation: __webpack_require__(959), + SetScale: __webpack_require__(958), + SetScaleX: __webpack_require__(957), + SetScaleY: __webpack_require__(956), + SetTint: __webpack_require__(955), + SetVisible: __webpack_require__(954), + SetX: __webpack_require__(953), + SetXY: __webpack_require__(952), + SetY: __webpack_require__(951), + ShiftPosition: __webpack_require__(950), + Shuffle: __webpack_require__(949), + SmootherStep: __webpack_require__(948), + SmoothStep: __webpack_require__(947), + Spread: __webpack_require__(946), + ToggleVisible: __webpack_require__(945), + WrapInRectangle: __webpack_require__(944) }; @@ -110526,18 +110747,18 @@ module.exports = Pair; module.exports = { - Bounce: __webpack_require__(1027), - Collision: __webpack_require__(1026), - Force: __webpack_require__(1025), - Friction: __webpack_require__(1024), - Gravity: __webpack_require__(1023), - Mass: __webpack_require__(1022), - Static: __webpack_require__(1021), - Sensor: __webpack_require__(1020), - SetBody: __webpack_require__(1019), - Sleep: __webpack_require__(1018), - Transform: __webpack_require__(1017), - Velocity: __webpack_require__(1016) + Bounce: __webpack_require__(1029), + Collision: __webpack_require__(1028), + Force: __webpack_require__(1027), + Friction: __webpack_require__(1026), + Gravity: __webpack_require__(1025), + Mass: __webpack_require__(1024), + Static: __webpack_require__(1023), + Sensor: __webpack_require__(1022), + SetBody: __webpack_require__(1021), + Sleep: __webpack_require__(1020), + Transform: __webpack_require__(1019), + Velocity: __webpack_require__(1018) }; @@ -110766,7 +110987,7 @@ module.exports = GetMinMaxValue; module.exports = { Clone: __webpack_require__(47), - Extend: __webpack_require__(17), + Extend: __webpack_require__(16), GetAdvancedValue: __webpack_require__(8), GetFastValue: __webpack_require__(2), GetMinMaxValue: __webpack_require__(604), @@ -111385,7 +111606,7 @@ module.exports = ParseTileLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * Copy properties from tileset to tiles. @@ -114382,34 +114603,34 @@ var Common = __webpack_require__(45); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Matter = __webpack_require__(994); +var Matter = __webpack_require__(996); Matter.Body = __webpack_require__(77); Matter.Composite = __webpack_require__(210); Matter.World = __webpack_require__(661); Matter.Detector = __webpack_require__(665); -Matter.Grid = __webpack_require__(993); -Matter.Pairs = __webpack_require__(992); +Matter.Grid = __webpack_require__(995); +Matter.Pairs = __webpack_require__(994); Matter.Pair = __webpack_require__(597); -Matter.Query = __webpack_require__(1014); -Matter.Resolver = __webpack_require__(991); +Matter.Query = __webpack_require__(1016); +Matter.Resolver = __webpack_require__(993); Matter.SAT = __webpack_require__(664); Matter.Constraint = __webpack_require__(293); Matter.Common = __webpack_require__(45); -Matter.Engine = __webpack_require__(990); +Matter.Engine = __webpack_require__(992); Matter.Events = __webpack_require__(294); Matter.Sleeping = __webpack_require__(322); Matter.Plugin = __webpack_require__(662); Matter.Bodies = __webpack_require__(211); -Matter.Composites = __webpack_require__(997); +Matter.Composites = __webpack_require__(999); Matter.Axes = __webpack_require__(667); Matter.Bounds = __webpack_require__(134); -Matter.Svg = __webpack_require__(1012); +Matter.Svg = __webpack_require__(1014); Matter.Vector = __webpack_require__(115); Matter.Vertices = __webpack_require__(135); @@ -115226,18 +115447,18 @@ var Common = __webpack_require__(45); module.exports = { - Acceleration: __webpack_require__(1045), - BodyScale: __webpack_require__(1044), - BodyType: __webpack_require__(1043), - Bounce: __webpack_require__(1042), - CheckAgainst: __webpack_require__(1041), - Collides: __webpack_require__(1040), - Debug: __webpack_require__(1039), - Friction: __webpack_require__(1038), - Gravity: __webpack_require__(1037), - Offset: __webpack_require__(1036), - SetGameObject: __webpack_require__(1035), - Velocity: __webpack_require__(1034) + Acceleration: __webpack_require__(1047), + BodyScale: __webpack_require__(1046), + BodyType: __webpack_require__(1045), + Bounce: __webpack_require__(1044), + CheckAgainst: __webpack_require__(1043), + Collides: __webpack_require__(1042), + Debug: __webpack_require__(1041), + Friction: __webpack_require__(1040), + Gravity: __webpack_require__(1039), + Offset: __webpack_require__(1038), + SetGameObject: __webpack_require__(1037), + Velocity: __webpack_require__(1036) }; @@ -117285,7 +117506,7 @@ module.exports = ArcadePhysics; */ var CONST = __webpack_require__(64); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @callback ArcadePhysicsCallback @@ -118792,7 +119013,7 @@ module.exports = { */ var CONST = __webpack_require__(15); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Math @@ -118879,7 +119100,7 @@ module.exports = PhaserMath; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var CustomSet = __webpack_require__(75); var EventEmitter = __webpack_require__(9); var FileTypesManager = __webpack_require__(7); @@ -120115,7 +120336,7 @@ module.exports = TilemapJSONFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var TILEMAP_FORMATS = __webpack_require__(29); @@ -120222,7 +120443,7 @@ module.exports = TilemapCSVFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -120377,7 +120598,7 @@ module.exports = SVGFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -120541,7 +120762,7 @@ module.exports = HTMLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -120725,7 +120946,7 @@ module.exports = BitmapFontFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(16); +var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(2); @@ -120894,8 +121115,8 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(16); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Loader @@ -126070,8 +126291,6 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size var Container = __webpack_require__(243); var GameObjectFactory = __webpack_require__(11); -var hasWarned = false; - /** * Creates a new Container Game Object and adds it to the Scene. * @@ -126088,12 +126307,6 @@ var hasWarned = false; */ GameObjectFactory.register('container', function (x, y, children) { - if (!hasWarned) - { - console.warn('Use of a beta feature: Containers'); - hasWarned = true; - } - return this.displayList.add(new Container(this.scene, x, y, children)); }); @@ -126340,6 +126553,275 @@ module.exports = { /***/ }), /* 872 */ +/***/ (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 GetValue = __webpack_require__(4); + +/** + * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor + * and create a BitmapText object using a fixed-width retro font. + * + * @function Phaser.GameObjects.RetroFont.Parse + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - A reference to the Phaser Scene. + * @param {Phaser.GameObjects.RetroFont.Config} config - The font configuration object. + */ +var ParseRetroFont = function (scene, config) +{ + var w = config.width; + var h = config.height; + var cx = Math.floor(w / 2); + var cy = Math.floor(h / 2); + var letters = GetValue(config, 'chars', ''); + + if (letters === '') + { + return; + } + + var key = GetValue(config, 'image', ''); + var offsetX = GetValue(config, 'offset.x', 0); + var offsetY = GetValue(config, 'offset.y', 0); + var spacingX = GetValue(config, 'spacing.x', 0); + var spacingY = GetValue(config, 'spacing.y', 0); + + var charsPerRow = GetValue(config, 'charsPerRow', null); + + if (charsPerRow === null) + { + charsPerRow = scene.sys.textures.getFrame(key).width / w; + + if (charsPerRow > letters.length) + { + charsPerRow = letters.length; + } + } + + var x = offsetX; + var y = offsetY; + + var data = { + retroFont: true, + font: key, + size: w, + lineHeight: h, + chars: {} + }; + + var r = 0; + + for (var i = 0; i < letters.length; i++) + { + // var node = letters[i]; + + var charCode = letters.charCodeAt(i); + + data.chars[charCode] = + { + x: x, + y: y, + width: w, + height: h, + centerX: cx, + centerY: cy, + xOffset: 0, + yOffset: 0, + xAdvance: w, + data: {}, + kerning: {} + }; + + r++; + + if (r === charsPerRow) + { + r = 0; + x = offsetX; + y += h + spacingY; + } + else + { + x += w + spacingX; + } + } + + var entry = { + data: data, + frame: null, + texture: key + }; + + return entry; +}; + +module.exports = ParseRetroFont; + + +/***/ }), +/* 873 */ +/***/ (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 RETRO_FONT_CONST = { + + /** + * Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET1 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET1: ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~', + + /** + * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET2 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET2: ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ', + + /** + * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET3 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET3: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ', + + /** + * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET4 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET4: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789', + + /** + * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET5 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET5: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789', + + /** + * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET6 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET6: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' ', + + /** + * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET7 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET7: 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39', + + /** + * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET8 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET8: '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ', + + /** + * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET9 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET9: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!', + + /** + * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET10 + * @type {string} + * @since 3.6.0 + */ + TEXT_SET10: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + + /** + * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 + * + * @name Phaser.GameObjects.RetroFont.TEXT_SET11 + * @since 3.6.0 + * @type {string} + */ + TEXT_SET11: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789' + +}; + +module.exports = RETRO_FONT_CONST; + + +/***/ }), +/* 874 */ +/***/ (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 RETRO_FONT_CONST = __webpack_require__(873); +var Extend = __webpack_require__(16); + +/** + * @typedef {object} Phaser.GameObjects.RetroFont.Config + * + * @property {string} image - [description] + * @property {number} offset.x - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. + * @property {number} offset.y - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. + * @property {number} width - The width of each character in the font set. + * @property {number} height - The height of each character in the font set. + * @property {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. + * @property {number} charsPerRow - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. + * @property {number} spacing.x - If the characters in the font set have horizontal spacing between them set the required amount here. + * @property {number} spacing.y - If the characters in the font set have vertical spacing between them set the required amount here. +*/ + +/** + * @namespace Phaser.GameObjects.RetroFont + * @since 3.6.0 + */ + +var RetroFont = { Parse: __webpack_require__(872) }; + +// Merge in the consts +RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); + +module.exports = RetroFont; + + +/***/ }), +/* 875 */ /***/ (function(module, exports) { var RenderTextureWebGL = { @@ -126386,7 +126868,7 @@ module.exports = RenderTextureWebGL; /***/ }), -/* 873 */ +/* 876 */ /***/ (function(module, exports) { var RenderTextureCanvas = { @@ -126428,7 +126910,7 @@ module.exports = RenderTextureCanvas; /***/ }), -/* 874 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126524,7 +127006,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 875 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126581,7 +127063,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 876 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126595,12 +127077,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(875); + renderWebGL = __webpack_require__(878); } if (true) { - renderCanvas = __webpack_require__(874); + renderCanvas = __webpack_require__(877); } module.exports = { @@ -126612,7 +127094,7 @@ module.exports = { /***/ }), -/* 877 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126635,7 +127117,7 @@ module.exports = { /***/ }), -/* 878 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126725,8 +127207,8 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, interpol var x = -ox; var y = -oy; - var tx = particle.x - cameraScrollX * particle.scrollFactorX; - var ty = particle.y - cameraScrollY * particle.scrollFactorY; + var tx = particle.x - cameraScrollX; + var ty = particle.y - cameraScrollY; if (roundPixels) { @@ -126759,7 +127241,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 879 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126801,7 +127283,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 880 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126815,12 +127297,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(879); + renderWebGL = __webpack_require__(882); } if (true) { - renderCanvas = __webpack_require__(878); + renderCanvas = __webpack_require__(881); } module.exports = { @@ -126832,7 +127314,7 @@ module.exports = { /***/ }), -/* 881 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127429,7 +127911,7 @@ module.exports = EmitterOp; /***/ }), -/* 882 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127448,13 +127930,13 @@ module.exports = { Particle: __webpack_require__(434), ParticleEmitter: __webpack_require__(433), ParticleEmitterManager: __webpack_require__(227), - Zones: __webpack_require__(877) + Zones: __webpack_require__(880) }; /***/ }), -/* 883 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127666,7 +128148,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 884 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127709,7 +128191,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 885 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127723,12 +128205,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(884); + renderWebGL = __webpack_require__(887); } if (true) { - renderCanvas = __webpack_require__(883); + renderCanvas = __webpack_require__(886); } module.exports = { @@ -127740,7 +128222,7 @@ module.exports = { /***/ }), -/* 886 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127813,7 +128295,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 887 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127886,7 +128368,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 888 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127901,12 +128383,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(887); + renderWebGL = __webpack_require__(890); } if (true) { - renderCanvas = __webpack_require__(886); + renderCanvas = __webpack_require__(889); } module.exports = { @@ -127918,7 +128400,7 @@ module.exports = { /***/ }), -/* 889 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128263,7 +128745,7 @@ module.exports = Bob; /***/ }), -/* 890 */ +/* 893 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128357,7 +128839,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 891 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128397,7 +128879,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 892 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128411,12 +128893,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(891); + renderWebGL = __webpack_require__(894); } if (true) { - renderCanvas = __webpack_require__(890); + renderCanvas = __webpack_require__(893); } module.exports = { @@ -128428,7 +128910,7 @@ module.exports = { /***/ }), -/* 893 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128616,7 +129098,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 894 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128659,7 +129141,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 895 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128673,12 +129155,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(894); + renderWebGL = __webpack_require__(897); } if (true) { - renderCanvas = __webpack_require__(893); + renderCanvas = __webpack_require__(896); } module.exports = { @@ -128690,209 +129172,7 @@ module.exports = { /***/ }), -/* 896 */ -/***/ (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 GetValue = __webpack_require__(4); - -// * @param {number} characterWidth - The width of each character in the font set. -// * @param {number} characterHeight - The height of each character in the font set. -// * @param {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. -// * @param {number} [charsPerRow] - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. -// * @param {number} [xSpacing=0] - If the characters in the font set have horizontal spacing between them set the required amount here. -// * @param {number} [ySpacing=0] - If the characters in the font set have vertical spacing between them set the required amount here. -// * @param {number} [xOffset=0] - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. -// * @param {number} [yOffset=0] - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. -// Phaser.GameObject.RetroFont = function (game, key, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset) - -// { -// image: key, -// width: 32, -// height: 32, -// chars: 'string', -// charsPerRow: null, -// spacing: { x: 0, y: 0 }, -// offset: { x: 0, y: 0 } -// } - -/** - * [description] - * - * @function ParseRetroFont - * @since 3.0.0 - * @private - */ -var ParseRetroFont = function (scene, config) -{ - var w = config.width; - var h = config.height; - var cx = Math.floor(w / 2); - var cy = Math.floor(h / 2); - var letters = config.chars; - - var key = GetValue(config, 'image', ''); - var offsetX = GetValue(config, 'offset.x', 0); - var offsetY = GetValue(config, 'offset.y', 0); - var spacingX = GetValue(config, 'spacing.x', 0); - var spacingY = GetValue(config, 'spacing.y', 0); - - var charsPerRow = GetValue(config, 'charsPerRow', null); - - if (charsPerRow === null) - { - charsPerRow = scene.sys.textures.getFrame(key).width / w; - - if (charsPerRow > letters.length) - { - charsPerRow = letters.length; - } - } - - var x = offsetX; - var y = offsetY; - - var data = { - retroFont: true, - font: key, - size: w, - lineHeight: h, - chars: {} - }; - - var r = 0; - - for (var i = 0; i < letters.length; i++) - { - // var node = letters[i]; - - var charCode = letters.charCodeAt(i); - - data.chars[charCode] = - { - x: x, - y: y, - width: w, - height: h, - centerX: cx, - centerY: cy, - xOffset: 0, - yOffset: 0, - xAdvance: w, - data: {}, - kerning: {} - }; - - r++; - - if (r === charsPerRow) - { - r = 0; - x = offsetX; - y += h + spacingY; - } - else - { - x += w + spacingX; - } - } - - var entry = { - data: data, - frame: null, - texture: key - }; - - return entry; -}; - -/** -* Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET1 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - -/** -* Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET2 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - -/** -* Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '; - -/** -* Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789'; - -/** -* Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789'; - -/** -* Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' '; - -/** -* Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET7 = 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39'; - -/** -* Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET8 = '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - -/** -* Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET9 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!'; - -/** -* Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET10 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - -/** -* Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 -* @constant -* @type {string} -*/ -ParseRetroFont.TEXT_SET11 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789'; - -module.exports = ParseRetroFont; - - -/***/ }), -/* 897 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128933,7 +129213,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 898 */ +/* 900 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128965,9 +129245,10 @@ var GameObjects = { Graphics: __webpack_require__(107), Group: __webpack_require__(104), Image: __webpack_require__(66), - Particles: __webpack_require__(882), + Particles: __webpack_require__(885), PathFollower: __webpack_require__(395), RenderTexture: __webpack_require__(226), + RetroFont: __webpack_require__(874), Sprite3D: __webpack_require__(143), Sprite: __webpack_require__(31), Text: __webpack_require__(102), @@ -129035,7 +129316,7 @@ module.exports = GameObjects; /***/ }), -/* 899 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129060,7 +129341,7 @@ module.exports = { /***/ }), -/* 900 */ +/* 902 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129104,7 +129385,7 @@ module.exports = RGBToString; /***/ }), -/* 901 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -129176,7 +129457,7 @@ module.exports = RGBToHSV; /***/ }), -/* 902 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129212,7 +129493,7 @@ module.exports = RandomRGB; /***/ }), -/* 903 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129315,7 +129596,7 @@ module.exports = { /***/ }), -/* 904 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129356,7 +129637,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 905 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129406,7 +129687,7 @@ module.exports = HSLToColor; /***/ }), -/* 906 */ +/* 908 */ /***/ (function(module, exports) { /** @@ -129446,7 +129727,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 907 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -129493,7 +129774,7 @@ module.exports = UserSelect; /***/ }), -/* 908 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -129528,7 +129809,7 @@ module.exports = TouchAction; /***/ }), -/* 909 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129546,14 +129827,14 @@ module.exports = { Interpolation: __webpack_require__(266), Pool: __webpack_require__(22), Smoothing: __webpack_require__(123), - TouchAction: __webpack_require__(908), - UserSelect: __webpack_require__(907) + TouchAction: __webpack_require__(910), + UserSelect: __webpack_require__(909) }; /***/ }), -/* 910 */ +/* 912 */ /***/ (function(module, exports) { /** @@ -129583,7 +129864,7 @@ module.exports = GetOffsetY; /***/ }), -/* 911 */ +/* 913 */ /***/ (function(module, exports) { /** @@ -129613,7 +129894,7 @@ module.exports = GetOffsetX; /***/ }), -/* 912 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129633,8 +129914,8 @@ module.exports = { GetCenterX: __webpack_require__(87), GetCenterY: __webpack_require__(84), GetLeft: __webpack_require__(42), - GetOffsetX: __webpack_require__(911), - GetOffsetY: __webpack_require__(910), + GetOffsetX: __webpack_require__(913), + GetOffsetY: __webpack_require__(912), GetRight: __webpack_require__(40), GetTop: __webpack_require__(38), SetBottom: __webpack_require__(43), @@ -129648,7 +129929,7 @@ module.exports = { /***/ }), -/* 913 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129692,7 +129973,7 @@ module.exports = TopRight; /***/ }), -/* 914 */ +/* 916 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129736,7 +130017,7 @@ module.exports = TopLeft; /***/ }), -/* 915 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129780,7 +130061,7 @@ module.exports = TopCenter; /***/ }), -/* 916 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129824,7 +130105,7 @@ module.exports = RightTop; /***/ }), -/* 917 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129868,7 +130149,7 @@ module.exports = RightCenter; /***/ }), -/* 918 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129912,7 +130193,7 @@ module.exports = RightBottom; /***/ }), -/* 919 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129956,7 +130237,7 @@ module.exports = LeftTop; /***/ }), -/* 920 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130000,7 +130281,7 @@ module.exports = LeftCenter; /***/ }), -/* 921 */ +/* 923 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130044,7 +130325,7 @@ module.exports = LeftBottom; /***/ }), -/* 922 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130088,7 +130369,7 @@ module.exports = BottomRight; /***/ }), -/* 923 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130132,7 +130413,7 @@ module.exports = BottomLeft; /***/ }), -/* 924 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130176,7 +130457,7 @@ module.exports = BottomCenter; /***/ }), -/* 925 */ +/* 927 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130191,24 +130472,24 @@ module.exports = BottomCenter; module.exports = { - BottomCenter: __webpack_require__(924), - BottomLeft: __webpack_require__(923), - BottomRight: __webpack_require__(922), - LeftBottom: __webpack_require__(921), - LeftCenter: __webpack_require__(920), - LeftTop: __webpack_require__(919), - RightBottom: __webpack_require__(918), - RightCenter: __webpack_require__(917), - RightTop: __webpack_require__(916), - TopCenter: __webpack_require__(915), - TopLeft: __webpack_require__(914), - TopRight: __webpack_require__(913) + BottomCenter: __webpack_require__(926), + BottomLeft: __webpack_require__(925), + BottomRight: __webpack_require__(924), + LeftBottom: __webpack_require__(923), + LeftCenter: __webpack_require__(922), + LeftTop: __webpack_require__(921), + RightBottom: __webpack_require__(920), + RightCenter: __webpack_require__(919), + RightTop: __webpack_require__(918), + TopCenter: __webpack_require__(917), + TopLeft: __webpack_require__(916), + TopRight: __webpack_require__(915) }; /***/ }), -/* 926 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130238,7 +130519,7 @@ module.exports = { /***/ }), -/* 927 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130248,7 +130529,7 @@ module.exports = { */ var CONST = __webpack_require__(291); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser.Display.Align @@ -130256,8 +130537,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(926), - To: __webpack_require__(925) + In: __webpack_require__(928), + To: __webpack_require__(927) }; @@ -130268,7 +130549,7 @@ module.exports = Align; /***/ }), -/* 928 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130283,9 +130564,9 @@ module.exports = Align; module.exports = { - Align: __webpack_require__(927), - Bounds: __webpack_require__(912), - Canvas: __webpack_require__(909), + Align: __webpack_require__(929), + Bounds: __webpack_require__(914), + Canvas: __webpack_require__(911), Color: __webpack_require__(526), Masks: __webpack_require__(522) @@ -130293,7 +130574,7 @@ module.exports = { /***/ }), -/* 929 */ +/* 931 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130433,7 +130714,7 @@ module.exports = MoveTo; /***/ }), -/* 930 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130449,7 +130730,7 @@ var CubicBezierCurve = __webpack_require__(535); var EllipseCurve = __webpack_require__(533); var GameObjectFactory = __webpack_require__(11); var LineCurve = __webpack_require__(532); -var MovePathTo = __webpack_require__(929); +var MovePathTo = __webpack_require__(931); var QuadraticBezierCurve = __webpack_require__(531); var Rectangle = __webpack_require__(12); var SplineCurve = __webpack_require__(529); @@ -131261,7 +131542,7 @@ module.exports = Path; /***/ }), -/* 931 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131282,7 +131563,7 @@ module.exports = Path; */ module.exports = { - Path: __webpack_require__(930), + Path: __webpack_require__(932), CubicBezier: __webpack_require__(535), Curve: __webpack_require__(81), @@ -131294,7 +131575,7 @@ module.exports = { /***/ }), -/* 932 */ +/* 934 */ /***/ (function(module, exports) { /** @@ -131332,7 +131613,7 @@ module.exports = { /***/ }), -/* 933 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -131370,7 +131651,7 @@ module.exports = { /***/ }), -/* 934 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -131408,7 +131689,7 @@ module.exports = { /***/ }), -/* 935 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -131446,7 +131727,7 @@ module.exports = { /***/ }), -/* 936 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131483,16 +131764,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(269), - C64: __webpack_require__(935), - CGA: __webpack_require__(934), - JMP: __webpack_require__(933), - MSX: __webpack_require__(932) + C64: __webpack_require__(937), + CGA: __webpack_require__(936), + JMP: __webpack_require__(935), + MSX: __webpack_require__(934) }; /***/ }), -/* 937 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131508,13 +131789,13 @@ module.exports = { module.exports = { GenerateTexture: __webpack_require__(270), - Palettes: __webpack_require__(936) + Palettes: __webpack_require__(938) }; /***/ }), -/* 938 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131798,7 +132079,7 @@ module.exports = CameraManager; /***/ }), -/* 939 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131814,7 +132095,7 @@ module.exports = CameraManager; module.exports = { Camera: __webpack_require__(273), - CameraManager: __webpack_require__(938), + CameraManager: __webpack_require__(940), OrthographicCamera: __webpack_require__(537), PerspectiveCamera: __webpack_require__(536) @@ -131822,7 +132103,7 @@ module.exports = { /***/ }), -/* 940 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131863,7 +132144,7 @@ module.exports = { /***/ }), -/* 941 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131878,15 +132159,15 @@ module.exports = { module.exports = { - Controls: __webpack_require__(940), + Controls: __webpack_require__(942), Scene2D: __webpack_require__(550), - Sprite3D: __webpack_require__(939) + Sprite3D: __webpack_require__(941) }; /***/ }), -/* 942 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131935,7 +132216,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 943 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -131970,7 +132251,7 @@ module.exports = ToggleVisible; /***/ }), -/* 944 */ +/* 946 */ /***/ (function(module, exports) { /** @@ -132024,7 +132305,7 @@ module.exports = Spread; /***/ }), -/* 945 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132080,7 +132361,7 @@ module.exports = SmoothStep; /***/ }), -/* 946 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132136,7 +132417,7 @@ module.exports = SmootherStep; /***/ }), -/* 947 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132169,7 +132450,7 @@ module.exports = Shuffle; /***/ }), -/* 948 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132297,7 +132578,7 @@ module.exports = ShiftPosition; /***/ }), -/* 949 */ +/* 951 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132338,7 +132619,7 @@ module.exports = SetY; /***/ }), -/* 950 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132385,7 +132666,7 @@ module.exports = SetXY; /***/ }), -/* 951 */ +/* 953 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132426,7 +132707,7 @@ module.exports = SetX; /***/ }), -/* 952 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132464,7 +132745,7 @@ module.exports = SetVisible; /***/ }), -/* 953 */ +/* 955 */ /***/ (function(module, exports) { /** @@ -132503,7 +132784,7 @@ module.exports = SetTint; /***/ }), -/* 954 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132544,7 +132825,7 @@ module.exports = SetScaleY; /***/ }), -/* 955 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132585,7 +132866,7 @@ module.exports = SetScaleX; /***/ }), -/* 956 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132632,7 +132913,7 @@ module.exports = SetScale; /***/ }), -/* 957 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132673,7 +132954,7 @@ module.exports = SetRotation; /***/ }), -/* 958 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132720,7 +133001,7 @@ module.exports = SetOrigin; /***/ }), -/* 959 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -132757,7 +133038,7 @@ module.exports = SetHitArea; /***/ }), -/* 960 */ +/* 962 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132798,7 +133079,7 @@ module.exports = SetDepth; /***/ }), -/* 961 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132838,7 +133119,7 @@ module.exports = SetBlendMode; /***/ }), -/* 962 */ +/* 964 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132879,7 +133160,7 @@ module.exports = SetAlpha; /***/ }), -/* 963 */ +/* 965 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132920,7 +133201,7 @@ module.exports = ScaleY; /***/ }), -/* 964 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132967,7 +133248,7 @@ module.exports = ScaleXY; /***/ }), -/* 965 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133008,7 +133289,7 @@ module.exports = ScaleX; /***/ }), -/* 966 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133057,7 +133338,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 967 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133103,7 +133384,7 @@ module.exports = RotateAround; /***/ }), -/* 968 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133144,7 +133425,7 @@ module.exports = Rotate; /***/ }), -/* 969 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133182,7 +133463,7 @@ module.exports = RandomTriangle; /***/ }), -/* 970 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133220,7 +133501,7 @@ module.exports = RandomRectangle; /***/ }), -/* 971 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133258,7 +133539,7 @@ module.exports = RandomLine; /***/ }), -/* 972 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133296,7 +133577,7 @@ module.exports = RandomEllipse; /***/ }), -/* 973 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133334,7 +133615,7 @@ module.exports = RandomCircle; /***/ }), -/* 974 */ +/* 976 */ /***/ (function(module, exports) { /** @@ -133344,7 +133625,7 @@ module.exports = RandomCircle; */ /** - * [description] + * Play an animation with the given key, starting at the given startFrame on all Game Objects in items. * * @function Phaser.Actions.PlayAnimation * @since 3.0.0 @@ -133352,8 +133633,8 @@ module.exports = RandomCircle; * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] * * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action. - * @param {string} key - [description] - * @param {(string|integer)} [startFrame] - [description] + * @param {string} key - The name of the animation to play. + * @param {(string|integer)} [startFrame] - The starting frame of the animation with the given key. * * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action. */ @@ -133371,7 +133652,7 @@ module.exports = PlayAnimation; /***/ }), -/* 975 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133431,7 +133712,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 976 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133492,7 +133773,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 977 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133536,7 +133817,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 978 */ +/* 980 */ /***/ (function(module, exports) { /** @@ -133586,7 +133867,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 979 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -133633,7 +133914,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 980 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133674,7 +133955,7 @@ module.exports = IncY; /***/ }), -/* 981 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133721,7 +134002,7 @@ module.exports = IncXY; /***/ }), -/* 982 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133762,7 +134043,7 @@ module.exports = IncX; /***/ }), -/* 983 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133803,7 +134084,7 @@ module.exports = IncAlpha; /***/ }), -/* 984 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133927,7 +134208,7 @@ module.exports = GridAlign; /***/ }), -/* 985 */ +/* 987 */ /***/ (function(module, exports) { /** @@ -133985,7 +134266,7 @@ module.exports = GetLast; /***/ }), -/* 986 */ +/* 988 */ /***/ (function(module, exports) { /** @@ -134043,7 +134324,7 @@ module.exports = GetFirst; /***/ }), -/* 987 */ +/* 989 */ /***/ (function(module, exports) { /** @@ -134088,7 +134369,7 @@ module.exports = Call; /***/ }), -/* 988 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134129,7 +134410,7 @@ module.exports = Angle; /***/ }), -/* 989 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134142,7 +134423,7 @@ var Bodies = __webpack_require__(211); var Class = __webpack_require__(0); var Common = __webpack_require__(45); var Composite = __webpack_require__(210); -var Engine = __webpack_require__(990); +var Engine = __webpack_require__(992); var EventEmitter = __webpack_require__(9); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(4); @@ -135044,7 +135325,7 @@ module.exports = World; /***/ }), -/* 990 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135063,10 +135344,10 @@ module.exports = Engine; var World = __webpack_require__(661); var Sleeping = __webpack_require__(322); -var Resolver = __webpack_require__(991); -var Pairs = __webpack_require__(992); -var Metrics = __webpack_require__(1013); -var Grid = __webpack_require__(993); +var Resolver = __webpack_require__(993); +var Pairs = __webpack_require__(994); +var Metrics = __webpack_require__(1015); +var Grid = __webpack_require__(995); var Events = __webpack_require__(294); var Composite = __webpack_require__(210); var Constraint = __webpack_require__(293); @@ -135559,7 +135840,7 @@ var Body = __webpack_require__(77); /***/ }), -/* 991 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135916,7 +136197,7 @@ var Bounds = __webpack_require__(134); /***/ }), -/* 992 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136081,7 +136362,7 @@ var Common = __webpack_require__(45); /***/ }), -/* 993 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136408,7 +136689,7 @@ var Common = __webpack_require__(45); /***/ }), -/* 994 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136500,7 +136781,7 @@ var Common = __webpack_require__(45); /***/ }), -/* 995 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136549,7 +136830,6 @@ var Vector2 = __webpack_require__(6); * @extends Phaser.Physics.Matter.Components.Transform * @extends Phaser.Physics.Matter.Components.Velocity * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.Animation * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip @@ -136644,7 +136924,7 @@ module.exports = MatterSprite; /***/ }), -/* 996 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136781,7 +137061,7 @@ module.exports = MatterImage; /***/ }), -/* 997 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137114,7 +137394,7 @@ var Bodies = __webpack_require__(211); /***/ }), -/* 998 */ +/* 1000 */ /***/ (function(module, exports) { /** @@ -137725,7 +138005,7 @@ function scalar_eq(a,b,precision){ /***/ }), -/* 999 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137736,13 +138016,13 @@ function scalar_eq(a,b,precision){ var Bodies = __webpack_require__(211); var Class = __webpack_require__(0); -var Composites = __webpack_require__(997); +var Composites = __webpack_require__(999); var Constraint = __webpack_require__(293); -var MatterGameObject = __webpack_require__(1028); -var MatterImage = __webpack_require__(996); -var MatterSprite = __webpack_require__(995); +var MatterGameObject = __webpack_require__(1030); +var MatterImage = __webpack_require__(998); +var MatterSprite = __webpack_require__(997); var MatterTileBody = __webpack_require__(666); -var PointerConstraint = __webpack_require__(1015); +var PointerConstraint = __webpack_require__(1017); /** * @classdesc @@ -138355,7 +138635,7 @@ module.exports = Factory; /***/ }), -/* 1000 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138364,15 +138644,15 @@ module.exports = Factory; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Body = __webpack_require__(1006); +var Body = __webpack_require__(1008); var Class = __webpack_require__(0); var COLLIDES = __webpack_require__(324); -var CollisionMap = __webpack_require__(1005); +var CollisionMap = __webpack_require__(1007); var EventEmitter = __webpack_require__(9); var GetFastValue = __webpack_require__(2); var HasValue = __webpack_require__(103); var Set = __webpack_require__(75); -var Solver = __webpack_require__(1032); +var Solver = __webpack_require__(1034); var TILEMAP_FORMATS = __webpack_require__(29); var TYPE = __webpack_require__(323); @@ -139401,7 +139681,7 @@ module.exports = World; /***/ }), -/* 1001 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139445,7 +139725,6 @@ var Sprite = __webpack_require__(31); * @extends Phaser.Physics.Impact.Components.SetGameObject * @extends Phaser.Physics.Impact.Components.Velocity * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.Animation * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Flip @@ -139564,7 +139843,7 @@ module.exports = ImpactSprite; /***/ }), -/* 1002 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139723,7 +140002,7 @@ module.exports = ImpactImage; /***/ }), -/* 1003 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139856,7 +140135,7 @@ module.exports = ImpactBody; /***/ }), -/* 1004 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139866,9 +140145,9 @@ module.exports = ImpactBody; */ var Class = __webpack_require__(0); -var ImpactBody = __webpack_require__(1003); -var ImpactImage = __webpack_require__(1002); -var ImpactSprite = __webpack_require__(1001); +var ImpactBody = __webpack_require__(1005); +var ImpactImage = __webpack_require__(1004); +var ImpactSprite = __webpack_require__(1003); /** * @classdesc @@ -140013,7 +140292,7 @@ module.exports = Factory; /***/ }), -/* 1005 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140023,7 +140302,7 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var DefaultDefs = __webpack_require__(1046); +var DefaultDefs = __webpack_require__(1048); /** * @classdesc @@ -140377,7 +140656,7 @@ module.exports = CollisionMap; /***/ }), -/* 1006 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140388,9 +140667,9 @@ module.exports = CollisionMap; var Class = __webpack_require__(0); var COLLIDES = __webpack_require__(324); -var GetVelocity = __webpack_require__(1048); +var GetVelocity = __webpack_require__(1050); var TYPE = __webpack_require__(323); -var UpdateMotion = __webpack_require__(1047); +var UpdateMotion = __webpack_require__(1049); /** * @callback BodyUpdateCallback @@ -140996,9 +141275,9 @@ module.exports = Body; /***/ }), -/* 1007 */, -/* 1008 */, -/* 1009 */ +/* 1009 */, +/* 1010 */, +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { var Matter = __webpack_require__(663); @@ -141180,7 +141459,7 @@ module.exports = MatterWrap; */ /***/ }), -/* 1010 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { var Matter = __webpack_require__(663); @@ -141322,7 +141601,7 @@ module.exports = MatterAttractors; /***/ }), -/* 1011 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141332,16 +141611,16 @@ module.exports = MatterAttractors; */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(999); +var Factory = __webpack_require__(1001); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(4); -var MatterAttractors = __webpack_require__(1010); -var MatterLib = __webpack_require__(994); -var MatterWrap = __webpack_require__(1009); +var MatterAttractors = __webpack_require__(1012); +var MatterLib = __webpack_require__(996); +var MatterWrap = __webpack_require__(1011); var Merge = __webpack_require__(90); var Plugin = __webpack_require__(662); var PluginManager = __webpack_require__(10); -var World = __webpack_require__(989); +var World = __webpack_require__(991); /** * @classdesc @@ -141657,7 +141936,7 @@ module.exports = MatterPhysics; /***/ }), -/* 1012 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141882,7 +142161,7 @@ var Bounds = __webpack_require__(134); })(); /***/ }), -/* 1013 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -141981,7 +142260,7 @@ var Common = __webpack_require__(45); /***/ }), -/* 1014 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142099,7 +142378,7 @@ var Vertices = __webpack_require__(135); /***/ }), -/* 1015 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142390,7 +142669,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1016 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142490,7 +142769,7 @@ module.exports = Velocity; /***/ }), -/* 1017 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142782,7 +143061,7 @@ module.exports = Transform; /***/ }), -/* 1018 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142903,7 +143182,7 @@ module.exports = Sleep; /***/ }), -/* 1019 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143127,7 +143406,7 @@ module.exports = SetBody; /***/ }), -/* 1020 */ +/* 1022 */ /***/ (function(module, exports) { /** @@ -143180,7 +143459,7 @@ module.exports = Sensor; /***/ }), -/* 1021 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143235,7 +143514,7 @@ module.exports = Static; /***/ }), -/* 1022 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143294,7 +143573,7 @@ module.exports = Mass; /***/ }), -/* 1023 */ +/* 1025 */ /***/ (function(module, exports) { /** @@ -143334,7 +143613,7 @@ module.exports = Gravity; /***/ }), -/* 1024 */ +/* 1026 */ /***/ (function(module, exports) { /** @@ -143420,7 +143699,7 @@ module.exports = Friction; /***/ }), -/* 1025 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143567,7 +143846,7 @@ module.exports = Force; /***/ }), -/* 1026 */ +/* 1028 */ /***/ (function(module, exports) { /** @@ -143655,7 +143934,7 @@ module.exports = Collision; /***/ }), -/* 1027 */ +/* 1029 */ /***/ (function(module, exports) { /** @@ -143695,7 +143974,7 @@ module.exports = Bounce; /***/ }), -/* 1028 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143805,7 +144084,7 @@ module.exports = MatterGameObject; /***/ }), -/* 1029 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143820,14 +144099,14 @@ module.exports = MatterGameObject; module.exports = { - Factory: __webpack_require__(999), - Image: __webpack_require__(996), + Factory: __webpack_require__(1001), + Image: __webpack_require__(998), Matter: __webpack_require__(663), - MatterPhysics: __webpack_require__(1011), - PolyDecomp: __webpack_require__(998), - Sprite: __webpack_require__(995), + MatterPhysics: __webpack_require__(1013), + PolyDecomp: __webpack_require__(1000), + Sprite: __webpack_require__(997), TileBody: __webpack_require__(666), - World: __webpack_require__(989) + World: __webpack_require__(991) }; @@ -143885,7 +144164,7 @@ module.exports = { /***/ }), -/* 1030 */ +/* 1032 */ /***/ (function(module, exports) { /** @@ -143970,7 +144249,7 @@ module.exports = SeperateY; /***/ }), -/* 1031 */ +/* 1033 */ /***/ (function(module, exports) { /** @@ -144026,7 +144305,7 @@ module.exports = SeperateX; /***/ }), -/* 1032 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144036,8 +144315,8 @@ module.exports = SeperateX; */ var COLLIDES = __webpack_require__(324); -var SeperateX = __webpack_require__(1031); -var SeperateY = __webpack_require__(1030); +var SeperateX = __webpack_require__(1033); +var SeperateY = __webpack_require__(1032); /** * Impact Physics Solver @@ -144100,7 +144379,7 @@ module.exports = Solver; /***/ }), -/* 1033 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144110,11 +144389,11 @@ module.exports = Solver; */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(1004); +var Factory = __webpack_require__(1006); var GetFastValue = __webpack_require__(2); var Merge = __webpack_require__(90); var PluginManager = __webpack_require__(10); -var World = __webpack_require__(1000); +var World = __webpack_require__(1002); /** * @classdesc @@ -144316,7 +144595,7 @@ module.exports = ImpactPhysics; /***/ }), -/* 1034 */ +/* 1036 */ /***/ (function(module, exports) { /** @@ -144415,7 +144694,7 @@ module.exports = Velocity; /***/ }), -/* 1035 */ +/* 1037 */ /***/ (function(module, exports) { /** @@ -144490,7 +144769,7 @@ module.exports = SetGameObject; /***/ }), -/* 1036 */ +/* 1038 */ /***/ (function(module, exports) { /** @@ -144539,7 +144818,7 @@ module.exports = Offset; /***/ }), -/* 1037 */ +/* 1039 */ /***/ (function(module, exports) { /** @@ -144600,7 +144879,7 @@ module.exports = Gravity; /***/ }), -/* 1038 */ +/* 1040 */ /***/ (function(module, exports) { /** @@ -144676,7 +144955,7 @@ module.exports = Friction; /***/ }), -/* 1039 */ +/* 1041 */ /***/ (function(module, exports) { /** @@ -144800,7 +145079,7 @@ module.exports = Debug; /***/ }), -/* 1040 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144871,12 +145150,12 @@ var Collides = { /** * [description] * - * @method Phaser.Physics.Impact.Components.Collides#setLite - * @since 3.0.0 + * @method Phaser.Physics.Impact.Components.Collides#setLiteCollision + * @since 3.6.0 * * @return {Phaser.GameObjects.GameObject} This Game Object. */ - setLite: function () + setLiteCollision: function () { this.body.collides = COLLIDES.LITE; @@ -144886,12 +145165,12 @@ var Collides = { /** * [description] * - * @method Phaser.Physics.Impact.Components.Collides#setPassive - * @since 3.0.0 + * @method Phaser.Physics.Impact.Components.Collides#setPassiveCollision + * @since 3.6.0 * * @return {Phaser.GameObjects.GameObject} This Game Object. */ - setPassive: function () + setPassiveCollision: function () { this.body.collides = COLLIDES.PASSIVE; @@ -144901,12 +145180,12 @@ var Collides = { /** * [description] * - * @method Phaser.Physics.Impact.Components.Collides#setActive - * @since 3.0.0 + * @method Phaser.Physics.Impact.Components.Collides#setActiveCollision + * @since 3.6.0 * * @return {Phaser.GameObjects.GameObject} This Game Object. */ - setActive: function () + setActiveCollision: function () { this.body.collides = COLLIDES.ACTIVE; @@ -144916,12 +145195,12 @@ var Collides = { /** * [description] * - * @method Phaser.Physics.Impact.Components.Collides#setFixed - * @since 3.0.0 + * @method Phaser.Physics.Impact.Components.Collides#setFixedCollision + * @since 3.6.0 * * @return {Phaser.GameObjects.GameObject} This Game Object. */ - setFixed: function () + setFixedCollision: function () { this.body.collides = COLLIDES.FIXED; @@ -144955,7 +145234,7 @@ module.exports = Collides; /***/ }), -/* 1041 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145076,7 +145355,7 @@ module.exports = CheckAgainst; /***/ }), -/* 1042 */ +/* 1044 */ /***/ (function(module, exports) { /** @@ -145154,7 +145433,7 @@ module.exports = Bounce; /***/ }), -/* 1043 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145237,7 +145516,7 @@ module.exports = BodyType; /***/ }), -/* 1044 */ +/* 1046 */ /***/ (function(module, exports) { /** @@ -145310,7 +145589,7 @@ module.exports = BodyScale; /***/ }), -/* 1045 */ +/* 1047 */ /***/ (function(module, exports) { /** @@ -145386,7 +145665,7 @@ module.exports = Acceleration; /***/ }), -/* 1046 */ +/* 1048 */ /***/ (function(module, exports) { /** @@ -145457,7 +145736,7 @@ module.exports = { /***/ }), -/* 1047 */ +/* 1049 */ /***/ (function(module, exports) { /** @@ -145552,7 +145831,7 @@ module.exports = UpdateMotion; /***/ }), -/* 1048 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145608,7 +145887,7 @@ module.exports = GetVelocity; /***/ }), -/* 1049 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145634,22 +145913,22 @@ module.exports = GetVelocity; */ module.exports = { - Body: __webpack_require__(1006), + Body: __webpack_require__(1008), COLLIDES: __webpack_require__(324), - CollisionMap: __webpack_require__(1005), - Factory: __webpack_require__(1004), - Image: __webpack_require__(1002), - ImpactBody: __webpack_require__(1003), - ImpactPhysics: __webpack_require__(1033), - Sprite: __webpack_require__(1001), + CollisionMap: __webpack_require__(1007), + Factory: __webpack_require__(1006), + Image: __webpack_require__(1004), + ImpactBody: __webpack_require__(1005), + ImpactPhysics: __webpack_require__(1035), + Sprite: __webpack_require__(1003), TYPE: __webpack_require__(323), - World: __webpack_require__(1000) + World: __webpack_require__(1002) }; /***/ }), -/* 1050 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145665,14 +145944,14 @@ module.exports = { module.exports = { Arcade: __webpack_require__(690), - Impact: __webpack_require__(1049), - Matter: __webpack_require__(1029) + Impact: __webpack_require__(1051), + Matter: __webpack_require__(1031) }; /***/ }), -/* 1051 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -145684,7 +145963,7 @@ module.exports = { __webpack_require__(596); var CONST = __webpack_require__(19); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(16); /** * @namespace Phaser @@ -145695,21 +145974,21 @@ var Phaser = { Actions: __webpack_require__(586), Animation: __webpack_require__(554), Cache: __webpack_require__(553), - Cameras: __webpack_require__(941), + Cameras: __webpack_require__(943), Class: __webpack_require__(0), - Create: __webpack_require__(937), - Curves: __webpack_require__(931), + Create: __webpack_require__(939), + Curves: __webpack_require__(933), Data: __webpack_require__(528), - Display: __webpack_require__(928), - DOM: __webpack_require__(899), + Display: __webpack_require__(930), + DOM: __webpack_require__(901), EventEmitter: __webpack_require__(518), Game: __webpack_require__(517), - GameObjects: __webpack_require__(898), + GameObjects: __webpack_require__(900), Geom: __webpack_require__(377), Input: __webpack_require__(361), Loader: __webpack_require__(744), Math: __webpack_require__(733), - Physics: __webpack_require__(1050), + Physics: __webpack_require__(1052), Renderer: __webpack_require__(660), Scene: __webpack_require__(179), Scenes: __webpack_require__(321), diff --git a/dist/phaser.min.js b/dist/phaser.min.js index e1581faa6..5dbf86abc 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=1051)}([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){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,i){var n=i(15),s=i(4);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){"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(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(574),Animation:i(295),BlendMode:i(573),ComputedSize:i(572),Depth:i(571),Flip:i(570),GetBounds:i(569),MatrixStack:i(568),Origin:i(567),Pipeline:i(283),ScaleMode:i(566),ScrollFactor:i(565),Size:i(564),Texture:i(563),Tint:i(562),ToJSON:i(561),Transform:i(560),TransformMatrix:i(60),Visible:i(559)}},function(t,e,i){var n=i(289),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){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_WAITING_LINKFILE:15,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,TEXTURE_ATLAS_JSON_ARRAY:20,TEXTURE_ATLAS_JSON_HASH:21}},function(t,e,i){var n=i(292),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);lo.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={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;ns||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(144),r=i(278),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={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},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,i){var n=i(0),s=i(14),r=i(1),o=i(540),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),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=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=i(132),s=i(20);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0;e--){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=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(430);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=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}},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){var e=this.matrix,i=t.matrix,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=i[0],u=i[1],c=i[2],d=i[3],f=i[4],p=i[5];return e[0]=l*n+u*r,e[1]=l*s+u*o,e[2]=c*n+d*r,e[3]=c*s+d*o,e[4]=f*n+p*r+a,e[5]=f*s+p*o+h,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},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},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=n},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(14),r=i(366),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){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(0),s=i(56),r=i(219),o=i(218),a=i(92),h=i(145),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(1),o=i(438),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=a},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(96),s=i(8),r=i(58),o=i(59),a=i(69),h=i(155),l=i(98),u=i(4),c=i(97),d=i(95),f=i(94);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;_=t.length)){for(var i=t.length-1,n=t[e],s=e;s=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:r,onBlur:r,onFocus:r,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=o},function(t,e,i){var n,s=i(53),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,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,i){var n=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.blockSet=!1,this._frozen=!1,this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){return this.list[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if(this.events.listenerCount("changedata")>0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0&&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;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a=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,i){var n=i(0),s=i(268),r=i(12),o=i(6),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){"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(30),r=i(290),o=i(288),a=i(149),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){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(140),s=i(0),r=i(3),o=i(79),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(47);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(285),r=i(148),o=i(147),a=i(6),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(11),o=i(57),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)))}},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(4);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(2),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(2),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]+" ")}r0&&(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.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(),resolution:this.resolution,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)}});t.exports=p},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(586),s=i(0),r=i(2),o=i(4),a=i(246),h=i(75),l=i(31),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(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&&void 0!==i.key&&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]);for(var e=[],i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i-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),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.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,d.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},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){return t?this.resume():this.pause()},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)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(){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)},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;e-y||T>-m||b-y||A>-m||Su&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),this.shakeEffect.preRender()},removeBounds:function(){return this.useBounds=!1,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=l(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,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){return this.scene=t,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),this.zoom=t,this},startFollow:function(t,e){return void 0===e&&(e=!1),this._follow=t,this.roundPixels=e,this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e)},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.resetFX(),this.matrix.destroy(),this.culledObjects=[],this.target=void 0,this._bounds=void 0,this.scene=void 0}});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(17),r=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.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},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,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()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(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=s(!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}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(192),r=i(509),o=i(508),a=i(25),h=i(80),l=new n({Extends:h,Mixins:[s],initialize:function(t){h.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:o,fragShader:t.fragShader?t.fragShader:r,vertexCapacity:t.vertexCapacity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+2*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:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:4*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=2e3,this.batches=[],this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var n=i[i.length-1];return e>0?(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},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,l=0,u=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){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},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s,r,o,a=this.renderer.config.roundPixels,h=t.emitters.list,l=h.length,u=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=this.maxQuads,p=e.scrollX,g=e.scrollY,v=e.matrix.matrix,y=v[0],m=v[1],x=v[2],w=v[3],b=v[4],T=v[5],S=Math.sin,A=Math.cos,C=this.vertexComponentCount,M=this.vertexCapacity,_=t.defaultFrame.source.glTexture;if(n){var E=n[0],P=n[1],L=n[2],F=n[3],k=n[4];s=y*P+m*F,r=x*P+w*F,o=b*P+T*F+n[5],y=y*E+m*L,m=s,x=x*E+w*L,w=r,b=b*E+T*L+k,T=o}this.setTexture2D(_,0);for(var R=0;R=M&&(this.flush(),this.setTexture2D(_,0));for(var N=0;N=M&&(this.flush(),this.setTexture2D(_,0))}}Y+=V,D-=V,this.vertexCount>=M&&(this.flush(),this.setTexture2D(_,0))}}}this.setTexture2D(_,0)},drawBlitter:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s=this.renderer.config.roundPixels,r=a.getTintAppendFloatAlpha,o=this.vertexViewF32,h=this.vertexViewU32,l=t.getRenderList(),u=l.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(u/this.maxQuads),b=0,T=t.x-m,S=t.y-x;if(n){var A=n[0],C=n[1],M=n[2],_=n[3],E=n[4],P=d*C+f*_,L=p*C+g*_,F=v*C+y*_+n[5];d=d*A+f*M,f=P,p=p*A+g*M,g=L,v=v*A+y*M+E,y=F}for(var k=0;k=this.vertexCapacity&&this.flush()}b+=R,u-=R,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,l,u,c=this.renderer.config.roundPixels,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=e.matrix.matrix,v=t.frame,y=v.texture.source[v.sourceIndex].glTexture,m=!!y.isRenderTexture,x=t.flipX,w=t.flipY^m,b=v.uvs,T=v.width*(x?-1:1),S=v.height*(w?-1:1),A=-t.displayOriginX+v.x+v.width*(x?1:0),C=-t.displayOriginY+v.y+v.height*(w?1:0),M=(c?0|A:A)+T,_=(c?0|C:C)+S,E=t.x-e.scrollX*t.scrollFactorX,P=t.y-e.scrollY*t.scrollFactorY,L=t.scaleX,F=t.scaleY,k=-t.rotation,R=t._alphaTL,O=t._alphaTR,B=t._alphaBL,D=t._alphaBR,I=t._tintTL,Y=t._tintTR,z=t._tintBL,X=t._tintBR,N=Math.sin(k),V=Math.cos(k),W=V*L,G=-N*L,U=N*F,j=V*F,H=E,q=P,K=g[0],J=g[1],Z=g[2],Q=g[3],$=g[4],tt=g[5];if(n){var et=n[0],it=n[1],nt=n[2],st=n[3],rt=K*et+J*nt,ot=K*it+J*st,at=Z*et+Q*nt,ht=Z*it+Q*st;s=W*rt+G*at,r=W*ot+G*ht,o=U*rt+j*at,h=U*ot+j*ht,l=H*rt+q*at+($*et+tt*nt+n[4]),u=H*ot+q*ht+($*it+tt*st+n[5])}else s=W*K+G*Z,r=W*J+G*Q,o=U*K+j*Z,h=U*J+j*Q,l=H*K+q*Z+$,u=H*J+q*Q+tt;var lt,ut=A*s+C*o+l,ct=A*r+C*h+u,dt=A*s+_*o+l,ft=A*r+_*h+u,pt=M*s+_*o+l,gt=M*r+_*h+u,vt=M*s+C*o+l,yt=M*r+C*h+u,mt=d(I,R),xt=d(Y,O),wt=d(z,B),bt=d(X,D);c&&(ut|=0,ct|=0,dt|=0,ft|=0,pt|=0,gt|=0,vt|=0,yt|=0),this.setTexture2D(y,0),f[(lt=this.vertexCount*this.vertexComponentCount)+0]=ut,f[lt+1]=ct,f[lt+2]=b.x0,f[lt+3]=b.y0,p[lt+4]=mt,f[lt+5]=dt,f[lt+6]=ft,f[lt+7]=b.x1,f[lt+8]=b.y1,p[lt+9]=wt,f[lt+10]=pt,f[lt+11]=gt,f[lt+12]=b.x2,f[lt+13]=b.y2,p[lt+14]=bt,f[lt+15]=ut,f[lt+16]=ct,f[lt+17]=b.x0,f[lt+18]=b.y0,p[lt+19]=mt,f[lt+20]=pt,f[lt+21]=gt,f[lt+22]=b.x2,f[lt+23]=b.y2,p[lt+24]=bt,f[lt+25]=vt,f[lt+26]=yt,f[lt+27]=b.x3,f[lt+28]=b.y3,p[lt+29]=xt,this.vertexCount+=6},batchMesh:function(t,e,i){var n=null;i&&(n=i.matrix);var s=t.vertices,r=s.length,o=r/2|0;this.renderer.setPipeline(this),this.vertexCount+o>this.vertexCapacity&&this.flush();var h,l,u,c,d,f,p=this.renderer.config.roundPixels,g=a.getTintAppendFloatAlpha,v=t.uv,y=t.colors,m=t.alphas,x=this.vertexViewF32,w=this.vertexViewU32,b=e.matrix.matrix,T=t.frame,S=t.texture.source[T.sourceIndex].glTexture,A=t.x-e.scrollX*t.scrollFactorX,C=t.y-e.scrollY*t.scrollFactorY,M=t.scaleX,_=t.scaleY,E=-t.rotation,P=Math.sin(E),L=Math.cos(E),F=L*M,k=-P*M,R=P*_,O=L*_,B=A,D=C,I=b[0],Y=b[1],z=b[2],X=b[3],N=b[4],V=b[5],W=0;if(n){var G=n[0],U=n[1],j=n[2],H=n[3],q=I*G+Y*j,K=I*U+Y*H,J=z*G+X*j,Z=z*U+X*H;h=F*q+k*J,l=F*K+k*Z,u=R*q+O*J,c=R*K+O*Z,d=B*q+D*J+(N*G+V*j+n[4]),f=B*K+D*Z+(N*U+V*H+n[5])}else h=F*I+k*z,l=F*Y+k*X,u=R*I+O*z,c=R*Y+O*X,d=B*I+D*z+N,f=B*Y+D*X+V;this.setTexture2D(S,0),W=this.vertexCount*this.vertexComponentCount;for(var Q=0,$=0;Qthis.vertexCapacity&&this.flush();var s,r,o,h,l,u,c,d,f,p,g,v,y,m,x=this.renderer.config.roundPixels,w=t.text,b=w.length,T=a.getTintAppendFloatAlpha,S=this.vertexViewF32,A=this.vertexViewU32,C=e.matrix.matrix,M=e.width+50,_=e.height+50,E=t.frame,P=t.texture.source[E.sourceIndex],L=e.scrollX*t.scrollFactorX,F=e.scrollY*t.scrollFactorY,k=t.fontData,R=k.lineHeight,O=t.fontSize/k.size,B=k.chars,D=t.alpha,I=T(t._tintTL,D),Y=T(t._tintTR,D),z=T(t._tintBL,D),X=T(t._tintBR,D),N=t.x,V=t.y,W=E.cutX,G=E.cutY,U=P.width,j=P.height,H=P.glTexture,q=0,K=0,J=0,Z=0,Q=null,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,lt=0,ut=0,ct=null,dt=0,ft=N-L+E.x,pt=V-F+E.y,gt=-t.rotation,vt=t.scaleX,yt=t.scaleY,mt=t.letterSpacing,xt=Math.sin(gt),wt=Math.cos(gt),bt=wt*vt,Tt=-xt*vt,St=xt*yt,At=wt*yt,Ct=ft,Mt=pt,_t=C[0],Et=C[1],Pt=C[2],Lt=C[3],Ft=C[4],kt=C[5],Rt=0;if(n){var Ot=n[0],Bt=n[1],Dt=n[2],It=n[3],Yt=_t*Ot+Et*Dt,zt=_t*Bt+Et*It,Xt=Pt*Ot+Lt*Dt,Nt=Pt*Bt+Lt*It;f=bt*Yt+Tt*Xt,p=bt*zt+Tt*Nt,g=St*Yt+At*Xt,v=St*zt+At*Nt,y=Ct*Yt+Mt*Xt+(Ft*Ot+kt*Dt+n[4]),m=Ct*zt+Mt*Nt+(Ft*Bt+kt*It+n[5])}else f=bt*_t+Tt*Pt,p=bt*Et+Tt*Lt,g=St*_t+At*Pt,v=St*Et+At*Lt,y=Ct*_t+Mt*Pt+Ft,m=Ct*Et+Mt*Lt+kt;this.setTexture2D(H,0);for(var Vt=0;VtM||r<-50||r>_)&&(o<-50||o>M||h<-50||h>_)&&(l<-50||l>M||u<-50||u>_)&&(c<-50||c>M||d<-50||d>_)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Rt=this.vertexCount*this.vertexComponentCount,x&&(s|=0,r|=0,o|=0,h|=0,l|=0,u|=0,c|=0,d|=0),S[Rt+0]=s,S[Rt+1]=r,S[Rt+2]=at,S[Rt+3]=lt,A[Rt+4]=I,S[Rt+5]=o,S[Rt+6]=h,S[Rt+7]=at,S[Rt+8]=ut,A[Rt+9]=z,S[Rt+10]=l,S[Rt+11]=u,S[Rt+12]=ht,S[Rt+13]=ut,A[Rt+14]=X,S[Rt+15]=s,S[Rt+16]=r,S[Rt+17]=at,S[Rt+18]=lt,A[Rt+19]=I,S[Rt+20]=l,S[Rt+21]=u,S[Rt+22]=ht,S[Rt+23]=ut,A[Rt+24]=X,S[Rt+25]=c,S[Rt+26]=d,S[Rt+27]=ht,S[Rt+28]=lt,A[Rt+29]=Y,this.vertexCount+=6))}}else q=0,J=0,K+=R,ct=null},batchDynamicBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,l,u,c,d,f,p,g,v,y,m,x,w,b,T,S,A,C=this.renderer.config.roundPixels,M=t.displayCallback,_=t.text,E=_.length,P=a.getTintAppendFloatAlpha,L=this.vertexViewF32,F=this.vertexViewU32,k=this.renderer,R=e.matrix.matrix,O=t.frame,B=t.texture.source[O.sourceIndex],D=e.scrollX*t.scrollFactorX,I=e.scrollY*t.scrollFactorY,Y=t.scrollX,z=t.scrollY,X=t.fontData,N=X.lineHeight,V=t.fontSize/X.size,W=X.chars,G=t.alpha,U=P(t._tintTL,G),j=P(t._tintTR,G),H=P(t._tintBL,G),q=P(t._tintBR,G),K=t.x,J=t.y,Z=O.cutX,Q=O.cutY,$=B.width,tt=B.height,et=B.glTexture,it=0,nt=0,st=0,rt=0,ot=null,at=0,ht=0,lt=0,ut=0,ct=0,dt=0,ft=0,pt=0,gt=0,vt=0,yt=0,mt=0,xt=null,wt=0,bt=K+O.x,Tt=J+O.y,St=-t.rotation,At=t.scaleX,Ct=t.scaleY,Mt=t.letterSpacing,_t=Math.sin(St),Et=Math.cos(St),Pt=Et*At,Lt=-_t*At,Ft=_t*Ct,kt=Et*Ct,Rt=bt,Ot=Tt,Bt=R[0],Dt=R[1],It=R[2],Yt=R[3],zt=R[4],Xt=R[5],Nt=t.cropWidth>0||t.cropHeight>0,Vt=0;if(n){var Wt=n[0],Gt=n[1],Ut=n[2],jt=n[3],Ht=Bt*Wt+Dt*Ut,qt=Bt*Gt+Dt*jt,Kt=It*Wt+Yt*Ut,Jt=It*Gt+Yt*jt;x=Pt*Ht+Lt*Kt,w=Pt*qt+Lt*Jt,b=Ft*Ht+kt*Kt,T=Ft*qt+kt*Jt,S=Rt*Ht+Ot*Kt+(zt*Wt+Xt*Ut+n[4]),A=Rt*qt+Ot*Jt+(zt*Gt+Xt*jt+n[5])}else x=Pt*Bt+Lt*It,w=Pt*Dt+Lt*Yt,b=Ft*Bt+kt*It,T=Ft*Dt+kt*Yt,S=Rt*Bt+Ot*It+zt,A=Rt*Dt+Ot*Yt+Xt;this.setTexture2D(et,0),Nt&&k.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var Zt=0;Ztthis.vertexCapacity&&this.flush(),Vt=this.vertexCount*this.vertexComponentCount,C&&(s|=0,r|=0,o|=0,h|=0,l|=0,u|=0,c|=0,d|=0),L[Vt+0]=s,L[Vt+1]=r,L[Vt+2]=gt,L[Vt+3]=yt,F[Vt+4]=U,L[Vt+5]=o,L[Vt+6]=h,L[Vt+7]=gt,L[Vt+8]=mt,F[Vt+9]=H,L[Vt+10]=l,L[Vt+11]=u,L[Vt+12]=vt,L[Vt+13]=mt,F[Vt+14]=q,L[Vt+15]=s,L[Vt+16]=r,L[Vt+17]=gt,L[Vt+18]=yt,F[Vt+19]=U,L[Vt+20]=l,L[Vt+21]=u,L[Vt+22]=vt,L[Vt+23]=mt,F[Vt+24]=q,L[Vt+25]=c,L[Vt+26]=d,L[Vt+27]=vt,L[Vt+28]=yt,F[Vt+29]=j,this.vertexCount+=6}}}else it=0,st=0,nt+=N,xt=null;Nt&&k.popScissor()},batchText:function(t,e,i){var n=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),0,0,e,i)},batchDynamicTilemapLayer:function(t,e,i){for(var n=t.culledTiles,s=n.length,r=t.tileset.image.get().source.glTexture,o=t.tileset,h=t.scrollFactorX,l=t.scrollFactorY,u=t.alpha,c=t.x,d=t.y,f=t.scaleX,p=t.scaleY,g=a.getTintAppendFloatAlpha,v=0;vthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,u=-u;var L,F,k,R,O,B,D=this.renderer.config.roundPixels,I=this.vertexViewF32,Y=this.vertexViewU32,z=_.matrix.matrix,X=o*(c?1:0)-g,N=a*(d?1:0)-v,V=X+o*(c?-1:1),W=N+a*(d?-1:1),G=s-_.scrollX*f,U=r-_.scrollY*p,j=Math.sin(u),H=Math.cos(u),q=H*h,K=-j*h,J=j*l,Z=H*l,Q=G,$=U,tt=z[0],et=z[1],it=z[2],nt=z[3],st=z[4],rt=z[5];if(P){var ot=P[0],at=P[1],ht=P[2],lt=P[3],ut=tt*ot+et*ht,ct=tt*at+et*lt,dt=it*ot+nt*ht,ft=it*at+nt*lt;L=q*ut+K*dt,F=q*ct+K*ft,k=J*ut+Z*dt,R=J*ct+Z*ft,O=Q*ut+$*dt+(st*ot+rt*ht+P[4]),B=Q*ct+$*ft+(st*at+rt*lt+P[5])}else L=q*tt+K*it,F=q*et+K*nt,k=J*tt+Z*it,R=J*et+Z*nt,O=Q*tt+$*it+st,B=Q*et+$*nt+rt;var pt,gt=X*L+N*k+O,vt=X*F+N*R+B,yt=X*L+W*k+O,mt=X*F+W*R+B,xt=V*L+W*k+O,wt=V*F+W*R+B,bt=V*L+N*k+O,Tt=V*F+N*R+B,St=y/i+C,At=m/n+M,Ct=(y+x)/i+C,Mt=(m+w)/n+M;this.setTexture2D(e,0),pt=this.vertexCount*this.vertexComponentCount,D&&(gt|=0,vt|=0,yt|=0,mt|=0,xt|=0,wt|=0,bt|=0,Tt|=0),I[pt+0]=gt,I[pt+1]=vt,I[pt+2]=St,I[pt+3]=At,Y[pt+4]=b,I[pt+5]=yt,I[pt+6]=mt,I[pt+7]=St,I[pt+8]=Mt,Y[pt+9]=T,I[pt+10]=xt,I[pt+11]=wt,I[pt+12]=Ct,I[pt+13]=Mt,Y[pt+14]=S,I[pt+15]=gt,I[pt+16]=vt,I[pt+17]=St,I[pt+18]=At,Y[pt+19]=b,I[pt+20]=xt,I[pt+21]=wt,I[pt+22]=Ct,I[pt+23]=Mt,Y[pt+24]=S,I[pt+25]=bt,I[pt+26]=Tt,I[pt+27]=Ct,I[pt+28]=At,Y[pt+29]=A,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,o,h,l,u,c){var d=null;c&&(d=c.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var f=this.renderer.config.roundPixels,p=this.vertexViewF32,g=this.vertexViewU32,v=e,y=i,m=v+h,x=y+l,w=u[0],b=u[1],T=u[2],S=u[3],A=u[4],C=u[5];if(d){var M=d[0],_=d[1],E=d[2],P=d[3],L=d[4],F=w*_+b*P,k=T*_+S*P,R=A*_+C*P+d[5];w=w*M+b*E,b=F,T=T*M+S*E,S=k,A=A*M+C*E+L,C=R}var O,B=v*w+y*T+A,D=v*b+y*S+C,I=v*w+x*T+A,Y=v*b+x*S+C,z=m*w+x*T+A,X=m*b+x*S+C,N=m*w+y*T+A,V=m*b+y*S+C,W=t.width,G=t.height,U=r/W,j=o/G,H=(r+h)/W,q=(o+l)/G;n=a.getTintAppendFloatAlpha(n,s),this.setTexture2D(t,0),O=this.vertexCount*this.vertexComponentCount,f&&(B|=0,D|=0,I|=0,Y|=0,z|=0,X|=0,N|=0,V|=0),p[O+0]=B,p[O+1]=D,p[O+2]=U,p[O+3]=j,g[O+4]=n,p[O+5]=I,p[O+6]=Y,p[O+7]=U,p[O+8]=q,g[O+9]=n,p[O+10]=z,p[O+11]=X,p[O+12]=H,p[O+13]=q,g[O+14]=n,p[O+15]=B,p[O+16]=D,p[O+17]=U,p[O+18]=j,g[O+19]=n,p[O+20]=z,p[O+21]=X,p[O+22]=H,p[O+23]=q,g[O+24]=n,p[O+25]=N,p[O+26]=V,p[O+27]=H,p[O+28]=j,g[O+29]=n,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=l},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===i&&(i=!0),e&&("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e)),n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},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(93),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.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&&tt.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(115),r=i(45);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(0),s=i(334),r=i(31),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(847),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,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"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),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.length=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(67),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(48),s=i(83),r=i(30),o=i(0),a=i(14),h=i(1),l=i(12),u=i(28),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},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},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(9),r=i(68),o=i(57),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=i(0),s=i(18),r=i(2),o=i(117),a=new n({Extends:s,initialize:function(t,e,i,n){this.locked="ontouchstart"in window,this.loaded=!1;var o={type:"audio",extension:r(e,"type",""),key:t,url:r(e,"uri",e),path:i,config:n};s.call(this,o)},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t0&&e.cameraFilter&r._id)){var l=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,c=e.x,d=e.y,f=e.scaleX,p=e.scaleY,g=e.rotation,v=e.commandBuffer,y=a||t.currentContext,m=1,x=1,w=0,b=0,T=1,S=0,A=0,C=0;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,y.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,y.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),y.save(),o){var M=o.matrix;y.transform(M[0],M[1],M[2],M[3],M[4],M[5])}y.translate(c-l,d-u),y.rotate(g),y.scale(f,p),y.fillStyle="#fff",y.globalAlpha=e.alpha;for(var _=0,E=v.length;_>>16,A=(65280&w)>>>8,C=255&w,y.strokeStyle="rgba("+S+","+A+","+C+","+m+")",y.lineWidth=T,_+=3;break;case n.FILL_STYLE:b=v[_+1],x=v[_+2],S=(16711680&b)>>>16,A=(65280&b)>>>8,C=255&b,y.fillStyle="rgba("+S+","+A+","+C+","+x+")",_+=2;break;case n.BEGIN_PATH:y.beginPath();break;case n.CLOSE_PATH:y.closePath();break;case n.FILL_PATH:h||y.fill();break;case n.STROKE_PATH:h||y.stroke();break;case n.FILL_RECT:h?y.rect(v[_+1],v[_+2],v[_+3],v[_+4]):y.fillRect(v[_+1],v[_+2],v[_+3],v[_+4]),_+=4;break;case n.FILL_TRIANGLE:y.beginPath(),y.moveTo(v[_+1],v[_+2]),y.lineTo(v[_+3],v[_+4]),y.lineTo(v[_+5],v[_+6]),y.closePath(),h||y.fill(),_+=6;break;case n.STROKE_TRIANGLE:y.beginPath(),y.moveTo(v[_+1],v[_+2]),y.lineTo(v[_+3],v[_+4]),y.lineTo(v[_+5],v[_+6]),y.closePath(),h||y.stroke(),_+=6;break;case n.LINE_TO:y.lineTo(v[_+1],v[_+2]),_+=2;break;case n.MOVE_TO:y.moveTo(v[_+1],v[_+2]),_+=2;break;case n.LINE_FX_TO:y.lineTo(v[_+1],v[_+2]),_+=5;break;case n.MOVE_FX_TO:y.moveTo(v[_+1],v[_+2]),_+=5;break;case n.SAVE:y.save();break;case n.RESTORE:y.restore();break;case n.TRANSLATE:y.translate(v[_+1],v[_+2]),_+=2;break;case n.SCALE:y.scale(v[_+1],v[_+2]),_+=2;break;case n.ROTATE:y.rotate(v[_+1]),_+=1}y.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(161),s=i(105),r=i(61),o=i(15);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,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var o=i?i+r.toString():r.toString();n&&(o=o.concat(n)),s.push(o)}else s.push(r);return s}},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){var n=i(0),s=i(19),r=i(121),o=i(55),a=new n({initialize:function(t,e,i,n){var s=t.manager.game;this.texture=t,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.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){t.config.renderType===s.WEBGL&&(this.glTexture=t.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.pixelArt&&this.setFilter(1)},setFilter:function(t){var e=this.texture.manager.game;e.config.renderType===s.WEBGL&&e.renderer.setTextureFilter(this.glTexture,t)},destroy:function(){this.texture=null,this.image=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(119),r=i(167),o=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.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},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(73),s=i(0),r=i(175),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=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(){if(this.locked="ontouchstart"in window,this.locked){this.lockedActionsQueue=[];var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.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.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(en&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i=0;t--){this.scenes[t].sys.destroy()}this.update=o,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.startListeners()},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},s={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("touchstart",t,s),i.addEventListener("touchmove",t,s),i.addEventListener("touchend",t,s)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("touchstart",t,n),i.addEventListener("touchmove",t,n),i.addEventListener("touchend",t,n)),this.handler=t},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.handler),t.removeEventListener("touchmove",this.handler),t.removeEventListener("touchend",this.handler)},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new s,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.dragState=0,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.movementX=0,this.movementY=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},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}},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},touchmove:function(t){this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.dirty=!0,this.wasTouch=!1},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){this.buttons=1,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},touchend:function(t,e){this.buttons=0,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return 1&this.buttons},rightButtonDown:function(){return 2&this.buttons},middleButtonDown:function(){return 4&this.buttons},backButtonDown:function(){return 8&this.buttons},forwardButtonDown:function(){return 16&this.buttons},destroy:function(){this.camera=null,this.manager=null,this.position=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(112),r=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler,this.locked=!1},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},pointerLockChange:function(t){var e=this.target;this.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,this.manager.queue.push(t)},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},r={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("mousemove",t,r),i.addEventListener("mousedown",t,r),i.addEventListener("mouseup",t,r)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("mousemove",t,n),i.addEventListener("mousedown",t,n),i.addEventListener("mouseup",t,n)),this.handler=t,s.pointerLock&&(this.pointerLockChange=this.pointerLockChange.bind(this),document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.handler),t.removeEventListener("mousedown",this.handler),t.removeEventListener("mouseup",this.handler),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=i(501),o=i(499),a=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});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)=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=this.game.config.resolution,c=this._tempMatrix,f=0;fe.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(23),s=i(0),r=i(200),o=i(199),a=i(4),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),t.updateFrame(this.frames[e])},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,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),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.forward=!0,t.updateFrame(t.currentFrame.nextFrame),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;t0&&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(164);function s(t,e){if(!(this instanceof s))return new s(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){t=t.map(function(t){return t.substring(1)});var e=function(t){return function(e,i){return e[t]-i[t]}};this.compareMinX=e(t[0]),this.compareMinY=e(t[1]),this.toBBox=function(e){return{minX:e[t[0]],minY:e[t[1]],maxX:e[t[2]],maxY:e[t[3]]}}}},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(67);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,i){var n=i(0),s=i(138),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()},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(14),o=i(19),a=i(1),h=i(388),l=i(871),u=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,s,r,l,u){var c=t.sys.game.renderer;a.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=c,this.setTexture(l,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.frame.width),this.potHeight=h(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(this,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.oldFrame=null,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){(this.dirty||this.oldFrame!==this.frame)&&(this.oldFrame=this.frame,this.canvasBufferCtx.clearRect(0,0,this.canvasBuffer.width,this.canvasBuffer.height),this.renderer.gl?(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode)):(this.canvasBuffer.width=this.frame.cutWidth,this.canvasBuffer.height=this.frame.cutHeight,this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.frame.cutWidth,this.frame.cutHeight),this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat")),this.dirty=!1)},destroy:function(){this.renderer.gl&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(22),s=i(0),r=i(14),o=i(19),a=i(1),h=i(876),l=i(873),u=i(872),c=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.MatrixStack,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r){if(void 0===s&&(s=32),void 0===r&&(r=32),a.call(this,t,"RenderTexture"),this.initMatrixStack(),this.renderer=t.sys.game.renderer,this.globalTint=16777215,this.globalAlpha=1,this.renderer.type===o.WEBGL){var h=this.renderer.gl;this.gl=h,this.fill=u.fill,this.clear=u.clear,this.draw=u.draw,this.drawFrame=u.drawFrame,this.texture=this.renderer.createTexture2D(0,h.NEAREST,h.NEAREST,h.CLAMP_TO_EDGE,h.CLAMP_TO_EDGE,h.RGBA,null,s,r,!1),this.framebuffer=this.renderer.createFramebuffer(s,r,this.texture,!1)}else this.renderer.type===o.CANVAS&&(this.fill=l.fill,this.clear=l.clear,this.draw=l.draw,this.drawFrame=l.drawFrame,this.canvas=n.create2D(this,s,r),this.context=this.canvas.getContext("2d"));this.setPosition(e,i),this.setSize(s,r),this.initPipeline("TextureTintPipeline")},destroy:function(){a.prototype.destroy.call(this),this.renderer.type===o.WEBGL&&(this.renderer.deleteTexture(this.texture),this.renderer.deleteFramebuffer(this.framebuffer))},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this}});t.exports=c},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(435),a=i(89),h=i(433),l=i(880),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;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}},destroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,o.prototype.destroy.call(this)}});t.exports=c},function(t,e,i){var n=i(892),s=i(889),r=i(0),o=i(14),a=i(119),h=i(1),l=i(89),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,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}});t.exports=u},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(452),a=i(897),h=i(896),l=i(895),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,l],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.letterSpacing=0,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this.letterSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this.text=t.toString(),this.updateDisplayOrigin()),this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing};return t.data=e,t}});u.ParseRetroFont=h,u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(4),s=i(91),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(6);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){"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(111),r=i(250),o=i(192),a=i(512),h=i(511),l=i(25),u=i(80),c=function(t,e,i,n,s){this.x=t,this.y=e,this.width=i,this.rgb=n,this.alpha=s},d=function(t,e,i,n,s){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,n,s)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,v=[],y=new n({Extends:u,Mixins:[o],initialize:function(t){u.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:h,fragShader:t.fragShader?t.fragShader:a,vertexCapacity:t.vertexCapcity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:2*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.tempTriangle=[{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1}],this.polygonCache=[],this.mvpInit()},onBind:function(){return u.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return u.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchFillRect:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var x=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount,T=r+a,S=o+h,A=m[0],C=m[1],M=m[2],_=m[3],E=d*A+f*M,P=d*C+f*_,L=p*A+g*M,F=p*C+g*_,k=v*A+y*M+m[4],R=v*C+y*_+m[5],O=r*E+o*L+k,B=r*P+o*F+R,D=r*E+S*L+k,I=r*P+S*F+R,Y=T*E+S*L+k,z=T*P+S*F+R,X=T*E+o*L+k,N=T*P+o*F+R,V=l.getTintAppendFloatAlphaAndSwap(u,c);x[b+0]=O,x[b+1]=B,w[b+2]=V,x[b+3]=D,x[b+4]=I,w[b+5]=V,x[b+6]=Y,x[b+7]=z,w[b+8]=V,x[b+9]=O,x[b+10]=B,w[b+11]=V,x[b+12]=Y,x[b+13]=z,w[b+14]=V,x[b+15]=X,x[b+16]=N,w[b+17]=V,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var b=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=w[0],C=w[1],M=w[2],_=w[3],E=p*A+g*M,P=p*C+g*_,L=v*A+y*M,F=v*C+y*_,k=m*A+x*M+w[4],R=m*C+x*_+w[5],O=r*E+o*L+k,B=r*P+o*F+R,D=a*E+h*L+k,I=a*P+h*F+R,Y=u*E+c*L+k,z=u*P+c*F+R,X=l.getTintAppendFloatAlphaAndSwap(d,f);b[S+0]=O,b[S+1]=B,T[S+2]=X,b[S+3]=D,b[S+4]=I,T[S+5]=X,b[S+6]=Y,b[S+7]=z,T[S+8]=X,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,w){var b=this.tempTriangle;b[0].x=r,b[0].y=o,b[0].width=c,b[0].rgb=d,b[0].alpha=f,b[1].x=a,b[1].y=h,b[1].width=c,b[1].rgb=d,b[1].alpha=f,b[2].x=l,b[2].y=u,b[2].width=c,b[2].rgb=d,b[2].alpha=f,b[3].x=r,b[3].y=o,b[3].width=c,b[3].rgb=d,b[3].alpha=f,this.batchStrokePath(t,e,i,n,s,b,c,d,f,p,g,v,y,m,x,!1,w)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v){this.renderer.setPipeline(this);for(var y,m,x,w,b,T,S,A,C,M,_,E,P,L,F,k,R,O=o.length,B=this.polygonCache,D=this.vertexViewF32,I=this.vertexViewU32,Y=0,z=v[0],X=v[1],N=v[2],V=v[3],W=u*z+c*N,G=u*X+c*V,U=d*z+f*N,j=d*X+f*V,H=p*z+g*N+v[4],q=p*X+g*V+v[5],K=l.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,E=(T=B[x+0])*W+(S=B[x+1])*U+H,P=T*G+S*j+q,L=(A=B[w+0])*W+(C=B[w+1])*U+H,F=A*G+C*j+q,k=(M=B[b+0])*W+(_=B[b+1])*U+H,R=M*G+_*j+q,D[Y+0]=E,D[Y+1]=P,I[Y+2]=K,D[Y+3]=L,D[Y+4]=F,I[Y+5]=K,D[Y+6]=k,D[Y+7]=R,I[Y+8]=K,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var w,b,T,S,A=r.length,C=this.polygonCache,M=this.vertexViewF32,_=this.vertexViewU32,E=l.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),w=C[L-1]||C[F-1],b=C[L],M[(T=this.vertexCount*this.vertexComponentCount)+0]=w[6],M[T+1]=w[7],_[T+2]=E(w[8],h),M[T+3]=w[0],M[T+4]=w[1],_[T+5]=E(w[2],h),M[T+6]=b[9],M[T+7]=b[10],_[T+8]=E(b[11],h),M[T+9]=w[0],M[T+10]=w[1],_[T+11]=E(w[2],h),M[T+12]=w[6],M[T+13]=w[7],_[T+14]=E(w[8],h),M[T+15]=b[3],M[T+16]=b[4],_[T+17]=E(b[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var T=b[0],S=b[1],A=b[2],C=b[3],M=g*T+v*A,_=g*S+v*C,E=y*T+m*A,P=y*S+m*C,L=x*T+w*A+b[4],F=x*S+w*C+b[5],k=this.vertexViewF32,R=this.vertexViewU32,O=a-r,B=h-o,D=Math.sqrt(O*O+B*B),I=u*(h-o)/D,Y=u*(r-a)/D,z=c*(h-o)/D,X=c*(r-a)/D,N=a-z,V=h-X,W=r-I,G=o-Y,U=a+z,j=h+X,H=r+I,q=o+Y,K=N*M+V*E+L,J=N*_+V*P+F,Z=W*M+G*E+L,Q=W*_+G*P+F,$=U*M+j*E+L,tt=U*_+j*P+F,et=H*M+q*E+L,it=H*_+q*P+F,nt=l.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return k[ot+0]=K,k[ot+1]=J,R[ot+2]=rt,k[ot+3]=Z,k[ot+4]=Q,R[ot+5]=st,k[ot+6]=$,k[ot+7]=tt,R[ot+8]=rt,k[ot+9]=Z,k[ot+10]=Q,R[ot+11]=st,k[ot+12]=et,k[ot+13]=it,R[ot+14]=st,k[ot+15]=$,k[ot+16]=tt,R[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var r,o,a,h,l,u,y,m,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,b=t.x-x,T=t.y-w,S=t.scaleX,A=t.scaleY,C=-t.rotation,M=t.commandBuffer,_=t.alpha,E=1,P=1,L=0,F=0,k=1,R=e.matrix.matrix,O=null,B=0,D=0,I=0,Y=0,z=0,X=0,N=0,V=0,W=0,G=0,U=null,j=Math.sin,H=Math.cos,q=2*Math.PI,K=j(C),J=H(C),Z=J*S,Q=-K*S,$=K*A,tt=J*A,et=b,it=T,nt=R[0],st=R[1],rt=R[2],ot=R[3],at=R[4],ht=R[5];if(n){var lt=n[0],ut=n[1],ct=n[2],dt=n[3],ft=nt*lt+st*ct,pt=nt*ut+st*dt,gt=rt*lt+ot*ct,vt=rt*ut+ot*dt;r=Z*ft+Q*gt,o=Z*pt+Q*vt,a=$*ft+tt*gt,h=$*pt+tt*vt,l=et*ft+it*gt+(at*lt+ht*ct+n[4]),u=et*pt+it*vt+(at*ut+ht*dt+n[5])}else r=Z*nt+Q*rt,o=Z*st+Q*ot,a=$*nt+tt*rt,h=$*st+tt*ot,l=et*nt+it*rt+at,u=et*st+it*ot+ht;v.length=0;for(var yt=0,mt=M.length;yt0&&(W=W%q-q):W>q?W=q:W<0&&(W=q+W%q);B<1;)D=z+H(Y=W*B+V)*N,I=X+j(Y)*N,O.points.push(new c(D,I,k,L,E*_)),B+=.01;D=z+H(Y=W+V)*N,I=X+j(Y)*N,O.points.push(new c(D,I,k,L,E*_)),yt+=6;break;case s.LINE_STYLE:k=M[yt+1],L=M[yt+2],E=M[yt+3],yt+=3;break;case s.FILL_STYLE:F=M[yt+1],P=M[yt+2],yt+=2;break;case s.BEGIN_PATH:v.length=0,O=null;break;case s.CLOSE_PATH:O&&O.points.length&&O.points.push(O.points[0]);break;case s.FILL_PATH:for(y=0,m=v.length;y=0&&n>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,o?(s.disable(s.SCISSOR_TEST),this):(s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?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),this},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},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;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),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?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),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){return 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=this.config.resolution,i=Math.floor(t.x*e),n=Math.floor(t.y*e),s=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,n,s,r),t.backgroundColor.alphaGL>0){var a=t.backgroundColor,h=this.pipelines.FlatTintPipeline;h.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),h.flush()}},postRenderCamera:function(t){var e=this.pipelines.FlatTintPipeline,i=t.flashEffect.postRenderWebGL(e,o.getTintFromFloats);(t.fadeEffect.postRenderWebGL(e,o.getTintFromFloats)||i)&&e.flush(),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()}},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;l0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],y=e*o-i*r,m=e*a-n*r,x=e*h-s*r,w=i*a-n*o,b=i*h-s*o,T=n*h-s*a,S=l*p-u*f,A=l*g-c*f,C=l*v-d*f,M=u*g-c*p,_=u*v-d*p,E=c*v-d*g,P=y*E-m*_+x*M+w*C-b*A+T*S;return P?(P=1/P,t[0]=(o*E-a*_+h*M)*P,t[1]=(n*_-i*E-s*M)*P,t[2]=(p*T-g*b+v*w)*P,t[3]=(c*b-u*T-d*w)*P,t[4]=(a*C-r*E-h*A)*P,t[5]=(e*E-n*C+s*A)*P,t[6]=(g*x-f*T-v*m)*P,t[7]=(l*T-c*x+d*m)*P,t[8]=(r*_-o*C+h*S)*P,t[9]=(i*C-e*_-s*S)*P,t[10]=(f*b-p*x+v*y)*P,t[11]=(u*x-l*b-d*y)*P,t[12]=(o*A-r*M-a*S)*P,t[13]=(e*M-i*A+n*S)*P,t[14]=(p*m-f*w-g*y)*P,t[15]=(l*w-u*m+c*y)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],y=e[15],m=t.val,x=m[0],w=m[1],b=m[2],T=m[3];return e[0]=x*i+w*o+b*u+T*p,e[1]=x*n+w*a+b*c+T*g,e[2]=x*s+w*h+b*d+T*v,e[3]=x*r+w*l+b*f+T*y,x=m[4],w=m[5],b=m[6],T=m[7],e[4]=x*i+w*o+b*u+T*p,e[5]=x*n+w*a+b*c+T*g,e[6]=x*s+w*h+b*d+T*v,e[7]=x*r+w*l+b*f+T*y,x=m[8],w=m[9],b=m[10],T=m[11],e[8]=x*i+w*o+b*u+T*p,e[9]=x*n+w*a+b*c+T*g,e[10]=x*s+w*h+b*d+T*v,e[11]=x*r+w*l+b*f+T*y,x=m[12],w=m[13],b=m[14],T=m[15],e[12]=x*i+w*o+b*u+T*p,e[13]=x*n+w*a+b*c+T*g,e[14]=x*s+w*h+b*d+T*v,e[15]=x*r+w*l+b*f+T*y,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.set(h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],y=i[7],m=i[8],x=i[9],w=i[10],b=i[11],T=n*n*l+h,S=s*n*l+r*a,A=r*n*l-s*a,C=n*s*l-r*a,M=s*s*l+h,_=r*s*l+n*a,E=n*r*l+s*a,P=s*r*l-n*a,L=r*r*l+h;return i[0]=u*T+p*S+m*A,i[1]=c*T+g*S+x*A,i[2]=d*T+v*S+w*A,i[3]=f*T+y*S+b*A,i[4]=u*C+p*M+m*_,i[5]=c*C+g*M+x*_,i[6]=d*C+v*M+w*_,i[7]=f*C+y*M+b*_,i[8]=u*E+p*P+m*L,i[9]=c*E+g*P+x*L,i[10]=d*E+v*P+w*L,i[11]=f*E+y*P+b*L,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,y=o*h,m=o*l;return i[0]=1-(f+g),i[1]=c+m,i[2]=d-y,i[3]=0,i[4]=c-m,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+y,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,y=r*h;return e[0]=1-(d+p),e[1]=u+y,e[2]=c-v,e[3]=0,e[4]=u-y,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),y=h*(g*=v)-l*(p*=v),m=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(y*y+m*m+x*x))?(y*=v=1/v,m*=v,x*=v):(y=0,m=0,x=0);var w=p*x-g*m,b=g*y-f*x,T=f*m-p*y;return(v=Math.sqrt(w*w+b*b+T*T))?(w*=v=1/v,b*=v,T*=v):(w=0,b=0,T=0),n[0]=y,n[1]=w,n[2]=f,n[3]=0,n[4]=m,n[5]=b,n[6]=p,n[7]=0,n[8]=x,n[9]=T,n[10]=g,n[11]=0,n[12]=-(y*s+m*r+x*o),n[13]=-(w*s+b*r+T*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(272),r=i(545),o=i(544),a=i(543),h=i(75),l=i(143),u=i(6),c=i(82),d=i(271),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(27),s=i(276);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(27);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n,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?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(45);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r=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(153),r=i(10),o=i(152),a=i(57),h=i(68),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(2),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(620),s=i(309),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(20);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.settings.status!==r.RUNNING?this.manager.queueOp("start",t,e):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==r.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=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)},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}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(52),s=i(17),r={SceneManager:i(180),ScenePlugin:i(320),Settings:i(178),Systems:i(109)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n={};t.exports=n;var s=i(294);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(30),s=i(0),r=i(64),o=i(28),a=i(6),h=new s({initialize:function(t,e){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=e.displayWidth,this.height=e.displayHeight,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},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){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),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){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},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(30),s=i(0),r=i(64),o=i(142),a=i(12),h=i(28),l=i(60),u=i(6),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.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.dirty=!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;if(this.syncBounds){var n=t.getBounds(this._bounds);n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._reset=!0)}else{var s=Math.abs(e.scaleX),r=Math.abs(e.scaleY);s===this._sx&&r===this._sy||(this.width=this.sourceWidth*s,this.height=this.sourceHeight*r,this._sx=s,this._sy=r,this._reset=!0)}this._reset&&(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.dirty=!0,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;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),this.newVelocity.set(this.velocity.x*t,this.velocity.y*t),this.position.x+=this.newVelocity.x,this.position.y+=this.newVelocity.y,this.updateCenter(),this.position.x===this.prev.x&&this.position.y===this.prev.y||(this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),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(),this._reset=!1},postUpdate:function(){this.enable&&this.dirty&&(this.dirty=!1,this._dx=this.deltaX(),this._dy=this.deltaY(),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.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.updateCenter(),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(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.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},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 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},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},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 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(330),s=i(23),r=i(0),o=i(329),a=i(64),h=i(54),l=i(9),u=i(328),c=i(327),d=i(4),f=i(213),p=i(676),g=i(12),v=i(212),y=i(675),m=i(670),x=i(669),w=i(75),b=i(325),T=i(326),S=i(6),A=i(34),C=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.bodies=new w,this.staticBodies=new w,this.pendingDestroy=new w,this.colliders=new f,this.gravity=new S(d(e,"gravity.x",0),d(e,"gravity.y",0)),this.bounds=new g(d(e,"x",0),d(e,"y",0),d(e,"width",t.sys.game.config.width),d(e,"height",t.sys.game.config.height)),this.checkCollision={up:d(e,"checkCollision.up",!0),down:d(e,"checkCollision.down",!0),left:d(e,"checkCollision.left",!0),right:d(e,"checkCollision.right",!0)},this.OVERLAP_BIAS=d(e,"overlapBias",4),this.TILE_BIAS=d(e,"tileBias",16),this.forceX=d(e,"forceX",!1),this.isPaused=d(e,"isPaused",!1),this._total=0,this.drawDebug=d(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:d(e,"debugShowBody",!0),debugShowStaticBody:d(e,"debugShowStaticBody",!0),debugShowVelocity:d(e,"debugShowVelocity",!0),bodyDebugColor:d(e,"debugBodyColor",16711935),staticBodyDebugColor:d(e,"debugStaticBodyColor",255),velocityDebugColor:d(e,"debugVelocityColor",65280)},this.maxEntries=d(e,"maxEntries",16),this.tree=new v(this.maxEntries,[".left",".top",".right",".bottom"]),this.staticTree=new v(this.maxEntries,[".left",".top",".right",".bottom"]),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);var i=1;if(Array.isArray(t))for(i=t.length;i--;)t[i].hasOwnProperty("children")?this.enable(t[i].children.entries,e):this.enableBody(t[i],e);else t.hasOwnProperty("children")?this.enable(t.children.entries,e):this.enableBody(t,e)},enableBody:function(t,e){return null===t.body&&(e===a.DYNAMIC_BODY?(t.body=new n(this,t),this.bodies.set(t.body)):e===a.STATIC_BODY&&(t.body=new b(this,t),this.staticBodies.set(t.body),this.staticTree.insert(t.body))),t},remove:function(t){this.disableBody(t)},disable:function(t){var e=1;if(Array.isArray(t))for(e=t.length;e--;)t[e].hasOwnProperty("children")?this.disable(t[e].children.entries):this.disableGameObjectBody(t[e]);else t.hasOwnProperty("children")?this.disable(t.children.entries):this.disableGameObjectBody(t)},disableGameObjectBody:function(t){return t.body&&(t.body.physicsType===a.DYNAMIC_BODY?this.bodies.delete(t.body):t.body.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t.body),this.staticTree.remove(t.body)),t.body.enable=!1),t},disableBody:function(t){t.physicsType===a.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t)),t.enable=!1},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},setBounds:function(t,e,i,n,s,r,o,a){return this.bounds.setTo(t,e,i,n),void 0!==s&&this.setBoundsCollision(s,r,o,a),this},setBoundsCollision: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.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit("pause"),this},resume:function(){return this.isPaused=!1,this.emit("resume"),this},addCollider:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!1,t,e,i,n,s);return this.colliders.add(r),r},addOverlap:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!0,t,e,i,n,s);return this.colliders.add(r),r},removeCollider:function(t){return this.colliders.remove(t),this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i,n;e/=1e3,this.delta=e;var s=this.bodies.entries,r=s.length;for(i=0;i0){var l=this.tree,u=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(d.x,d.y,l.right,l.y)-d.radius):d.y>l.bottom&&(d.xl.right&&(a=h(d.x,d.y,l.right,l.bottom)-d.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 f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),w=f*Math.sin(o)-p*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);return 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,f=t.velocity.x,p=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>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+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?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?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=t.isParent&&void 0===t.physicsType?t.children.entries:t,e=e.isParent&&void 0===e.physicsType?e.children.entries:e;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=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.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,g=e.getTilesWithinWorldXY(a,h,l,u);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m=0?t:t+2*Math.PI}},function(t,e,i){var n=i(7),s=i(46),r=function(t,e,i,n,r){var o=new s(t,e,n,r,i);return o.type="spritesheet",o};n.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;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&&(t.input.dropZone=n),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);if(e){t.camera=e;for(var i=this.manager.hitTest(t.x,t.y,this._list,e),n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var h=[];for(i=0;i1&&(this.sortGameObjects(h),this.topOnly&&h.splice(1)),this._drag[t.id]=h,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(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},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;n-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._tempZones=[],this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&(r+=this.processUpEvents(n)),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off("transitionstart",this.transitionIn,this),e.off("transitionout",this.transitionOut,this),e.off("transitioncomplete",this.transitionComplete,this),e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.keyboard=null,this.mouse=null,this.gamepad=null},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){t.exports={DUALSHOCK_4:i(358),SNES_USB:i(357),XBOX_360:i(356)}},function(t,e,i){t.exports={Axis:i(188),Button:i(187),Gamepad:i(189),GamepadManager:i(190),Configs:i(359)}},function(t,e,i){t.exports={CreateInteractiveObject:i(159),Gamepad:i(360),InputManager:i(191),InputPlugin:i(355),Keyboard:i(354),Mouse:i(349),Pointer:i(182),Touch:i(348)}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},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,i){var n=i(12);n.Area=i(782),n.Ceil=i(781),n.CeilAll=i(780),n.CenterOn=i(365),n.Clone=i(779),n.Contains=i(28),n.ContainsPoint=i(778),n.ContainsRect=i(777),n.CopyFrom=i(776),n.Decompose=i(372),n.Equals=i(775),n.FitInside=i(774),n.FitOutside=i(773),n.Floor=i(772),n.FloorAll=i(771),n.FromPoints=i(268),n.GetAspectRatio=i(220),n.GetCenter=i(770),n.GetPoint=i(127),n.GetPoints=i(286),n.GetSize=i(769),n.Inflate=i(768),n.MarchingAnts=i(558),n.MergePoints=i(767),n.MergeRect=i(766),n.MergeXY=i(765),n.Offset=i(764),n.OffsetPoint=i(763),n.Overlaps=i(762),n.Perimeter=i(93),n.PerimeterPoint=i(761),n.Random=i(146),n.Scale=i(760),n.Union=i(450),t.exports=n},function(t,e,i){var n=i(0),s=i(221),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n0){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){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){t.exports={CircleToCircle:i(829),CircleToRectangle:i(828),GetRectangleIntersection:i(827),LineToCircle:i(374),LineToLine:i(137),LineToRectangle:i(826),PointToLine:i(373),PointToLineSegment:i(825),RectangleToRectangle:i(375),RectangleToTriangle:i(824),RectangleToValues:i(823),TriangleToCircle:i(822),TriangleToLine:i(821),TriangleToTriangle:i(820)}},function(t,e,i){t.exports={Circle:i(839),Ellipse:i(241),Intersects:i(376),Line:i(819),Point:i(801),Polygon:i(787),Rectangle:i(366),Triangle:i(759)}},function(t,e,i){var n=i(0),s=i(379),r=i(141),o=i(25),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(25),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(21),s=i(13),r=i(8),o=i(102);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(31);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(66);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(8),s=i(13),r=i(107);s.register("graphics",function(t){var e=n(t,"add",!0),i=new r(this.scene,t);return e&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(102);i(11).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(11),s=i(31);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(66);i(11).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(107);i(11).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&&e.cameraFilter&s._id||""===e.text)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=e.canvas;if(o.save(),void 0!==r){var h=r.matrix;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY;t.config.roundPixels&&(l|=0,u|=0),o.translate(l,u),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.translate(a.width*(e.flipX?1:0),a.height*(e.flipY?1:0)),o.scale(e.flipX?-1:1,e.flipY?-1:1),o.drawImage(a,0,0,a.width,a.height,-e.displayOriginX,-e.displayOriginY,a.width,a.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(392),s=i(391),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&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,i){var n=i(0),s=i(33),r=i(58),o=i(4),a=i(31),h=i(57),l=i(6),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(6),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;i=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(239),s=i(238),r=i(237),o=i(236),a=i(235),h=i(234),l=i(233),u=i(232),c=i(231),d=i(230),f=i(229),p=i(228);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,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(48),s=i(0),r=i(14),o=i(432),a=i(431),h=i(881),l=i(2),u=i(139),c=i(397),d=i(103),f=i(434),p=i(396),g=i(12),v=i(79),y=i(6),m=i(34),x=new s({Mixins:[r.BlendMode,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","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(33),r=i(54),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.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,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.color=16777215&this.tint|(255*this.alpha|0)<<24,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.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(437),s=i(436),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(439),s=i(160),s=i(160),t.exports={renderWebGL:n,renderCanvas:s}},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(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(51);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(51);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(12);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e){function i(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,n,s){void 0===e&&(e=0),void 0===n&&(n=0);var r={},o=t.getElementsByTagName("info")[0],a=t.getElementsByTagName("common")[0];r.font=o.getAttribute("face"),r.size=i(o,"size"),r.lineHeight=i(a,"lineHeight")+n,r.chars={};var h=t.getElementsByTagName("char"),l=void 0!==s&&s.trimmed;if(l)var u=s.height,c=s.width;for(var d=0;dm&&(s=m),r>x&&(r=x);var A=m+v-s,C=x+y-r;o-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(70);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(26);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(70);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e,i){var n=i(247);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(26);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,l),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;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--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),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 M=l,_=l,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,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){t.exports=function(t,e){if(["layers","tilewidth","tileheight","tileswide","tileshigh"].forEach(function(t){e[t]}),1===e.layers.length){for(var i=new Phaser.FrameData,n=e.tileheight,s=e.tilewidth,r=e.layers[0].tiles,o=0;o0&&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){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t=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(53),s=i(74),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(53),browser:i(74),features:i(112),input:i(505),audio:i(504),video:i(503),fullscreen:i(502),canvasFeatures:i(193)}},function(t,e,i){var n=i(19);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\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\nuniform bool uInvertMaskAlpha;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = mainColor.a;\r\n\r\n if (!uInvertMaskAlpha)\r\n {\r\n alpha *= (maskColor.a);\r\n }\r\n else\r\n {\r\n alpha *= (1.0 - maskColor.a);\r\n }\r\n \r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n"},function(t,e,i){var n=i(266),s=i(22),r=i(19),o=i(112);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.pixelArt&&s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.pixelArt&&n.setCrisp(t.canvas),1!==h.zoom&&(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(254),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(0),s=i(19),r=i(4),o=i(15),a=i(3),h=i(194),l=i(124),u=new n({initialize:function(t){void 0===t&&(t={});this.width=r(t,"width",1024),this.height=r(t,"height",768),this.zoom=r(t,"zoom",1),this.resolution=r(t,"resolution",1),this.renderType=r(t,"type",s.AUTO),this.parent=r(t,"parent",null),this.canvas=r(t,"canvas",null),this.canvasStyle=r(t,"canvasStyle",null),this.sceneConfig=r(t,"scene",null),this.seed=r(t,"seed",[(Date.now()*Math.random()).toString()]),o.RND.init(this.seed),this.gameTitle=r(t,"title",""),this.gameURL=r(t,"url","https://phaser.io"),this.gameVersion=r(t,"version",""),this.inputKeyboard=r(t,"input.keyboard",!0),this.inputKeyboardEventTarget=r(t,"input.keyboard.target",window),this.inputMouse=r(t,"input.mouse",!0),this.inputMouseEventTarget=r(t,"input.mouse.target",null),this.inputMouseCapture=r(t,"input.mouse.capture",!0),this.inputTouch=r(t,"input.touch",!0),this.inputTouchEventTarget=r(t,"input.touch.target",null),this.inputTouchCapture=r(t,"input.touch.capture",!0),this.inputGamepad=r(t,"input.gamepad",!1),this.disableContextMenu=r(t,"disableContextMenu",!1),this.audio=r(t,"audio"),this.hideBanner=!1===r(t,"banner",null),this.hidePhaser=r(t,"banner.hidePhaser",!1),this.bannerTextColor=r(t,"banner.text","#ffffff"),this.bannerBackgroundColor=r(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(t,"fps",null);var e=r(t,"render",t);this.antialias=r(e,"antialias",!0),this.pixelArt=r(e,"pixelArt",!1),this.autoResize=r(e,"autoResize",!1),this.roundPixels=r(e,"roundPixels",!1),this.transparent=r(e,"transparent",!1),this.clearBeforeRender=r(e,"clearBeforeRender",!0),this.premultipliedAlpha=r(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=r(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=r(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(e,"powerPreference","default");var i=r(t,"backgroundColor",0);this.backgroundColor=l(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=r(t,"callbacks.preBoot",a),this.postBoot=r(t,"callbacks.postBoot",a),this.physics=r(t,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(t,"loader.baseURL",""),this.loaderPath=r(t,"loader.path",""),this.loaderEnableParallel=r(t,"loader.enableParallel",!0),this.loaderMaxParallelDownloads=r(t,"loader.maxParallelDownloads",4),this.loaderCrossOrigin=r(t,"loader.crossOrigin",void 0),this.loaderResponseType=r(t,"loader.responseType",""),this.loaderAsync=r(t,"loader.async",!0),this.loaderUser=r(t,"loader.user",""),this.loaderPassword=r(t,"loader.password",""),this.loaderTimeout=r(t,"loader.timeout",0),this.defaultPlugins=r(t,"plugins",h.DefaultScene);var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(t,"images.default",n+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(t,"images.missing",n+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=u},function(t,e,i){var n=i(122),s=i(198),r=i(196),o=i(22),a=i(0),h=i(516),l=i(515),u=i(76),c=i(507),d=i(506),f=i(263),p=i(9),g=i(191),v=i(3),y=i(10),m=i(180),x=i(177),w=i(170),b=i(483),T=i(482),S=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new w(this),this.cache=new r(this),this.registry=new u(this),this.input=new g(this,this.config),this.scene=new m(this,this.config.sceneConfig),this.device=d,this.sound=x.create(this),this.loop=new b(this,this.config.fps),this.plugins=new y(this,this.config),this.onStepCallback=v,this.pendingDestroy=!1,this.removeCanvas=!1,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),l(this),c(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("ready",this.start,this)},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)),T(this.events),this.events.on("hidden",this.onHidden,this),this.events.on("visible",this.onVisible,this),this.events.on("blur",this.onBlur,this),this.events.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e);var i=this.renderer;i.preRender(),this.events.emit("prerender",i),this.scene.render(i),i.postRender(),this.events.emit("postrender",i)},headlessStep:function(t,e){this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e),this.events.emit("prerender"),this.events.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.loop.blur()},onFocus:function(){this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t){this.pendingDestroy=!0,this.removeCanvas=t},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.onStepCallback=null,this.removeCanvas&&this.canvas&&o.remove(this.canvas),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=S},function(t,e,i){var n=i(0),s=i(9),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){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(27);n.ColorToRGBA=i(906),n.ComponentToHex=i(525),n.GetColor=i(144),n.GetColor32=i(278),n.HexStringToColor=i(279),n.HSLToColor=i(905),n.HSVColorWheel=i(904),n.HSVToRGB=i(523),n.HueToComponent=i(524),n.IntegerToColor=i(277),n.IntegerToRGB=i(276),n.Interpolate=i(903),n.ObjectToColor=i(275),n.RandomRGB=i(902),n.RGBStringToColor=i(274),n.RGBToHSV=i(901),n.RGBToString=i(900),n.ValueToColor=i(124),t.exports=n},function(t,e,i){var n=i(0),s=i(76),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&&this.events.off("destroy",this.destroy,this),this.events=this.systems.events,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.systems.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(76),DataManagerPlugin:i(527)}},function(t,e,i){var n=i(267),s=i(0),r=i(81),o=i(6),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&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(539),s=i(538),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*l,e[8]=m*s+x*a+w*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*l-r*a,b=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,_=c*m-p*g,E=d*y-f*v,P=d*m-p*v,L=f*m-p*y,F=x*L-w*P+b*E+T*_-S*M+A*C;return F?(F=1/F,i[0]=(h*L-l*P+u*E)*F,i[1]=(l*_-a*L-u*M)*F,i[2]=(a*P-h*_+u*C)*F,i[3]=(r*P-s*L-o*E)*F,i[4]=(n*L-r*_+o*M)*F,i[5]=(s*_-n*P-o*C)*F,i[6]=(v*A-y*S+m*T)*F,i[7]=(y*b-g*A-m*w)*F,i[8]=(g*S-v*b+m*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(0),s=i(82),r=i(541),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(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(82),s=i(272),r=i(542),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(113),s=i(0),r=i(2),o=i(10),a=i(28),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.currentCameraId=1,this.cameras=[],this.cameraPool=[],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(){this.main||this.boot();var t=this.systems.events;t.on("update",this.update,this),t.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=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),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(4),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={BaseCache:i(197),CacheManager:i(196)}},function(t,e,i){t.exports={Animation:i(201),AnimationFrame:i(199),AnimationManager:i(198)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),l=n-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(15),s=i(60),r=i(203),o=i(202),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},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,clearTint:function(){return this.setTint(16777215),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},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){var i={texture:null,frame:null,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(55),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){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var o=this.currentMatrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=a*t+l*e,o[1]=h*t+u*e,o[2]=a*i+l*n,o[3]=h*i+u*n,o[4]=a*s+l*r+c,o[5]=h*s+u*r+d,this},setTransform:function(t,e,i,n,s,r){var o=this.currentMatrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return i[4]=n*t+r*e+a,i[5]=s*t+o*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=o*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],o=Math.sin(t),a=Math.cos(t);return e[0]=i*a+s*o,e[1]=n*a+r*o,e[2]=i*-o+s*a,e[3]=n*-o+r*a,this}};t.exports=i},function(t,e,i){var n=i(12),s=i(284),r=i(6),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){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(48),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(23),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(40),s=i(38),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(41),o=i(37);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(87),s=i(38),r=i(86),o=i(37);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(84),s=i(40),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(84),s=i(42),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(86),s=i(85);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(580),s=i(87),r=i(84);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(43),o=i(86);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(291),s=[];s[n.BOTTOM_CENTER]=i(584),s[n.BOTTOM_LEFT]=i(583),s[n.BOTTOM_RIGHT]=i(582),s[n.CENTER]=i(581),s[n.LEFT_CENTER]=i(579),s[n.RIGHT_CENTER]=i(578),s[n.TOP_CENTER]=i(577),s[n.TOP_LEFT]=i(576),s[n.TOP_RIGHT]=i(575);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(988),Call:i(987),GetFirst:i(986),GetLast:i(985),GridAlign:i(984),IncAlpha:i(983),IncX:i(982),IncXY:i(981),IncY:i(980),PlaceOnCircle:i(979),PlaceOnEllipse:i(978),PlaceOnLine:i(977),PlaceOnRectangle:i(976),PlaceOnTriangle:i(975),PlayAnimation:i(974),PropertyValueInc:i(32),PropertyValueSet:i(24),RandomCircle:i(973),RandomEllipse:i(972),RandomLine:i(971),RandomRectangle:i(970),RandomTriangle:i(969),Rotate:i(968),RotateAround:i(967),RotateAroundDistance:i(966),ScaleX:i(965),ScaleXY:i(964),ScaleY:i(963),SetAlpha:i(962),SetBlendMode:i(961),SetDepth:i(960),SetHitArea:i(959),SetOrigin:i(958),SetRotation:i(957),SetScale:i(956),SetScaleX:i(955),SetScaleY:i(954),SetTint:i(953),SetVisible:i(952),SetX:i(951),SetXY:i(950),SetY:i(949),ShiftPosition:i(948),Shuffle:i(947),SmootherStep:i(946),SmoothStep:i(945),Spread:i(944),ToggleVisible:i(943),WrapInRectangle:i(942)}},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&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(610),s=i(609),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(129);t.exports=function(t){for(var e=[],i=[],s=0;s-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(623),s=i(2),r=i(100),o=i(309),a=i(62);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(312),Parse2DArray:i(206),ParseCSV:i(311),Impact:i(305),Tiled:i(310)}},function(t,e,i){var n=i(50),s=i(49),r=i(6);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(20);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(63),s=i(35),r=i(103);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(63),s=i(35),r=i(207);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-c&&y>-d&&v=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(994);n.Body=i(77),n.Composite=i(210),n.World=i(661),n.Detector=i(665),n.Grid=i(993),n.Pairs=i(992),n.Pair=i(597),n.Query=i(1014),n.Resolver=i(991),n.SAT=i(664),n.Constraint=i(293),n.Common=i(45),n.Engine=i(990),n.Events=i(294),n.Sleeping=i(322),n.Plugin=i(662),n.Bodies=i(211),n.Composites=i(997),n.Axes=i(667),n.Bounds=i(134),n.Svg=i(1012),n.Vector=i(115),n.Vertices=i(135),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(135),r=i(115);!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(211),s=i(77),r=i(0),o=i(598),a=i(2),h=i(103),l=i(135),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(115),r=i(45);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(328);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.up=!0:e>0&&(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(671);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.left=!0:e>0&&(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(673);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(674),s=i(672),r=i(326);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(64),s=i(17),r={ArcadePhysics:i(689),Body:i(330),Collider:i(329),Factory:i(336),Group:i(333),Image:i(335),Sprite:i(136),StaticBody:i(325),StaticGroup:i(332),World:i(331)};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(388),IsSize:i(121),IsValue:i(709)}},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 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(267);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[ie-i}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN,this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.state=s.LOADER_DESTROYED,this.systems.events.off("start",this.pluginStart,this),this.list=null,this.inflight=null,this.failed=null,this.queue=null,this.storage=null,this.scene=null,this.systems=null}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(7),s=i(46),r=i(214),o=function(t,e,i,n,o,a){var h=new s(t,e,n,o),l=new r(t,i,n,a);return h.linkFile=l,l.linkFile=h,h.linkType="unityatlas",l.linkType="unityatlas",{texture:h,data:l}};n.register("unityAtlas",function(t,e,i,n,s){var r=new o(t,e,i,this.path,n,s);return this.addFile(r.texture),this.addFile(r.data),this}),t.exports=o},function(t,e,i){var n=i(7),s=i(36),r=i(29),o=function(t,e,i,n,r){var o=new s(t,e,i,r);return o.type="tilemapJSON",o.tilemapFormat=n,o};n.register("tilemapTiledJSON",function(t,e,i){if(Array.isArray(t))for(var n=0;n'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",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(220);t.exports=function(t,e){var i=n(t);return it.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomi&&(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(56),s=i(137);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(374),s=i(56);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(373);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(12),s=i(375);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(54);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(12);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(30);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(30);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(83);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(83);n.Area=i(838),n.Circumference=i(287),n.CircumferencePoint=i(128),n.Clone=i(837),n.Contains=i(30),n.ContainsPoint=i(836),n.ContainsRect=i(835),n.CopyFrom=i(834),n.Equals=i(833),n.GetBounds=i(832),n.GetPoint=i(290),n.GetPoints=i(288),n.Offset=i(831),n.OffsetPoint=i(830),n.Random=i(149),t.exports=n},function(t,e,i){var n=i(0),s=i(378),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(21),s=i(13),r=i(8),o=i(224);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(4),a=i(138);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(224);i(11).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(138);i(11).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(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(846),s=i(845),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(13),s=i(8),r=i(150);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(225);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(245),s=i(21),r=i(13),o=i(8),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(143);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(226);s.register("renderTexture",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",32),a=r(t,"height",32),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(13),s=i(8),r=i(2),o=i(227);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(13),s=i(104);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(242),s=i(21),r=i(13),o=i(8);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(243),r=i(13),o=i(8);r.register("container",function(t){var e=o(t,"x",0),i=o(t,"y",0),r=new s(this.scene,e,i);return n(this.scene,r,t),r})},function(t,e,i){var n=i(244),s=i(21),r=i(13),o=i(8);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(150);i(11).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(225);i(11).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(245);i(11).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(143);i(11).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(11),s=i(226);n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var n=i(11),s=i(395);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(11),s=i(227);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(104);i(11).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(242);i(11).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(243),s=!1;i(11).register("container",function(t,e,i){return s||(console.warn("Use of a beta feature: Containers"),s=!0),this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var n=i(244);i(11).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext,a=e.frame;e.updateTileTexture(),t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var h=a.x-e.originX*e.width,l=a.y-e.originY*e.height,u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY,d=1,f=1;if(e.flipX&&(d=-1,h+=e.width),e.flipY&&(f=-1,l+=e.height),t.config.roundPixels&&(h|=0,l|=0,u|=0,c|=0),o.save(),void 0!==r){var p=r.matrix;o.transform(p[0],p[1],p[2],p[3],p[4],p[5])}o.translate(h,l),o.translate(u,c),o.scale(d,f),o.translate(e.originX*e.width,e.originY*e.height),o.rotate(d*f*e.rotation),o.scale(this.scaleX,this.scaleY),o.translate(-e.originX*e.width,-e.originY*e.height),o.translate(-this.tilePositionX,-this.tilePositionY),o.fillStyle=e.canvasPattern,o.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(870),s=i(869),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);this.renderer.setFramebuffer(this.framebuffer);var s=this.gl;return s.clearColor(e/255,i/255,n/255,1),s.clear(s.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},clear:function(){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;return t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},draw:function(t,e,i,n){var s=t.source[e.sourceIndex].glTexture,r=(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16);return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,0,this.renderer.pipelines.TextureTintPipeline.height,-1e3,1e3),this.renderer.pipelines.TextureTintPipeline.drawTexture(s,i,n,r,this.globalAlpha,e.cutX,e.cutY,e.cutWidth,e.cutHeight,this.currentMatrix,null,this),this.renderer.setFramebuffer(null),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,this.renderer.pipelines.TextureTintPipeline.height,0,-1e3,1e3),this}}},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);return this.context.fillStyle="rgb("+e+","+i+","+n+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this},clear:function(){return this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.restore(),this},draw:function(t,e,i,n){var s=this.currentMatrix;return this.context.globalAlpha=this.globalAlpha,this.context.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),this.context.drawImage(t.source[e.sourceIndex].image,e.cutX,e.cutY,e.cutWidth,e.cutHeight,i,n,e.cutWidth,e.cutWidth),this}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=0,h=0,l=1,u=1;if(e.flipX?(l=-1,a-=e.canvas.width-e.displayOriginX):a-=e.displayOriginX,e.flipY?(u=-1,h-=e.canvas.height-e.displayOriginY):h-=e.displayOriginY,o.save(),void 0!==r){var c=r.matrix;o.transform(c[0],c[1],c[2],c[3],c[4],c[5])}o.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.scale(l,u),o.drawImage(e.canvas,a,h),o.restore()}}},function(t,e,i){var n=i(1),s=i(25);t.exports=function(t,e,i,r,o){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&r._id||this.pipeline.batchTexture(e,e.texture,e.texture.width,e.texture.height,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,e.texture.width,e.texture.height,s.getTintAppendFloatAlpha(e.tintTopLeft,e.alphaTopLeft),s.getTintAppendFloatAlpha(e.tintTopRight,e.alphaTopRight),s.getTintAppendFloatAlpha(e.tintBottomLeft,e.alphaBottomLeft),s.getTintAppendFloatAlpha(e.tintBottomRight,e.alphaBottomRight),0,0,r,o)}},function(t,e,i){var n=i(3),s=i(3);n=i(875),s=i(874),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(432),EdgeZone:i(431),RandomZone:i(396)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.emitters.list;if(!(0===o.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=t.currentContext;if(a.save(),void 0!==r){var h=r.matrix;a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}for(var l=0;l>24&255)/255;if(!(x<=0)){var w=m.frame,b=.5*w.width,T=.5*w.height,S=w.canvasData,A=-b,C=-T,M=m.x-p*m.scrollFactorX,_=m.y-g*m.scrollFactorY;v&&(M|=0,_|=0),a.globalAlpha=x,a.save(),a.translate(M,_),a.rotate(m.rotation),a.scale(m.scaleX,m.scaleY),a.drawImage(w.source.image,S.sx,S.sy,S.sWidth,S.sHeight,A,C,S.dWidth,S.dHeight),a.restore()}}a.globalAlpha=f}}a.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(879),s=i(878),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(0),s=i(240),r=i(59),o=i(2),a=i(34),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){t.exports={GravityWell:i(435),Particle:i(434),ParticleEmitter:i(433),ParticleEmitterManager:i(227),Zones:i(877)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,l=e.displayCallback,u=s.scrollX*e.scrollFactorX,c=s.scrollY*e.scrollFactorY,d=e.fontData.chars,f=e.fontData.lineHeight,p=0,g=0,v=0,y=0,m=null,x=0,w=0,b=0,T=0,S=0,A=0,C=null,M=0,_=t.currentContext,E=e.frame.source.image,P=h.cutX,L=h.cutY,F=0,k=e.fontSize/e.fontData.size;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,_.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,_.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),_.save(),void 0!==r){var R=r.matrix;_.transform(R[0],R[1],R[2],R[3],R[4],R[5])}_.translate(e.x,e.y),_.rotate(e.rotation),_.translate(-e.displayOriginX,-e.displayOriginY),_.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(_.save(),_.beginPath(),_.rect(0,0,e.cropWidth,e.cropHeight),_.clip());for(var O=t.config.roundPixels,B=0;B0&&e.cropHeight>0&&_.restore(),_.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text.length;n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(884),s=i(883),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.getRenderList();t.setBlendMode(e.blendMode);var a=t.gameContext,h=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY;if(a.save(),void 0!==r){var u=r.matrix;a.transform(u[0],u[1],u[2],u[3],u[4],u[5])}for(var c=0;c0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(891),s=i(890),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,l=e.fontData.chars,u=e.fontData.lineHeight,c=e.letterSpacing,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,_=h.cutX,E=h.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var L=t.config.roundPixels,F=e.x-s.scrollX*e.scrollFactorX+e.frame.x,k=e.y-s.scrollY*e.scrollFactorY+e.frame.y;if(L&&(F|=0,k|=0),C.save(),void 0!==r){var R=r.matrix;C.transform(R[0],R[1],R[2],R[3],R[4],R[5])}C.translate(F,k),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var O=0;O0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(894),s=i(893),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(4),s=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=e.chars,h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(h).width/i)>a.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(451);t.exports=function(t,e,i,s,r,o,a){var h=t.sys.textures.getFrame(i,s),l=t.sys.cache.xml.get(r);if(h&&l){var u=n(l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:u,texture:i,frame:s}),!0}return!1}},function(t,e,i){var n={DisplayList:i(481),GameObjectCreator:i(13),GameObjectFactory:i(11),UpdateList:i(453),Components:i(14),BuildGameObject:i(21),BuildGameObjectAnimation:i(118),GameObject:i(1),BitmapText:i(245),Blitter:i(244),Container:i(243),DynamicBitmapText:i(242),Graphics:i(107),Group:i(104),Image:i(66),Particles:i(882),PathFollower:i(395),RenderTexture:i(226),Sprite3D:i(143),Sprite:i(31),Text:i(102),TileSprite:i(225),Zone:i(150),Factories:{Blitter:i(868),Container:i(867),DynamicBitmapText:i(866),Graphics:i(387),Group:i(865),Image:i(386),Particles:i(864),PathFollower:i(863),RenderTexture:i(862),Sprite3D:i(861),Sprite:i(385),StaticBitmapText:i(860),Text:i(384),TileSprite:i(859),Zone:i(858)},Creators:{Blitter:i(857),Container:i(856),DynamicBitmapText:i(855),Graphics:i(383),Group:i(854),Image:i(382),Particles:i(853),RenderTexture:i(852),Sprite3D:i(851),Sprite:i(381),StaticBitmapText:i(850),Text:i(380),TileSprite:i(849),Zone:i(848)}};n.Mesh=i(138),n.Quad=i(224),n.Factories.Mesh=i(844),n.Factories.Quad=i(843),n.Creators.Mesh=i(842),n.Creators.Quad=i(841),n.Light=i(379),i(378),i(840),t.exports=n},function(t,e,i){t.exports={AddToDOM:i(122),DOMContentLoaded:i(263),ParseXML:i(262),RemoveFromDOM:i(261),RequestAnimationFrame:i(260)}},function(t,e,i){var n=i(525);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e>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(266),Pool:i(22),Smoothing:i(123),TouchAction:i(908),UserSelect:i(907)}},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(580),GetBottom:i(44),GetCenterX:i(87),GetCenterY:i(84),GetLeft:i(42),GetOffsetX:i(911),GetOffsetY:i(910),GetRight:i(40),GetTop:i(38),SetBottom:i(43),SetCenterX:i(86),SetCenterY:i(85),SetLeft:i(41),SetRight:i(39),SetTop:i(37)}},function(t,e,i){var n=i(40),s=i(38),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){var n=i(87),s=i(38),r=i(43),o=i(86);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(38),r=i(41),o=i(37);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(84),s=i(40),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(39),o=i(37);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(84),s=i(42),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(41),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(86),o=i(37);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(924),BottomLeft:i(923),BottomRight:i(922),LeftBottom:i(921),LeftCenter:i(920),LeftTop:i(919),RightBottom:i(918),RightCenter:i(917),RightTop:i(916),TopCenter:i(915),TopLeft:i(914),TopRight:i(913)}},function(t,e,i){t.exports={BottomCenter:i(584),BottomLeft:i(583),BottomRight:i(582),Center:i(581),LeftCenter:i(579),QuickSet:i(585),RightCenter:i(578),TopCenter:i(577),TopLeft:i(576),TopRight:i(575)}},function(t,e,i){var n=i(291),s=i(17),r={In:i(926),To:i(925)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(927),Bounds:i(912),Canvas:i(909),Color:i(526),Masks:i(522)}},function(t,e,i){var n=i(0),s=i(6),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(535),r=i(533),o=i(11),a=i(532),h=i(929),l=i(531),u=i(12),c=i(529),d=i(6),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;i1)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=F,B=o.clamp(f.friction*k*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,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+R,0),R=T.normalImpulse-X}if(L*L>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(597),r=i(45);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(662),r=i(45);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(295),s=i(0),r=i(598),o=i(1),a=i(2),h=i(283),l=i(31),u=i(6),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(598),r=i(1),o=i(2),a=i(66),h=i(283),l=i(6),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(210),r=i(293),o=i(45),a=i(77),h=i(211);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 F=0;FA&&(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(324),r=i(1048),o=i(323),a=i(1047),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(663),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(324),s=i(1031),r=i(1030);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(1006),COLLIDES:i(324),CollisionMap:i(1005),Factory:i(1004),Image:i(1002),ImpactBody:i(1003),ImpactPhysics:i(1033),Sprite:i(1001),TYPE:i(323),World:i(1e3)}},function(t,e,i){t.exports={Arcade:i(690),Impact:i(1049),Matter:i(1029)}},function(t,e,i){(function(e){i(596);var n=i(19),s=i(17),r={Actions:i(586),Animation:i(554),Cache:i(553),Cameras:i(941),Class:i(0),Create:i(937),Curves:i(931),Data:i(528),Display:i(928),DOM:i(899),EventEmitter:i(518),Game:i(517),GameObjects:i(898),Geom:i(377),Input:i(361),Loader:i(744),Math:i(733),Physics:i(1050),Renderer:i(660),Scene:i(179),Scenes:i(321),Sound:i(319),Structs:i(318),Textures:i(317),Tilemaps:i(655),Time:i(301),Tweens:i(299),Utils:i(606)};r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(204))}])}); \ 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,{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=1053)}([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){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,i){var n=i(15),s=i(4);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){"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(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(574),Animation:i(295),BlendMode:i(573),ComputedSize:i(572),Depth:i(571),Flip:i(570),GetBounds:i(569),MatrixStack:i(568),Origin:i(567),Pipeline:i(283),ScaleMode:i(566),ScrollFactor:i(565),Size:i(564),Texture:i(563),Tint:i(562),ToJSON:i(561),Transform:i(560),TransformMatrix:i(60),Visible:i(559)}},function(t,e,i){var n=i(289),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(292),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);lo.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={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;ns||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(144),r=i(278),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={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},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,i){var n=i(0),s=i(14),r=i(1),o=i(540),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),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=i(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=i(132),s=i(20);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0;e--){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=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(430);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=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}},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){var e=this.matrix,i=t.matrix,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=i[0],u=i[1],c=i[2],d=i[3],f=i[4],p=i[5];return e[0]=l*n+u*r,e[1]=l*s+u*o,e[2]=c*n+d*r,e[3]=c*s+d*o,e[4]=f*n+p*r+a,e[5]=f*s+p*o+h,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},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},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=n},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e,i){var n=i(0),s=i(14),r=i(366),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){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(0),s=i(56),r=i(219),o=i(218),a=i(92),h=i(145),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(1),o=i(438),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Size,s.Texture,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,s){r.call(this,t,"Image"),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline")}});t.exports=a},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(96),s=i(8),r=i(58),o=i(59),a=i(69),h=i(155),l=i(98),u=i(4),c=i(97),d=i(95),f=i(94);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;_=t.length)){for(var i=t.length-1,n=t[e],s=e;s=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:r,onBlur:r,onFocus:r,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=o},function(t,e,i){var n,s=i(53),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,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,i){var n=new(i(0))({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.blockSet=!1,this._frozen=!1,this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){return this.list[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if(this.events.listenerCount("changedata")>0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0&&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;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a=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,i){var n=i(0),s=i(268),r=i(12),o=i(6),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){"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(30),r=i(290),o=i(288),a=i(149),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){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(140),s=i(0),r=i(3),o=i(79),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(47);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(285),r=i(148),o=i(147),a=i(6),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(11),o=i(57),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)))}},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(4);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(2),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(2),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]+" ")}r0&&(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.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(),resolution:this.resolution,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)}});t.exports=p},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(586),s=i(0),r=i(2),o=i(4),a=i(246),h=i(75),l=i(31),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(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&&void 0!==i.key&&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]);for(var e=[],i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i-1&&this.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),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.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,d.TargetCamera,null,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},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){return t?this.resume():this.pause()},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)},resize:function(t,e){this.events.emit("resize",t,e)},shutdown:function(){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)},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;e-y||T>-m||b-y||A>-m||Su&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),this.shakeEffect.preRender()},removeBounds:function(){return this.useBounds=!1,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=l(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,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){return this.scene=t,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),this.zoom=t,this},startFollow:function(t,e){return void 0===e&&(e=!1),this._follow=t,this.roundPixels=e,this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e)},destroy:function(){this.emit("cameradestroy",this),this.removeAllListeners(),this.resetFX(),this.matrix.destroy(),this.culledObjects=[],this.target=void 0,this._bounds=void 0,this.scene=void 0}});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(16),r=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.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},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,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()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(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=s(!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}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(192),r=i(509),o=i(508),a=i(25),h=i(80),l=new n({Extends:h,Mixins:[s],initialize:function(t){h.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:o,fragShader:t.fragShader?t.fragShader:r,vertexCapacity:t.vertexCapacity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+2*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:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:4*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=2e3,this.batches=[],this.mvpInit()},setTexture2D:function(t,e){if(!t)return this;var i=this.batches;0===i.length&&this.pushBatch();var n=i[i.length-1];return e>0?(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},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,l=0,u=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){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},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s,r,o,a,h,l,u,c,d,f,p=this.renderer.config.roundPixels,g=t.emitters.list,v=g.length,y=this.vertexViewF32,m=this.vertexViewU32,x=this.renderer,w=this.maxQuads,b=e.scrollX,T=e.scrollY,S=e.matrix.matrix,A=S[0],C=S[1],M=S[2],_=S[3],E=S[4],P=S[5],L=Math.sin,F=Math.cos,k=this.vertexComponentCount,R=this.vertexCapacity,O=t.defaultFrame.source.glTexture;n&&(h=n[0],l=n[1],u=n[2],c=n[3],d=n[4],f=n[5]),this.setTexture2D(O,0);for(var B=0;B=R&&(this.flush(),this.setTexture2D(O,0));for(var U=0;U=R&&(this.flush(),this.setTexture2D(O,0))}}X+=H,Y-=H,this.vertexCount>=R&&(this.flush(),this.setTexture2D(O,0))}}}this.setTexture2D(O,0)},drawBlitter:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var s=this.renderer.config.roundPixels,r=a.getTintAppendFloatAlpha,o=this.vertexViewF32,h=this.vertexViewU32,l=t.getRenderList(),u=l.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(u/this.maxQuads),b=0;if(n){var T=n[0],S=n[1],A=n[2],C=n[3],M=n[4],_=n[5],E=-m,P=-x,L=A*d+C*p,F=A*f+C*g,k=M*d+_*p+(E*d+P*p+v),R=M*f+_*g+(E*f+P*g+y);d=T*d+S*p,f=T*f+S*g,p=L,g=F,v=k,y=R,m=0,x=0}for(var O=t.x-m,B=t.y-x,D=0;D=this.vertexCapacity&&this.flush()}b+=I,u-=I,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,l,u,c=this.renderer.config.roundPixels,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=e.matrix.matrix,v=t.frame,y=v.texture.source[v.sourceIndex].glTexture,m=!!y.isRenderTexture,x=t.flipX,w=t.flipY^m,b=v.uvs,T=v.width*(x?-1:1),S=v.height*(w?-1:1),A=-t.displayOriginX+v.x+v.width*(x?1:0),C=-t.displayOriginY+v.y+v.height*(w?1:0),M=(c?0|A:A)+T,_=(c?0|C:C)+S,E=t.scaleX,P=t.scaleY,L=t.rotation,F=t._alphaTL,k=t._alphaTR,R=t._alphaBL,O=t._alphaBR,B=t._tintTL,D=t._tintTR,I=t._tintBL,Y=t._tintBR,z=Math.sin(L),X=Math.cos(L),N=X*E,V=z*E,W=-z*P,G=X*P,U=t.x,H=t.y,j=g[0],q=g[1],K=g[2],J=g[3],Z=g[4],Q=g[5];if(n){var $=n[0],tt=n[1],et=n[2],it=n[3],nt=n[4],st=n[5],rt=-e.scrollX*t.scrollFactorX,ot=-e.scrollY*t.scrollFactorY,at=$*j+tt*K,ht=$*q+tt*J,lt=et*j+it*K,ut=et*q+it*J;s=N*at+V*lt,r=N*ht+V*ut,o=W*at+G*lt,h=W*ht+G*ut,l=U*at+H*lt+(nt*j+st*K+(rt*j+ot*K+Z)),u=U*ht+H*ut+(nt*q+st*J+(rt*q+ot*J+Q))}else s=N*j+V*K,r=N*q+V*J,o=W*j+G*K,h=W*q+G*J,l=(U-=e.scrollX*t.scrollFactorX)*j+(H-=e.scrollY*t.scrollFactorY)*K+Z,u=U*q+H*J+Q;var ct,dt=A*s+C*o+l,ft=A*r+C*h+u,pt=A*s+_*o+l,gt=A*r+_*h+u,vt=M*s+_*o+l,yt=M*r+_*h+u,mt=M*s+C*o+l,xt=M*r+C*h+u,wt=d(B,F),bt=d(D,k),Tt=d(I,R),St=d(Y,O);c&&(dt|=0,ft|=0,pt|=0,gt|=0,vt|=0,yt|=0,mt|=0,xt|=0),this.setTexture2D(y,0),f[(ct=this.vertexCount*this.vertexComponentCount)+0]=dt,f[ct+1]=ft,f[ct+2]=b.x0,f[ct+3]=b.y0,p[ct+4]=wt,f[ct+5]=pt,f[ct+6]=gt,f[ct+7]=b.x1,f[ct+8]=b.y1,p[ct+9]=Tt,f[ct+10]=vt,f[ct+11]=yt,f[ct+12]=b.x2,f[ct+13]=b.y2,p[ct+14]=St,f[ct+15]=dt,f[ct+16]=ft,f[ct+17]=b.x0,f[ct+18]=b.y0,p[ct+19]=wt,f[ct+20]=vt,f[ct+21]=yt,f[ct+22]=b.x2,f[ct+23]=b.y2,p[ct+24]=St,f[ct+25]=mt,f[ct+26]=xt,f[ct+27]=b.x3,f[ct+28]=b.y3,p[ct+29]=bt,this.vertexCount+=6},batchMesh:function(t,e,i){var n=null;i&&(n=i.matrix);var s=t.vertices,r=s.length,o=r/2|0;this.renderer.setPipeline(this),this.vertexCount+o>this.vertexCapacity&&this.flush();var h,l,u,c,d,f,p=this.renderer.config.roundPixels,g=a.getTintAppendFloatAlpha,v=t.uv,y=t.colors,m=t.alphas,x=this.vertexViewF32,w=this.vertexViewU32,b=e.matrix.matrix,T=t.frame,S=t.texture.source[T.sourceIndex].glTexture,A=t.x,C=t.y,M=t.scaleX,_=t.scaleY,E=t.rotation,P=Math.sin(E),L=Math.cos(E),F=L*M,k=P*M,R=-P*_,O=L*_,B=A,D=C,I=b[0],Y=b[1],z=b[2],X=b[3],N=b[4],V=b[5],W=0;if(n){var G=n[0],U=n[1],H=n[2],j=n[3],q=n[4],K=n[5],J=-e.scrollX*t.scrollFactorX,Z=-e.scrollY*t.scrollFactorY,Q=G*I+U*z,$=G*Y+U*X,tt=H*I+j*z,et=H*Y+j*X;h=F*Q+k*tt,l=F*$+k*et,u=R*Q+O*tt,c=R*$+O*et,d=B*Q+D*tt+(q*I+K*z+(J*I+Z*z+N)),f=B*$+D*et+(q*Y+K*X+(J*Y+Z*X+V))}else h=F*I+k*z,l=F*Y+k*X,u=R*I+O*z,c=R*Y+O*X,d=(B-=e.scrollX*t.scrollFactorX)*I+(D-=e.scrollY*t.scrollFactorY)*z+N,f=B*Y+D*X+V;this.setTexture2D(S,0),W=this.vertexCount*this.vertexComponentCount;for(var it=0,nt=0;itthis.vertexCapacity&&this.flush();var s,r,o,h,l,u,c,d,f,p,g,v,y,m,x=this.renderer.config.roundPixels,w=t.text,b=w.length,T=a.getTintAppendFloatAlpha,S=this.vertexViewF32,A=this.vertexViewU32,C=e.matrix.matrix,M=e.width+50,_=e.height+50,E=t.frame,P=t.texture.source[E.sourceIndex],L=e.scrollX*t.scrollFactorX,F=e.scrollY*t.scrollFactorY,k=t.fontData,R=k.lineHeight,O=t.fontSize/k.size,B=k.chars,D=t.alpha,I=T(t._tintTL,D),Y=T(t._tintTR,D),z=T(t._tintBL,D),X=T(t._tintBR,D),N=t.x,V=t.y,W=E.cutX,G=E.cutY,U=P.width,H=P.height,j=P.glTexture,q=0,K=0,J=0,Z=0,Q=null,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,lt=0,ut=0,ct=null,dt=0,ft=N+E.x,pt=V+E.y,gt=t.rotation,vt=t.scaleX,yt=t.scaleY,mt=t.letterSpacing,xt=Math.sin(gt),wt=Math.cos(gt),bt=wt*vt,Tt=xt*vt,St=-xt*yt,At=wt*yt,Ct=ft,Mt=pt,_t=C[0],Et=C[1],Pt=C[2],Lt=C[3],Ft=C[4],kt=C[5],Rt=0;if(n){var Ot=n[0],Bt=n[1],Dt=n[2],It=n[3],Yt=n[4],zt=n[5],Xt=-L,Nt=-F,Vt=Ot*_t+Bt*Pt,Wt=Ot*Et+Bt*Lt,Gt=Dt*_t+It*Pt,Ut=Dt*Et+It*Lt;f=bt*Vt+Tt*Gt,p=bt*Wt+Tt*Ut,g=St*Vt+At*Gt,v=St*Wt+At*Ut,y=Ct*Vt+Mt*Gt+(Yt*_t+zt*Pt+(Xt*_t+Nt*Pt+Ft)),m=Ct*Wt+Mt*Ut+(Yt*Et+zt*Lt+(Xt*Et+Nt*Lt+kt))}else f=bt*_t+Tt*Pt,p=bt*Et+Tt*Lt,g=St*_t+At*Pt,v=St*Et+At*Lt,y=(Ct-=L)*_t+(Mt-=F)*Pt+Ft,m=Ct*Et+Mt*Lt+kt;this.setTexture2D(j,0);for(var Ht=0;HtM||r<-50||r>_)&&(o<-50||o>M||h<-50||h>_)&&(l<-50||l>M||u<-50||u>_)&&(c<-50||c>M||d<-50||d>_)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Rt=this.vertexCount*this.vertexComponentCount,x&&(s|=0,r|=0,o|=0,h|=0,l|=0,u|=0,c|=0,d|=0),S[Rt+0]=s,S[Rt+1]=r,S[Rt+2]=at,S[Rt+3]=lt,A[Rt+4]=I,S[Rt+5]=o,S[Rt+6]=h,S[Rt+7]=at,S[Rt+8]=ut,A[Rt+9]=z,S[Rt+10]=l,S[Rt+11]=u,S[Rt+12]=ht,S[Rt+13]=ut,A[Rt+14]=X,S[Rt+15]=s,S[Rt+16]=r,S[Rt+17]=at,S[Rt+18]=lt,A[Rt+19]=I,S[Rt+20]=l,S[Rt+21]=u,S[Rt+22]=ht,S[Rt+23]=ut,A[Rt+24]=X,S[Rt+25]=c,S[Rt+26]=d,S[Rt+27]=ht,S[Rt+28]=lt,A[Rt+29]=Y,this.vertexCount+=6))}}else q=0,J=0,K+=R,ct=null},batchDynamicBitmapText:function(t,e,i){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var s,r,o,h,l,u,c,d,f,p,g,v,y,m,x,w,b,T,S,A,C=this.renderer.config.roundPixels,M=t.displayCallback,_=t.text,E=_.length,P=a.getTintAppendFloatAlpha,L=this.vertexViewF32,F=this.vertexViewU32,k=this.renderer,R=e.matrix.matrix,O=t.frame,B=t.texture.source[O.sourceIndex],D=e.scrollX*t.scrollFactorX,I=e.scrollY*t.scrollFactorY,Y=t.scrollX,z=t.scrollY,X=t.fontData,N=X.lineHeight,V=t.fontSize/X.size,W=X.chars,G=t.alpha,U=P(t._tintTL,G),H=P(t._tintTR,G),j=P(t._tintBL,G),q=P(t._tintBR,G),K=t.x,J=t.y,Z=O.cutX,Q=O.cutY,$=B.width,tt=B.height,et=B.glTexture,it=0,nt=0,st=0,rt=0,ot=null,at=0,ht=0,lt=0,ut=0,ct=0,dt=0,ft=0,pt=0,gt=0,vt=0,yt=0,mt=0,xt=null,wt=0,bt=K+O.x,Tt=J+O.y,St=t.rotation,At=t.scaleX,Ct=t.scaleY,Mt=t.letterSpacing,_t=Math.sin(St),Et=Math.cos(St),Pt=Et*At,Lt=_t*At,Ft=-_t*Ct,kt=Et*Ct,Rt=bt,Ot=Tt,Bt=R[0],Dt=R[1],It=R[2],Yt=R[3],zt=R[4],Xt=R[5],Nt=t.cropWidth>0||t.cropHeight>0,Vt=0;if(n){var Wt=n[0],Gt=n[1],Ut=n[2],Ht=n[3],jt=n[4],qt=n[5],Kt=-D,Jt=-I,Zt=Wt*Bt+Gt*It,Qt=Wt*Dt+Gt*Yt,$t=Ut*Bt+Ht*It,te=Ut*Dt+Ht*Yt;x=Pt*Zt+Lt*$t,w=Pt*Qt+Lt*te,b=Ft*Zt+kt*$t,T=Ft*Qt+kt*te,S=Rt*Zt+Ot*$t+(jt*Bt+qt*It+(Kt*Bt+Jt*It+zt)),A=Rt*Qt+Ot*te+(jt*Dt+qt*Yt+(Kt*Dt+Jt*Yt+Xt))}else x=Pt*Bt+Lt*It,w=Pt*Dt+Lt*Yt,b=Ft*Bt+kt*It,T=Ft*Dt+kt*Yt,S=(Rt-=D)*Bt+(Ot-=I)*It+zt,A=Rt*Dt+Ot*Yt+Xt;this.setTexture2D(et,0),Nt&&k.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var ee=0;eethis.vertexCapacity&&this.flush(),Vt=this.vertexCount*this.vertexComponentCount,C&&(s|=0,r|=0,o|=0,h|=0,l|=0,u|=0,c|=0,d|=0),L[Vt+0]=s,L[Vt+1]=r,L[Vt+2]=gt,L[Vt+3]=yt,F[Vt+4]=U,L[Vt+5]=o,L[Vt+6]=h,L[Vt+7]=gt,L[Vt+8]=mt,F[Vt+9]=j,L[Vt+10]=l,L[Vt+11]=u,L[Vt+12]=vt,L[Vt+13]=mt,F[Vt+14]=q,L[Vt+15]=s,L[Vt+16]=r,L[Vt+17]=gt,L[Vt+18]=yt,F[Vt+19]=U,L[Vt+20]=l,L[Vt+21]=u,L[Vt+22]=vt,L[Vt+23]=mt,F[Vt+24]=q,L[Vt+25]=c,L[Vt+26]=d,L[Vt+27]=vt,L[Vt+28]=yt,F[Vt+29]=H,this.vertexCount+=6}}}else it=0,st=0,nt+=N,xt=null;Nt&&k.popScissor()},batchText:function(t,e,i){var n=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,n(t._tintTL,t._alphaTL),n(t._tintTR,t._alphaTR),n(t._tintBL,t._alphaBL),n(t._tintBR,t._alphaBR),0,0,e,i)},batchDynamicTilemapLayer:function(t,e,i){for(var n=t.culledTiles,s=n.length,r=t.tileset.image.get().source.glTexture,o=t.tileset,h=t.scrollFactorX,l=t.scrollFactorY,u=t.alpha,c=t.x,d=t.y,f=t.scaleX,p=t.scaleY,g=a.getTintAppendFloatAlpha,v=0;vthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0;var L,F,k,R,O,B,D=this.renderer.config.roundPixels,I=this.vertexViewF32,Y=this.vertexViewU32,z=_.matrix.matrix,X=o*(c?1:0)-g,N=a*(d?1:0)-v,V=X+o*(c?-1:1),W=N+a*(d?-1:1),G=s,U=r,H=Math.sin(u),j=Math.cos(u),q=j*h,K=H*h,J=-H*l,Z=j*l,Q=G,$=U,tt=z[0],et=z[1],it=z[2],nt=z[3],st=z[4],rt=z[5];if(P){var ot=P[0],at=P[1],ht=P[2],lt=P[3],ut=P[4],ct=P[5],dt=-_.scrollX*f,ft=-_.scrollY*p,pt=ot*tt+at*it,gt=ot*et+at*nt,vt=ht*tt+lt*it,yt=ht*et+lt*nt;L=q*pt+K*vt,F=q*gt+K*yt,k=J*pt+Z*vt,R=J*gt+Z*yt,O=Q*pt+$*vt+(ut*tt+ct*it+(dt*tt+ft*it+st)),B=Q*gt+$*yt+(ut*et+ct*nt+(dt*et+ft*nt+rt))}else L=q*tt+K*it,F=q*et+K*nt,k=J*tt+Z*it,R=J*et+Z*nt,O=(Q-=_.scrollX*f)*tt+($-=_.scrollY*p)*it+st,B=Q*et+$*nt+rt;var mt,xt=X*L+N*k+O,wt=X*F+N*R+B,bt=X*L+W*k+O,Tt=X*F+W*R+B,St=V*L+W*k+O,At=V*F+W*R+B,Ct=V*L+N*k+O,Mt=V*F+N*R+B,_t=y/i+C,Et=m/n+M,Pt=(y+x)/i+C,Lt=(m+w)/n+M;this.setTexture2D(e,0),mt=this.vertexCount*this.vertexComponentCount,D&&(xt|=0,wt|=0,bt|=0,Tt|=0,St|=0,At|=0,Ct|=0,Mt|=0),I[mt+0]=xt,I[mt+1]=wt,I[mt+2]=_t,I[mt+3]=Et,Y[mt+4]=b,I[mt+5]=bt,I[mt+6]=Tt,I[mt+7]=_t,I[mt+8]=Lt,Y[mt+9]=T,I[mt+10]=St,I[mt+11]=At,I[mt+12]=Pt,I[mt+13]=Lt,Y[mt+14]=S,I[mt+15]=xt,I[mt+16]=wt,I[mt+17]=_t,I[mt+18]=Et,Y[mt+19]=b,I[mt+20]=St,I[mt+21]=At,I[mt+22]=Pt,I[mt+23]=Lt,Y[mt+24]=S,I[mt+25]=Ct,I[mt+26]=Mt,I[mt+27]=Pt,I[mt+28]=Et,Y[mt+29]=A,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,o,h,l,u,c){var d=null;c&&(d=c.matrix),this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var f=this.renderer.config.roundPixels,p=this.vertexViewF32,g=this.vertexViewU32,v=e,y=i,m=v+h,x=y+l,w=u[0],b=u[1],T=u[2],S=u[3],A=u[4],C=u[5];if(d){var M=d[0],_=d[1],E=d[2],P=d[3],L=d[4],F=w*_+b*P,k=T*_+S*P,R=A*_+C*P+d[5];w=w*M+b*E,b=F,T=T*M+S*E,S=k,A=A*M+C*E+L,C=R}var O,B=v*w+y*T+A,D=v*b+y*S+C,I=v*w+x*T+A,Y=v*b+x*S+C,z=m*w+x*T+A,X=m*b+x*S+C,N=m*w+y*T+A,V=m*b+y*S+C,W=t.width,G=t.height,U=r/W,H=o/G,j=(r+h)/W,q=(o+l)/G;n=a.getTintAppendFloatAlpha(n,s),this.setTexture2D(t,0),O=this.vertexCount*this.vertexComponentCount,f&&(B|=0,D|=0,I|=0,Y|=0,z|=0,X|=0,N|=0,V|=0),p[O+0]=B,p[O+1]=D,p[O+2]=U,p[O+3]=H,g[O+4]=n,p[O+5]=I,p[O+6]=Y,p[O+7]=U,p[O+8]=q,g[O+9]=n,p[O+10]=z,p[O+11]=X,p[O+12]=j,p[O+13]=q,g[O+14]=n,p[O+15]=B,p[O+16]=D,p[O+17]=U,p[O+18]=H,g[O+19]=n,p[O+20]=z,p[O+21]=X,p[O+22]=j,p[O+23]=q,g[O+24]=n,p[O+25]=N,p[O+26]=V,p[O+27]=j,p[O+28]=H,g[O+29]=n,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=l},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t,e,i){var n;return void 0===i&&(i=!0),e&&("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(n=e)),n||(n=document.body),i&&n.style&&(n.style.overflow="hidden"),n.appendChild(t),t}},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(93),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.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&&tt.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(115),r=i(45);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(0),s=i(334),r=i(31),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(847),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,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"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),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.length=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(67),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(48),s=i(83),r=i(30),o=i(0),a=i(14),h=i(1),l=i(12),u=i(28),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},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},renderCanvas:function(){},renderWebGL:function(){}});t.exports=c},function(t,e,i){var n=i(0),s=i(9),r=i(68),o=i(57),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=i(0),s=i(18),r=i(2),o=i(117),a=new n({Extends:s,initialize:function(t,e,i,n){this.locked="ontouchstart"in window,this.loaded=!1;var o={type:"audio",extension:r(e,"type",""),key:t,url:r(e,"uri",e),path:i,config:n};s.call(this,o)},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t0&&e.cameraFilter&r._id)){var l=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,c=e.x,d=e.y,f=e.scaleX,p=e.scaleY,g=e.rotation,v=e.commandBuffer,y=a||t.currentContext,m=1,x=1,w=0,b=0,T=1,S=0,A=0,C=0;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,y.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,y.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),y.save(),o){var M=o.matrix;y.transform(M[0],M[1],M[2],M[3],M[4],M[5])}y.translate(c-l,d-u),y.rotate(g),y.scale(f,p),y.fillStyle="#fff",y.globalAlpha=e.alpha;for(var _=0,E=v.length;_>>16,A=(65280&w)>>>8,C=255&w,y.strokeStyle="rgba("+S+","+A+","+C+","+m+")",y.lineWidth=T,_+=3;break;case n.FILL_STYLE:b=v[_+1],x=v[_+2],S=(16711680&b)>>>16,A=(65280&b)>>>8,C=255&b,y.fillStyle="rgba("+S+","+A+","+C+","+x+")",_+=2;break;case n.BEGIN_PATH:y.beginPath();break;case n.CLOSE_PATH:y.closePath();break;case n.FILL_PATH:h||y.fill();break;case n.STROKE_PATH:h||y.stroke();break;case n.FILL_RECT:h?y.rect(v[_+1],v[_+2],v[_+3],v[_+4]):y.fillRect(v[_+1],v[_+2],v[_+3],v[_+4]),_+=4;break;case n.FILL_TRIANGLE:y.beginPath(),y.moveTo(v[_+1],v[_+2]),y.lineTo(v[_+3],v[_+4]),y.lineTo(v[_+5],v[_+6]),y.closePath(),h||y.fill(),_+=6;break;case n.STROKE_TRIANGLE:y.beginPath(),y.moveTo(v[_+1],v[_+2]),y.lineTo(v[_+3],v[_+4]),y.lineTo(v[_+5],v[_+6]),y.closePath(),h||y.stroke(),_+=6;break;case n.LINE_TO:y.lineTo(v[_+1],v[_+2]),_+=2;break;case n.MOVE_TO:y.moveTo(v[_+1],v[_+2]),_+=2;break;case n.LINE_FX_TO:y.lineTo(v[_+1],v[_+2]),_+=5;break;case n.MOVE_FX_TO:y.moveTo(v[_+1],v[_+2]),_+=5;break;case n.SAVE:y.save();break;case n.RESTORE:y.restore();break;case n.TRANSLATE:y.translate(v[_+1],v[_+2]),_+=2;break;case n.SCALE:y.scale(v[_+1],v[_+2]),_+=2;break;case n.ROTATE:y.rotate(v[_+1]),_+=1}y.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(161),s=i(105),r=i(61),o=i(15);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,e,i,n){for(var s=[],r=t;r<=e;r++)if(i||n){var o=i?i+r.toString():r.toString();n&&(o=o.concat(n)),s.push(o)}else s.push(r);return s}},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){var n=i(0),s=i(19),r=i(121),o=i(55),a=new n({initialize:function(t,e,i,n){var s=t.manager.game;this.texture=t,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.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.init(s)},init:function(t){t.config.renderType===s.WEBGL&&(this.glTexture=t.renderer.createTextureFromSource(this.image,this.width,this.height,this.scaleMode)),t.config.pixelArt&&this.setFilter(1)},setFilter:function(t){var e=this.texture.manager.game;e.config.renderType===s.WEBGL&&e.renderer.setTextureFilter(this.glTexture,t)},destroy:function(){this.texture=null,this.image=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(119),r=i(167),o=new n({initialize:function(t,e,i,n,s){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.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},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(73),s=i(0),r=i(175),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=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(){if(this.locked="ontouchstart"in window,this.locked){this.lockedActionsQueue=[];var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];if(t.game.cache.audio.entries.each(function(t,e){for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.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.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(en&&-1!==i&&-1!==n){var s=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i,0,s)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i=0;t--){this.scenes[t].sys.destroy()}this.update=o,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),this.enabled&&this.startListeners()},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},s={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("touchstart",t,s),i.addEventListener("touchmove",t,s),i.addEventListener("touchend",t,s)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("touchstart",t,n),i.addEventListener("touchmove",t,n),i.addEventListener("touchend",t,n)),this.handler=t},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.handler),t.removeEventListener("touchmove",this.handler),t.removeEventListener("touchend",this.handler)},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=n},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.camera=null,this.buttons=0,this.position=new s,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.dragState=0,this.isDown=!1,this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.wasTouch=!1,this.movementX=0,this.movementY=0},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},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}},reset:function(){this.dirty=!1,this.justDown=!1,this.justUp=!1,this.justMoved=!1,this.movementX=0,this.movementY=0},touchmove:function(t){this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.justMoved=!0,this.dirty=!0,this.wasTouch=!0},move:function(t){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),this.manager.mouse.locked&&(this.movementX+=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY+=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.justMoved=!0,this.dirty=!0,this.wasTouch=!1},down:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e),this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!1},touchstart:function(t,e){this.buttons=1,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e,this.justDown=!0,this.isDown=!0,this.dirty=!0,this.wasTouch=!0},up:function(t,e){t.buttons&&(this.buttons=t.buttons),this.event=t,this.x=this.manager.transformX(t.pageX),this.y=this.manager.transformY(t.pageY),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e),this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!1},touchend:function(t,e){this.buttons=0,this.event=t,this.x=this.manager.transformX(t.changedTouches[0].pageX),this.y=this.manager.transformY(t.changedTouches[0].pageY),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e,this.justUp=!0,this.isDown=!1,this.dirty=!0,this.wasTouch=!0},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return 1&this.buttons},rightButtonDown:function(){return 2&this.buttons},middleButtonDown:function(){return 4&this.buttons},backButtonDown:function(){return 8&this.buttons},forwardButtonDown:function(){return 16&this.buttons},destroy:function(){this.camera=null,this.manager=null,this.position=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(112),r=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.handler,this.locked=!1},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target||(this.target=this.manager.game.canvas),t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},pointerLockChange:function(t){var e=this.target;this.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,this.manager.queue.push(t)},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t,e=this.manager.queue,i=this.target,n={passive:!0},r={passive:!1};this.capture?(t=function(t){t.defaultPrevented||(e.push(t),t.preventDefault())},i.addEventListener("mousemove",t,r),i.addEventListener("mousedown",t,r),i.addEventListener("mouseup",t,r)):(t=function(t){t.defaultPrevented||e.push(t)},i.addEventListener("mousemove",t,n),i.addEventListener("mousedown",t,n),i.addEventListener("mouseup",t,n)),this.handler=t,s.pointerLock&&(this.pointerLockChange=this.pointerLockChange.bind(this),document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.handler),t.removeEventListener("mousedown",this.handler),t.removeEventListener("mouseup",this.handler),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.manager=null}});t.exports=r},function(t,e,i){var n=i(0),s=i(2),r=i(501),o=i(499),a=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});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)=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=this.game.config.resolution,c=this._tempMatrix,f=0;fe.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(23),s=i(0),r=i(200),o=i(199),a=i(4),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),t.updateFrame(this.frames[e])},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,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),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.forward=!0,t.updateFrame(t.currentFrame.nextFrame),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;t0&&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(164);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e,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(67);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,i){var n=i(0),s=i(138),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()},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(14),o=i(19),a=i(1),h=i(388),l=i(871),u=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,s,r,l,u){var c=t.sys.game.renderer;a.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=c,this.setTexture(l,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=h(this.frame.width),this.potHeight=h(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(this,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.oldFrame=null,this.updateTileTexture(),t.sys.game.config.renderType===o.WEBGL&&t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},updateTileTexture:function(){(this.dirty||this.oldFrame!==this.frame)&&(this.oldFrame=this.frame,this.canvasBufferCtx.clearRect(0,0,this.canvasBuffer.width,this.canvasBuffer.height),this.renderer.gl?(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode)):(this.canvasBuffer.width=this.frame.cutWidth,this.canvasBuffer.height=this.frame.cutHeight,this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.frame.cutWidth,this.frame.cutHeight),this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat")),this.dirty=!1)},destroy:function(){this.renderer.gl&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(22),s=i(0),r=i(14),o=i(19),a=i(1),h=i(879),l=i(876),u=i(875),c=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.MatrixStack,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r){if(void 0===s&&(s=32),void 0===r&&(r=32),a.call(this,t,"RenderTexture"),this.initMatrixStack(),this.renderer=t.sys.game.renderer,this.globalTint=16777215,this.globalAlpha=1,this.renderer.type===o.WEBGL){var h=this.renderer.gl;this.gl=h,this.fill=u.fill,this.clear=u.clear,this.draw=u.draw,this.drawFrame=u.drawFrame,this.texture=this.renderer.createTexture2D(0,h.NEAREST,h.NEAREST,h.CLAMP_TO_EDGE,h.CLAMP_TO_EDGE,h.RGBA,null,s,r,!1),this.framebuffer=this.renderer.createFramebuffer(s,r,this.texture,!1)}else this.renderer.type===o.CANVAS&&(this.fill=l.fill,this.clear=l.clear,this.draw=l.draw,this.drawFrame=l.drawFrame,this.canvas=n.create2D(this,s,r),this.context=this.canvas.getContext("2d"));this.setPosition(e,i),this.setSize(s,r),this.initPipeline("TextureTintPipeline")},destroy:function(){a.prototype.destroy.call(this),this.renderer.type===o.WEBGL&&(this.renderer.deleteTexture(this.texture),this.renderer.deleteFramebuffer(this.framebuffer))},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this}});t.exports=c},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(435),a=i(89),h=i(433),l=i(883),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;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}},destroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,o.prototype.destroy.call(this)}});t.exports=c},function(t,e,i){var n=i(895),s=i(892),r=i(0),o=i(14),a=i(119),h=i(1),l=i(89),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,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}});t.exports=u},function(t,e,i){var n=i(0),s=i(14),r=i(1),o=i(452),a=i(899),h=i(898),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.letterSpacing=0,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this.letterSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this.text=t.toString(),this.updateDisplayOrigin()),this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing};return t.data=e,t}});l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(4),s=i(91),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(6);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){"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(111),r=i(250),o=i(192),a=i(512),h=i(511),l=i(25),u=i(80),c=function(t,e,i,n,s){this.x=t,this.y=e,this.width=i,this.rgb=n,this.alpha=s},d=function(t,e,i,n,s){this.points=[],this.pointsLength=1,this.points[0]=new c(t,e,i,n,s)},f=new Float32Array([1,0,0,1,0,0]),p=new Float32Array(6e3),g=0,v=[],y=new n({Extends:u,Mixins:[o],initialize:function(t){u.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:h,fragShader:t.fragShader?t.fragShader:a,vertexCapacity:t.vertexCapcity?t.vertexCapacity:12e3,vertexSize:t.vertexSize?t.vertexSize:2*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT,attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:2*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.tempTriangle=[{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1},{x:0,y:0,width:0,rgb:16777215,alpha:1}],this.polygonCache=[],this.mvpInit()},onBind:function(){return u.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return u.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},batchFillRect:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var x=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount,T=r+a,S=o+h,A=m[0],C=m[1],M=m[2],_=m[3],E=d*A+f*M,P=d*C+f*_,L=p*A+g*M,F=p*C+g*_,k=v*A+y*M+m[4],R=v*C+y*_+m[5],O=r*E+o*L+k,B=r*P+o*F+R,D=r*E+S*L+k,I=r*P+S*F+R,Y=T*E+S*L+k,z=T*P+S*F+R,X=T*E+o*L+k,N=T*P+o*F+R,V=l.getTintAppendFloatAlphaAndSwap(u,c);x[b+0]=O,x[b+1]=B,w[b+2]=V,x[b+3]=D,x[b+4]=I,w[b+5]=V,x[b+6]=Y,x[b+7]=z,w[b+8]=V,x[b+9]=O,x[b+10]=B,w[b+11]=V,x[b+12]=Y,x[b+13]=z,w[b+14]=V,x[b+15]=X,x[b+16]=N,w[b+17]=V,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var b=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=w[0],C=w[1],M=w[2],_=w[3],E=p*A+g*M,P=p*C+g*_,L=v*A+y*M,F=v*C+y*_,k=m*A+x*M+w[4],R=m*C+x*_+w[5],O=r*E+o*L+k,B=r*P+o*F+R,D=a*E+h*L+k,I=a*P+h*F+R,Y=u*E+c*L+k,z=u*P+c*F+R,X=l.getTintAppendFloatAlphaAndSwap(d,f);b[S+0]=O,b[S+1]=B,T[S+2]=X,b[S+3]=D,b[S+4]=I,T[S+5]=X,b[S+6]=Y,b[S+7]=z,T[S+8]=X,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,w){var b=this.tempTriangle;b[0].x=r,b[0].y=o,b[0].width=c,b[0].rgb=d,b[0].alpha=f,b[1].x=a,b[1].y=h,b[1].width=c,b[1].rgb=d,b[1].alpha=f,b[2].x=l,b[2].y=u,b[2].width=c,b[2].rgb=d,b[2].alpha=f,b[3].x=r,b[3].y=o,b[3].width=c,b[3].rgb=d,b[3].alpha=f,this.batchStrokePath(t,e,i,n,s,b,c,d,f,p,g,v,y,m,x,!1,w)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v){this.renderer.setPipeline(this);for(var y,m,x,w,b,T,S,A,C,M,_,E,P,L,F,k,R,O=o.length,B=this.polygonCache,D=this.vertexViewF32,I=this.vertexViewU32,Y=0,z=v[0],X=v[1],N=v[2],V=v[3],W=u*z+c*N,G=u*X+c*V,U=d*z+f*N,H=d*X+f*V,j=p*z+g*N+v[4],q=p*X+g*V+v[5],K=l.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,E=(T=B[x+0])*W+(S=B[x+1])*U+j,P=T*G+S*H+q,L=(A=B[w+0])*W+(C=B[w+1])*U+j,F=A*G+C*H+q,k=(M=B[b+0])*W+(_=B[b+1])*U+j,R=M*G+_*H+q,D[Y+0]=E,D[Y+1]=P,I[Y+2]=K,D[Y+3]=L,D[Y+4]=F,I[Y+5]=K,D[Y+6]=k,D[Y+7]=R,I[Y+8]=K,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var w,b,T,S,A=r.length,C=this.polygonCache,M=this.vertexViewF32,_=this.vertexViewU32,E=l.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),w=C[L-1]||C[F-1],b=C[L],M[(T=this.vertexCount*this.vertexComponentCount)+0]=w[6],M[T+1]=w[7],_[T+2]=E(w[8],h),M[T+3]=w[0],M[T+4]=w[1],_[T+5]=E(w[2],h),M[T+6]=b[9],M[T+7]=b[10],_[T+8]=E(b[11],h),M[T+9]=w[0],M[T+10]=w[1],_[T+11]=E(w[2],h),M[T+12]=w[6],M[T+13]=w[7],_[T+14]=E(w[8],h),M[T+15]=b[3],M[T+16]=b[4],_[T+17]=E(b[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var T=b[0],S=b[1],A=b[2],C=b[3],M=g*T+v*A,_=g*S+v*C,E=y*T+m*A,P=y*S+m*C,L=x*T+w*A+b[4],F=x*S+w*C+b[5],k=this.vertexViewF32,R=this.vertexViewU32,O=a-r,B=h-o,D=Math.sqrt(O*O+B*B),I=u*(h-o)/D,Y=u*(r-a)/D,z=c*(h-o)/D,X=c*(r-a)/D,N=a-z,V=h-X,W=r-I,G=o-Y,U=a+z,H=h+X,j=r+I,q=o+Y,K=N*M+V*E+L,J=N*_+V*P+F,Z=W*M+G*E+L,Q=W*_+G*P+F,$=U*M+H*E+L,tt=U*_+H*P+F,et=j*M+q*E+L,it=j*_+q*P+F,nt=l.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return k[ot+0]=K,k[ot+1]=J,R[ot+2]=rt,k[ot+3]=Z,k[ot+4]=Q,R[ot+5]=st,k[ot+6]=$,k[ot+7]=tt,R[ot+8]=rt,k[ot+9]=Z,k[ot+10]=Q,R[ot+11]=st,k[ot+12]=et,k[ot+13]=it,R[ot+14]=st,k[ot+15]=$,k[ot+16]=tt,R[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e,i){if(!(t.commandBuffer.length<=0)){var n=null;i&&(n=i.matrix),this.renderer.setPipeline(this);var r,o,a,h,l,u,y,m,x=e.scrollX*t.scrollFactorX,w=e.scrollY*t.scrollFactorY,b=t.x,T=t.y,S=t.scaleX,A=t.scaleY,C=t.rotation,M=t.commandBuffer,_=t.alpha,E=1,P=1,L=0,F=0,k=1,R=e.matrix.matrix,O=null,B=0,D=0,I=0,Y=0,z=0,X=0,N=0,V=0,W=0,G=0,U=null,H=Math.sin,j=Math.cos,q=2*Math.PI,K=H(C),J=j(C),Z=J*S,Q=K*S,$=-K*A,tt=J*A,et=b,it=T,nt=R[0],st=R[1],rt=R[2],ot=R[3],at=R[4],ht=R[5];if(n){var lt=n[0],ut=n[1],ct=n[2],dt=n[3],ft=n[4],pt=n[5],gt=-x,vt=-w,yt=lt*nt+ut*rt,mt=lt*st+ut*ot,xt=ct*nt+dt*rt,wt=ct*st+dt*ot;r=Z*yt+Q*xt,o=Z*mt+Q*wt,a=$*yt+tt*xt,h=$*mt+tt*wt,l=et*yt+it*xt+(ft*nt+pt*rt+(gt*nt+vt*rt+at)),u=et*mt+it*wt+(ft*st+pt*ot+(gt*st+vt*ot+ht))}else r=Z*nt+Q*rt,o=Z*st+Q*ot,a=$*nt+tt*rt,h=$*st+tt*ot,l=(et-=x)*nt+(it-=w)*rt+at,u=et*st+it*ot+ht;v.length=0;for(var bt=0,Tt=M.length;bt0&&(W=W%q-q):W>q?W=q:W<0&&(W=q+W%q);B<1;)D=z+j(Y=W*B+V)*N,I=X+H(Y)*N,O.points.push(new c(D,I,k,L,E*_)),B+=.01;D=z+j(Y=W+V)*N,I=X+H(Y)*N,O.points.push(new c(D,I,k,L,E*_)),bt+=6;break;case s.LINE_STYLE:k=M[bt+1],L=M[bt+2],E=M[bt+3],bt+=3;break;case s.FILL_STYLE:F=M[bt+1],P=M[bt+2],bt+=2;break;case s.BEGIN_PATH:v.length=0,O=null;break;case s.CLOSE_PATH:O&&O.points.length&&O.points.push(O.points[0]);break;case s.FILL_PATH:for(y=0,m=v.length;y=0&&n>=0;return r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,o?(s.disable(s.SCISSOR_TEST),this):(s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?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),this},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},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;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),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?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),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){return 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=this.config.resolution,i=Math.floor(t.x*e),n=Math.floor(t.y*e),s=Math.floor(t.width*e),r=Math.floor(t.height*e);if(this.pushScissor(i,n,s,r),t.backgroundColor.alphaGL>0){var a=t.backgroundColor,h=this.pipelines.FlatTintPipeline;h.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),h.flush()}},postRenderCamera:function(t){var e=this.pipelines.FlatTintPipeline,i=t.flashEffect.postRenderWebGL(e,o.getTintFromFloats);(t.fadeEffect.postRenderWebGL(e,o.getTintFromFloats)||i)&&e.flush(),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()}},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;l0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],y=e*o-i*r,m=e*a-n*r,x=e*h-s*r,w=i*a-n*o,b=i*h-s*o,T=n*h-s*a,S=l*p-u*f,A=l*g-c*f,C=l*v-d*f,M=u*g-c*p,_=u*v-d*p,E=c*v-d*g,P=y*E-m*_+x*M+w*C-b*A+T*S;return P?(P=1/P,t[0]=(o*E-a*_+h*M)*P,t[1]=(n*_-i*E-s*M)*P,t[2]=(p*T-g*b+v*w)*P,t[3]=(c*b-u*T-d*w)*P,t[4]=(a*C-r*E-h*A)*P,t[5]=(e*E-n*C+s*A)*P,t[6]=(g*x-f*T-v*m)*P,t[7]=(l*T-c*x+d*m)*P,t[8]=(r*_-o*C+h*S)*P,t[9]=(i*C-e*_-s*S)*P,t[10]=(f*b-p*x+v*y)*P,t[11]=(u*x-l*b-d*y)*P,t[12]=(o*A-r*M-a*S)*P,t[13]=(e*M-i*A+n*S)*P,t[14]=(p*m-f*w-g*y)*P,t[15]=(l*w-u*m+c*y)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],y=e[15],m=t.val,x=m[0],w=m[1],b=m[2],T=m[3];return e[0]=x*i+w*o+b*u+T*p,e[1]=x*n+w*a+b*c+T*g,e[2]=x*s+w*h+b*d+T*v,e[3]=x*r+w*l+b*f+T*y,x=m[4],w=m[5],b=m[6],T=m[7],e[4]=x*i+w*o+b*u+T*p,e[5]=x*n+w*a+b*c+T*g,e[6]=x*s+w*h+b*d+T*v,e[7]=x*r+w*l+b*f+T*y,x=m[8],w=m[9],b=m[10],T=m[11],e[8]=x*i+w*o+b*u+T*p,e[9]=x*n+w*a+b*c+T*g,e[10]=x*s+w*h+b*d+T*v,e[11]=x*r+w*l+b*f+T*y,x=m[12],w=m[13],b=m[14],T=m[15],e[12]=x*i+w*o+b*u+T*p,e[13]=x*n+w*a+b*c+T*g,e[14]=x*s+w*h+b*d+T*v,e[15]=x*r+w*l+b*f+T*y,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.set(h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],y=i[7],m=i[8],x=i[9],w=i[10],b=i[11],T=n*n*l+h,S=s*n*l+r*a,A=r*n*l-s*a,C=n*s*l-r*a,M=s*s*l+h,_=r*s*l+n*a,E=n*r*l+s*a,P=s*r*l-n*a,L=r*r*l+h;return i[0]=u*T+p*S+m*A,i[1]=c*T+g*S+x*A,i[2]=d*T+v*S+w*A,i[3]=f*T+y*S+b*A,i[4]=u*C+p*M+m*_,i[5]=c*C+g*M+x*_,i[6]=d*C+v*M+w*_,i[7]=f*C+y*M+b*_,i[8]=u*E+p*P+m*L,i[9]=c*E+g*P+x*L,i[10]=d*E+v*P+w*L,i[11]=f*E+y*P+b*L,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,y=o*h,m=o*l;return i[0]=1-(f+g),i[1]=c+m,i[2]=d-y,i[3]=0,i[4]=c-m,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+y,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,y=r*h;return e[0]=1-(d+p),e[1]=u+y,e[2]=c-v,e[3]=0,e[4]=u-y,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),y=h*(g*=v)-l*(p*=v),m=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(y*y+m*m+x*x))?(y*=v=1/v,m*=v,x*=v):(y=0,m=0,x=0);var w=p*x-g*m,b=g*y-f*x,T=f*m-p*y;return(v=Math.sqrt(w*w+b*b+T*T))?(w*=v=1/v,b*=v,T*=v):(w=0,b=0,T=0),n[0]=y,n[1]=w,n[2]=f,n[3]=0,n[4]=m,n[5]=b,n[6]=p,n[7]=0,n[8]=x,n[9]=T,n[10]=g,n[11]=0,n[12]=-(y*s+m*r+x*o),n[13]=-(w*s+b*r+T*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(272),r=i(545),o=i(544),a=i(543),h=i(75),l=i(143),u=i(6),c=i(82),d=i(271),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(27),s=i(276);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(27);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n,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?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(45);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r=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(153),r=i(10),o=i(152),a=i(57),h=i(68),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(2),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(620),s=i(309),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(20);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.settings.status!==r.RUNNING?this.manager.queueOp("start",t,e):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==r.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=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)},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}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){var n=i(52),s=i(16),r={SceneManager:i(180),ScenePlugin:i(320),Settings:i(178),Systems:i(109)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n={};t.exports=n;var s=i(294);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(30),s=i(0),r=i(64),o=i(28),a=i(6),h=new s({initialize:function(t,e){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=e.displayWidth,this.height=e.displayHeight,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},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){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),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){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},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(30),s=i(0),r=i(64),o=i(142),a=i(12),h=i(28),l=i(60),u=i(6),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.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.dirty=!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;if(this.syncBounds){var n=t.getBounds(this._bounds);n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._reset=!0)}else{var s=Math.abs(e.scaleX),r=Math.abs(e.scaleY);s===this._sx&&r===this._sy||(this.width=this.sourceWidth*s,this.height=this.sourceHeight*r,this._sx=s,this._sy=r,this._reset=!0)}this._reset&&(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.dirty=!0,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;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),this.newVelocity.set(this.velocity.x*t,this.velocity.y*t),this.position.x+=this.newVelocity.x,this.position.y+=this.newVelocity.y,this.updateCenter(),this.position.x===this.prev.x&&this.position.y===this.prev.y||(this.angle=Math.atan2(this.velocity.y,this.velocity.x)),this.speed=Math.sqrt(this.velocity.x*this.velocity.x+this.velocity.y*this.velocity.y),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(),this._reset=!1},postUpdate:function(){this.enable&&this.dirty&&(this.dirty=!1,this._dx=this.deltaX(),this._dy=this.deltaY(),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.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.updateCenter(),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(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.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},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 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},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},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 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(330),s=i(23),r=i(0),o=i(329),a=i(64),h=i(54),l=i(9),u=i(328),c=i(327),d=i(4),f=i(213),p=i(676),g=i(12),v=i(212),y=i(675),m=i(670),x=i(669),w=i(75),b=i(325),T=i(326),S=i(6),A=i(34),C=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.bodies=new w,this.staticBodies=new w,this.pendingDestroy=new w,this.colliders=new f,this.gravity=new S(d(e,"gravity.x",0),d(e,"gravity.y",0)),this.bounds=new g(d(e,"x",0),d(e,"y",0),d(e,"width",t.sys.game.config.width),d(e,"height",t.sys.game.config.height)),this.checkCollision={up:d(e,"checkCollision.up",!0),down:d(e,"checkCollision.down",!0),left:d(e,"checkCollision.left",!0),right:d(e,"checkCollision.right",!0)},this.OVERLAP_BIAS=d(e,"overlapBias",4),this.TILE_BIAS=d(e,"tileBias",16),this.forceX=d(e,"forceX",!1),this.isPaused=d(e,"isPaused",!1),this._total=0,this.drawDebug=d(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:d(e,"debugShowBody",!0),debugShowStaticBody:d(e,"debugShowStaticBody",!0),debugShowVelocity:d(e,"debugShowVelocity",!0),bodyDebugColor:d(e,"debugBodyColor",16711935),staticBodyDebugColor:d(e,"debugStaticBodyColor",255),velocityDebugColor:d(e,"debugVelocityColor",65280)},this.maxEntries=d(e,"maxEntries",16),this.tree=new v(this.maxEntries),this.staticTree=new v(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);var i=1;if(Array.isArray(t))for(i=t.length;i--;)t[i].hasOwnProperty("children")?this.enable(t[i].children.entries,e):this.enableBody(t[i],e);else t.hasOwnProperty("children")?this.enable(t.children.entries,e):this.enableBody(t,e)},enableBody:function(t,e){return null===t.body&&(e===a.DYNAMIC_BODY?(t.body=new n(this,t),this.bodies.set(t.body)):e===a.STATIC_BODY&&(t.body=new b(this,t),this.staticBodies.set(t.body),this.staticTree.insert(t.body))),t},remove:function(t){this.disableBody(t)},disable:function(t){var e=1;if(Array.isArray(t))for(e=t.length;e--;)t[e].hasOwnProperty("children")?this.disable(t[e].children.entries):this.disableGameObjectBody(t[e]);else t.hasOwnProperty("children")?this.disable(t.children.entries):this.disableGameObjectBody(t)},disableGameObjectBody:function(t){return t.body&&(t.body.physicsType===a.DYNAMIC_BODY?this.bodies.delete(t.body):t.body.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t.body),this.staticTree.remove(t.body)),t.body.enable=!1),t},disableBody:function(t){t.physicsType===a.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===a.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t)),t.enable=!1},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},setBounds:function(t,e,i,n,s,r,o,a){return this.bounds.setTo(t,e,i,n),void 0!==s&&this.setBoundsCollision(s,r,o,a),this},setBoundsCollision: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.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit("pause"),this},resume:function(){return this.isPaused=!1,this.emit("resume"),this},addCollider:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!1,t,e,i,n,s);return this.colliders.add(r),r},addOverlap:function(t,e,i,n,s){void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i);var r=new o(this,!0,t,e,i,n,s);return this.colliders.add(r),r},removeCollider:function(t){return this.colliders.remove(t),this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i,n;e/=1e3,this.delta=e;var s=this.bodies.entries,r=s.length;for(i=0;i0){var l=this.tree,u=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(d.x,d.y,l.right,l.y)-d.radius):d.y>l.bottom&&(d.xl.right&&(a=h(d.x,d.y,l.right,l.bottom)-d.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 f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),w=f*Math.sin(o)-p*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);return 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,f=t.velocity.x,p=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>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+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?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?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=t.isParent&&void 0===t.physicsType?t.children.entries:t,e=e.isParent&&void 0===e.physicsType?e.children.entries:e;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=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.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,g=e.getTilesWithinWorldXY(a,h,l,u);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m=0?t:t+2*Math.PI}},function(t,e,i){var n=i(7),s=i(46),r=function(t,e,i,n,r){var o=new s(t,e,n,r,i);return o.type="spritesheet",o};n.register("spritesheet",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;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&&(t.input.dropZone=n),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);if(e){t.camera=e;for(var i=this.manager.hitTest(t.x,t.y,this._list,e),n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var h=[];for(i=0;i1&&(this.sortGameObjects(h),this.topOnly&&h.splice(1)),this._drag[t.id]=h,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(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},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;n-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._tempZones=[],this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.sortGameObjects(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1));var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&(r+=this.processUpEvents(n)),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.systems.events;e.off("transitionstart",this.transitionIn,this),e.off("transitionout",this.transitionOut,this),e.off("transitioncomplete",this.transitionComplete,this),e.off("preupdate",this.preUpdate,this),e.off("update",this.update,this),e.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off("start",this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.keyboard=null,this.mouse=null,this.gamepad=null},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(t,e){t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(t,e,i){t.exports={DUALSHOCK_4:i(358),SNES_USB:i(357),XBOX_360:i(356)}},function(t,e,i){t.exports={Axis:i(188),Button:i(187),Gamepad:i(189),GamepadManager:i(190),Configs:i(359)}},function(t,e,i){t.exports={CreateInteractiveObject:i(159),Gamepad:i(360),InputManager:i(191),InputPlugin:i(355),Keyboard:i(354),Mouse:i(349),Pointer:i(182),Touch:i(348)}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},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,i){var n=i(12);n.Area=i(782),n.Ceil=i(781),n.CeilAll=i(780),n.CenterOn=i(365),n.Clone=i(779),n.Contains=i(28),n.ContainsPoint=i(778),n.ContainsRect=i(777),n.CopyFrom=i(776),n.Decompose=i(372),n.Equals=i(775),n.FitInside=i(774),n.FitOutside=i(773),n.Floor=i(772),n.FloorAll=i(771),n.FromPoints=i(268),n.GetAspectRatio=i(220),n.GetCenter=i(770),n.GetPoint=i(127),n.GetPoints=i(286),n.GetSize=i(769),n.Inflate=i(768),n.MarchingAnts=i(558),n.MergePoints=i(767),n.MergeRect=i(766),n.MergeXY=i(765),n.Offset=i(764),n.OffsetPoint=i(763),n.Overlaps=i(762),n.Perimeter=i(93),n.PerimeterPoint=i(761),n.Random=i(146),n.Scale=i(760),n.Union=i(450),t.exports=n},function(t,e,i){var n=i(0),s=i(221),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n0){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){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){t.exports={CircleToCircle:i(829),CircleToRectangle:i(828),GetRectangleIntersection:i(827),LineToCircle:i(374),LineToLine:i(137),LineToRectangle:i(826),PointToLine:i(373),PointToLineSegment:i(825),RectangleToRectangle:i(375),RectangleToTriangle:i(824),RectangleToValues:i(823),TriangleToCircle:i(822),TriangleToLine:i(821),TriangleToTriangle:i(820)}},function(t,e,i){t.exports={Circle:i(839),Ellipse:i(241),Intersects:i(376),Line:i(819),Point:i(801),Polygon:i(787),Rectangle:i(366),Triangle:i(759)}},function(t,e,i){var n=i(0),s=i(379),r=i(141),o=i(25),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(25),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(21),s=i(13),r=i(8),o=i(102);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(31);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(66);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(8),s=i(13),r=i(107);s.register("graphics",function(t){var e=n(t,"add",!0),i=new r(this.scene,t);return e&&this.scene.sys.displayList.add(i),i})},function(t,e,i){var n=i(102);i(11).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(11),s=i(31);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(66);i(11).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(107);i(11).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&&e.cameraFilter&s._id||""===e.text)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=e.canvas;if(o.save(),void 0!==r){var h=r.matrix;o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY;t.config.roundPixels&&(l|=0,u|=0),o.translate(l,u),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.translate(a.width*(e.flipX?1:0),a.height*(e.flipY?1:0)),o.scale(e.flipX?-1:1,e.flipY?-1:1),o.drawImage(a,0,0,a.width,a.height,-e.displayOriginX,-e.displayOriginY,a.width,a.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(392),s=i(391),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&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,i){var n=i(0),s=i(33),r=i(58),o=i(4),a=i(31),h=i(57),l=i(6),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(6),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;i=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(239),s=i(238),r=i(237),o=i(236),a=i(235),h=i(234),l=i(233),u=i(232),c=i(231),d=i(230),f=i(229),p=i(228);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,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(48),s=i(0),r=i(14),o=i(432),a=i(431),h=i(884),l=i(2),u=i(139),c=i(397),d=i(103),f=i(434),p=i(396),g=i(12),v=i(79),y=i(6),m=i(34),x=new s({Mixins:[r.BlendMode,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","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(33),r=i(54),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=4294967295,this.color=4294967295,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.color=16777215&this.tint|(255*this.alpha|0)<<24,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.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(437),s=i(436),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(439),s=i(160),s=i(160),t.exports={renderWebGL:n,renderCanvas:s}},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(12);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(51);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(51);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(106);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(12);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e){function i(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,n,s){void 0===e&&(e=0),void 0===n&&(n=0);var r={},o=t.getElementsByTagName("info")[0],a=t.getElementsByTagName("common")[0];r.font=o.getAttribute("face"),r.size=i(o,"size"),r.lineHeight=i(a,"lineHeight")+n,r.chars={};var h=t.getElementsByTagName("char"),l=void 0!==s&&s.trimmed;if(l)var u=s.height,c=s.width;for(var d=0;dm&&(s=m),r>x&&(r=x);var A=m+v-s,C=x+y-r;o-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(70);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(26);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(70);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e,i){var n=i(247);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(26);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,l),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;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--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),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 M=l,_=l,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,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){t.exports=function(t,e){if(["layers","tilewidth","tileheight","tileswide","tileshigh"].forEach(function(t){e[t]}),1===e.layers.length){for(var i=new Phaser.FrameData,n=e.tileheight,s=e.tilewidth,r=e.layers[0].tiles,o=0;o0&&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){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t=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(53),s=i(74),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(53),browser:i(74),features:i(112),input:i(505),audio:i(504),video:i(503),fullscreen:i(502),canvasFeatures:i(193)}},function(t,e,i){var n=i(19);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\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n"},function(t,e){t.exports="#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\nuniform bool uInvertMaskAlpha;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = mainColor.a;\r\n\r\n if (!uInvertMaskAlpha)\r\n {\r\n alpha *= (maskColor.a);\r\n }\r\n else\r\n {\r\n alpha *= (1.0 - maskColor.a);\r\n }\r\n \r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n"},function(t,e,i){var n=i(266),s=i(22),r=i(19),o=i(112);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.pixelArt&&s.disableSmoothing(),h.canvas?t.canvas=h.canvas:t.canvas=s.create(t,h.width,h.height,h.renderType),h.canvasStyle&&(t.canvas.style=h.canvasStyle),h.pixelArt&&n.setCrisp(t.canvas),1!==h.zoom&&(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(254),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(0),s=i(19),r=i(4),o=i(15),a=i(3),h=i(194),l=i(124),u=new n({initialize:function(t){void 0===t&&(t={});this.width=r(t,"width",1024),this.height=r(t,"height",768),this.zoom=r(t,"zoom",1),this.resolution=r(t,"resolution",1),this.renderType=r(t,"type",s.AUTO),this.parent=r(t,"parent",null),this.canvas=r(t,"canvas",null),this.canvasStyle=r(t,"canvasStyle",null),this.sceneConfig=r(t,"scene",null),this.seed=r(t,"seed",[(Date.now()*Math.random()).toString()]),o.RND.init(this.seed),this.gameTitle=r(t,"title",""),this.gameURL=r(t,"url","https://phaser.io"),this.gameVersion=r(t,"version",""),this.inputKeyboard=r(t,"input.keyboard",!0),this.inputKeyboardEventTarget=r(t,"input.keyboard.target",window),this.inputMouse=r(t,"input.mouse",!0),this.inputMouseEventTarget=r(t,"input.mouse.target",null),this.inputMouseCapture=r(t,"input.mouse.capture",!0),this.inputTouch=r(t,"input.touch",!0),this.inputTouchEventTarget=r(t,"input.touch.target",null),this.inputTouchCapture=r(t,"input.touch.capture",!0),this.inputGamepad=r(t,"input.gamepad",!1),this.disableContextMenu=r(t,"disableContextMenu",!1),this.audio=r(t,"audio"),this.hideBanner=!1===r(t,"banner",null),this.hidePhaser=r(t,"banner.hidePhaser",!1),this.bannerTextColor=r(t,"banner.text","#ffffff"),this.bannerBackgroundColor=r(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(t,"fps",null);var e=r(t,"render",t);this.antialias=r(e,"antialias",!0),this.pixelArt=r(e,"pixelArt",!1),this.autoResize=r(e,"autoResize",!1),this.roundPixels=r(e,"roundPixels",!1),this.transparent=r(e,"transparent",!1),this.clearBeforeRender=r(e,"clearBeforeRender",!0),this.premultipliedAlpha=r(e,"premultipliedAlpha",!0),this.preserveDrawingBuffer=r(e,"preserveDrawingBuffer",!1),this.failIfMajorPerformanceCaveat=r(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(e,"powerPreference","default");var i=r(t,"backgroundColor",0);this.backgroundColor=l(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=r(t,"callbacks.preBoot",a),this.postBoot=r(t,"callbacks.postBoot",a),this.physics=r(t,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(t,"loader.baseURL",""),this.loaderPath=r(t,"loader.path",""),this.loaderEnableParallel=r(t,"loader.enableParallel",!0),this.loaderMaxParallelDownloads=r(t,"loader.maxParallelDownloads",4),this.loaderCrossOrigin=r(t,"loader.crossOrigin",void 0),this.loaderResponseType=r(t,"loader.responseType",""),this.loaderAsync=r(t,"loader.async",!0),this.loaderUser=r(t,"loader.user",""),this.loaderPassword=r(t,"loader.password",""),this.loaderTimeout=r(t,"loader.timeout",0),this.defaultPlugins=r(t,"plugins",h.DefaultScene);var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(t,"images.default",n+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(t,"images.missing",n+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==")}});t.exports=u},function(t,e,i){var n=i(122),s=i(198),r=i(196),o=i(22),a=i(0),h=i(516),l=i(515),u=i(76),c=i(507),d=i(506),f=i(263),p=i(9),g=i(191),v=i(3),y=i(10),m=i(180),x=i(177),w=i(170),b=i(483),T=i(482),S=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new w(this),this.cache=new r(this),this.registry=new u(this),this.input=new g(this,this.config),this.scene=new m(this,this.config.sceneConfig),this.device=d,this.sound=x.create(this),this.loop=new b(this,this.config.fps),this.plugins=new y(this,this.config),this.onStepCallback=v,this.pendingDestroy=!1,this.removeCanvas=!1,f(this.boot.bind(this))},boot:function(){this.isBooted=!0,this.config.preBoot(this),l(this),c(this),n(this.canvas,this.config.parent),this.events.emit("boot"),this.events.once("ready",this.start,this)},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)),T(this.events),this.events.on("hidden",this.onHidden,this),this.events.on("visible",this.onVisible,this),this.events.on("blur",this.onBlur,this),this.events.on("focus",this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e);var i=this.renderer;i.preRender(),this.events.emit("prerender",i),this.scene.render(i),i.postRender(),this.events.emit("postrender",i)},headlessStep:function(t,e){this.input.update(t,e),this.sound.update(t,e),this.onStepCallback(),this.scene.update(t,e),this.events.emit("prerender"),this.events.emit("postrender")},onHidden:function(){this.loop.pause(),this.events.emit("pause")},onVisible:function(){this.loop.resume(),this.events.emit("resume")},onBlur:function(){this.loop.blur()},onFocus:function(){this.loop.focus()},resize:function(t,e){this.config.width=t,this.config.height=e,this.renderer.resize(t,e),this.input.resize(),this.scene.resize(t,e),this.events.emit("resize",t,e)},destroy:function(t){this.pendingDestroy=!0,this.removeCanvas=t},runDestroy:function(){this.events.emit("destroy"),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.onStepCallback=null,this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=S},function(t,e,i){var n=i(0),s=i(9),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){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(27);n.ColorToRGBA=i(908),n.ComponentToHex=i(525),n.GetColor=i(144),n.GetColor32=i(278),n.HexStringToColor=i(279),n.HSLToColor=i(907),n.HSVColorWheel=i(906),n.HSVToRGB=i(523),n.HueToComponent=i(524),n.IntegerToColor=i(277),n.IntegerToRGB=i(276),n.Interpolate=i(905),n.ObjectToColor=i(275),n.RandomRGB=i(904),n.RGBStringToColor=i(274),n.RGBToHSV=i(903),n.RGBToString=i(902),n.ValueToColor=i(124),t.exports=n},function(t,e,i){var n=i(0),s=i(76),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&&this.events.off("destroy",this.destroy,this),this.events=this.systems.events,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.systems.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(76),DataManagerPlugin:i(527)}},function(t,e,i){var n=i(267),s=i(0),r=i(81),o=i(6),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&&e.cameraFilter&s._id||t.drawImage(e,s,r)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(539),s=i(538),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*l,e[8]=m*s+x*a+w*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*l-r*a,b=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,_=c*m-p*g,E=d*y-f*v,P=d*m-p*v,L=f*m-p*y,F=x*L-w*P+b*E+T*_-S*M+A*C;return F?(F=1/F,i[0]=(h*L-l*P+u*E)*F,i[1]=(l*_-a*L-u*M)*F,i[2]=(a*P-h*_+u*C)*F,i[3]=(r*P-s*L-o*E)*F,i[4]=(n*L-r*_+o*M)*F,i[5]=(s*_-n*P-o*C)*F,i[6]=(v*A-y*S+m*T)*F,i[7]=(y*b-g*A-m*w)*F,i[8]=(g*S-v*b+m*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(0),s=i(82),r=i(541),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(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(82),s=i(272),r=i(542),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(113),s=i(0),r=i(2),o=i(10),a=i(28),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.currentCameraId=1,this.cameras=[],this.cameraPool=[],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(){this.main||this.boot();var t=this.systems.events;t.on("update",this.update,this),t.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=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),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(4),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={BaseCache:i(197),CacheManager:i(196)}},function(t,e,i){t.exports={Animation:i(201),AnimationFrame:i(199),AnimationManager:i(198)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-n),h=Math.abs(o-s),l=n-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(15),s=i(60),r=i(203),o=i(202),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},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,clearTint:function(){return this.setTint(16777215),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},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){var i={texture:null,frame:null,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(55),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){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var o=this.currentMatrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=a*t+l*e,o[1]=h*t+u*e,o[2]=a*i+l*n,o[3]=h*i+u*n,o[4]=a*s+l*r+c,o[5]=h*s+u*r+d,this},setTransform:function(t,e,i,n,s,r){var o=this.currentMatrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return i[4]=n*t+r*e+a,i[5]=s*t+o*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=o*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],o=Math.sin(t),a=Math.cos(t);return e[0]=i*a+s*o,e[1]=n*a+r*o,e[2]=i*-o+s*a,e[3]=n*-o+r*a,this}};t.exports=i},function(t,e,i){var n=i(12),s=i(284),r=i(6),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){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(48),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(23),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(40),s=i(38),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(41),o=i(37);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(87),s=i(38),r=i(86),o=i(37);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(84),s=i(40),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(84),s=i(42),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(86),s=i(85);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(580),s=i(87),r=i(84);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(43),o=i(86);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(291),s=[];s[n.BOTTOM_CENTER]=i(584),s[n.BOTTOM_LEFT]=i(583),s[n.BOTTOM_RIGHT]=i(582),s[n.CENTER]=i(581),s[n.LEFT_CENTER]=i(579),s[n.RIGHT_CENTER]=i(578),s[n.TOP_CENTER]=i(577),s[n.TOP_LEFT]=i(576),s[n.TOP_RIGHT]=i(575);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){t.exports={Angle:i(990),Call:i(989),GetFirst:i(988),GetLast:i(987),GridAlign:i(986),IncAlpha:i(985),IncX:i(984),IncXY:i(983),IncY:i(982),PlaceOnCircle:i(981),PlaceOnEllipse:i(980),PlaceOnLine:i(979),PlaceOnRectangle:i(978),PlaceOnTriangle:i(977),PlayAnimation:i(976),PropertyValueInc:i(32),PropertyValueSet:i(24),RandomCircle:i(975),RandomEllipse:i(974),RandomLine:i(973),RandomRectangle:i(972),RandomTriangle:i(971),Rotate:i(970),RotateAround:i(969),RotateAroundDistance:i(968),ScaleX:i(967),ScaleXY:i(966),ScaleY:i(965),SetAlpha:i(964),SetBlendMode:i(963),SetDepth:i(962),SetHitArea:i(961),SetOrigin:i(960),SetRotation:i(959),SetScale:i(958),SetScaleX:i(957),SetScaleY:i(956),SetTint:i(955),SetVisible:i(954),SetX:i(953),SetXY:i(952),SetY:i(951),ShiftPosition:i(950),Shuffle:i(949),SmootherStep:i(948),SmoothStep:i(947),Spread:i(946),ToggleVisible:i(945),WrapInRectangle:i(944)}},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&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(610),s=i(609),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(129);t.exports=function(t){for(var e=[],i=[],s=0;s-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(16);t.exports=function(t){for(var e,i,s,r,o,a=0;a>>0;return n}},function(t,e,i){var n=i(623),s=i(2),r=i(100),o=i(309),a=i(62);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(312),Parse2DArray:i(206),ParseCSV:i(311),Impact:i(305),Tiled:i(310)}},function(t,e,i){var n=i(50),s=i(49),r=i(6);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(20);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(63),s=i(35),r=i(103);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(63),s=i(35),r=i(207);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-c&&y>-d&&v=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(996);n.Body=i(77),n.Composite=i(210),n.World=i(661),n.Detector=i(665),n.Grid=i(995),n.Pairs=i(994),n.Pair=i(597),n.Query=i(1016),n.Resolver=i(993),n.SAT=i(664),n.Constraint=i(293),n.Common=i(45),n.Engine=i(992),n.Events=i(294),n.Sleeping=i(322),n.Plugin=i(662),n.Bodies=i(211),n.Composites=i(999),n.Axes=i(667),n.Bounds=i(134),n.Svg=i(1014),n.Vector=i(115),n.Vertices=i(135),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(135),r=i(115);!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(211),s=i(77),r=i(0),o=i(598),a=i(2),h=i(103),l=i(135),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(115),r=i(45);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(328);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.up=!0:e>0&&(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(671);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.left=!0:e>0&&(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(673);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(674),s=i(672),r=i(326);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(64),s=i(16),r={ArcadePhysics:i(689),Body:i(330),Collider:i(329),Factory:i(336),Group:i(333),Image:i(335),Sprite:i(136),StaticBody:i(325),StaticGroup:i(332),World:i(331)};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(388),IsSize:i(121),IsValue:i(709)}},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 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(267);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[ie-i}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN,this.systems.events.off("shutdown",this.shutdown,this)},destroy:function(){this.shutdown(),this.state=s.LOADER_DESTROYED,this.systems.events.off("start",this.pluginStart,this),this.list=null,this.inflight=null,this.failed=null,this.queue=null,this.storage=null,this.scene=null,this.systems=null}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(7),s=i(46),r=i(214),o=function(t,e,i,n,o,a){var h=new s(t,e,n,o),l=new r(t,i,n,a);return h.linkFile=l,l.linkFile=h,h.linkType="unityatlas",l.linkType="unityatlas",{texture:h,data:l}};n.register("unityAtlas",function(t,e,i,n,s){var r=new o(t,e,i,this.path,n,s);return this.addFile(r.texture),this.addFile(r.data),this}),t.exports=o},function(t,e,i){var n=i(7),s=i(36),r=i(29),o=function(t,e,i,n,r){var o=new s(t,e,i,r);return o.type="tilemapJSON",o.tilemapFormat=n,o};n.register("tilemapTiledJSON",function(t,e,i){if(Array.isArray(t))for(var n=0;n'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",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(220);t.exports=function(t,e){var i=n(t);return it.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomi&&(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(56),s=i(137);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(374),s=i(56);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(373);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(12),s=i(375);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(54);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(12);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(30);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(30);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(83);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(83);n.Area=i(838),n.Circumference=i(287),n.CircumferencePoint=i(128),n.Clone=i(837),n.Contains=i(30),n.ContainsPoint=i(836),n.ContainsRect=i(835),n.CopyFrom=i(834),n.Equals=i(833),n.GetBounds=i(832),n.GetPoint=i(290),n.GetPoints=i(288),n.Offset=i(831),n.OffsetPoint=i(830),n.Random=i(149),t.exports=n},function(t,e,i){var n=i(0),s=i(378),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(21),s=i(13),r=i(8),o=i(224);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(4),a=i(138);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(224);i(11).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(138);i(11).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(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(846),s=i(845),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(13),s=i(8),r=i(150);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(225);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(245),s=i(21),r=i(13),o=i(8),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(118),r=i(13),o=i(8),a=i(143);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(13),r=i(8),o=i(226);s.register("renderTexture",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",32),a=r(t,"height",32),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(13),s=i(8),r=i(2),o=i(227);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(13),s=i(104);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(242),s=i(21),r=i(13),o=i(8);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(243),r=i(13),o=i(8);r.register("container",function(t){var e=o(t,"x",0),i=o(t,"y",0),r=new s(this.scene,e,i);return n(this.scene,r,t),r})},function(t,e,i){var n=i(244),s=i(21),r=i(13),o=i(8);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(150);i(11).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(225);i(11).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(245);i(11).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(143);i(11).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(11),s=i(226);n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var n=i(11),s=i(395);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(11),s=i(227);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(104);i(11).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(242);i(11).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(243);i(11).register("container",function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))})},function(t,e,i){var n=i(244);i(11).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext,a=e.frame;e.updateTileTexture(),t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var h=a.x-e.originX*e.width,l=a.y-e.originY*e.height,u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY,d=1,f=1;if(e.flipX&&(d=-1,h+=e.width),e.flipY&&(f=-1,l+=e.height),t.config.roundPixels&&(h|=0,l|=0,u|=0,c|=0),o.save(),void 0!==r){var p=r.matrix;o.transform(p[0],p[1],p[2],p[3],p[4],p[5])}o.translate(h,l),o.translate(u,c),o.scale(d,f),o.translate(e.originX*e.width,e.originY*e.height),o.rotate(d*f*e.rotation),o.scale(this.scaleX,this.scaleY),o.translate(-e.originX*e.width,-e.originY*e.height),o.translate(-this.tilePositionX,-this.tilePositionY),o.fillStyle=e.canvasPattern,o.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),o.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s,r))}},function(t,e,i){var n=i(3),s=i(3);n=i(870),s=i(869),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(4);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(h).width/i)>a.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@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(873),s=i(16),r={Parse:i(872)};r=s(!1,r,n),t.exports=r},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);this.renderer.setFramebuffer(this.framebuffer);var s=this.gl;return s.clearColor(e/255,i/255,n/255,1),s.clear(s.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},clear:function(){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;return t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},draw:function(t,e,i,n){var s=t.source[e.sourceIndex].glTexture,r=(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16);return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,0,this.renderer.pipelines.TextureTintPipeline.height,-1e3,1e3),this.renderer.pipelines.TextureTintPipeline.drawTexture(s,i,n,r,this.globalAlpha,e.cutX,e.cutY,e.cutWidth,e.cutHeight,this.currentMatrix,null,this),this.renderer.setFramebuffer(null),this.renderer.pipelines.TextureTintPipeline.projOrtho(0,this.renderer.pipelines.TextureTintPipeline.width,this.renderer.pipelines.TextureTintPipeline.height,0,-1e3,1e3),this}}},function(t,e){t.exports={fill:function(t){var e=255&(t>>16|0),i=255&(t>>8|0),n=255&(0|t);return this.context.fillStyle="rgb("+e+","+i+","+n+")",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this},clear:function(){return this.context.save(),this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.restore(),this},draw:function(t,e,i,n){var s=this.currentMatrix;return this.context.globalAlpha=this.globalAlpha,this.context.setTransform(s[0],s[1],s[2],s[3],s[4],s[5]),this.context.drawImage(t.source[e.sourceIndex].image,e.cutX,e.cutY,e.cutWidth,e.cutHeight,i,n,e.cutWidth,e.cutWidth),this}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,o.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,o.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=0,h=0,l=1,u=1;if(e.flipX?(l=-1,a-=e.canvas.width-e.displayOriginX):a-=e.displayOriginX,e.flipY?(u=-1,h-=e.canvas.height-e.displayOriginY):h-=e.displayOriginY,o.save(),void 0!==r){var c=r.matrix;o.transform(c[0],c[1],c[2],c[3],c[4],c[5])}o.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY),o.scale(l,u),o.drawImage(e.canvas,a,h),o.restore()}}},function(t,e,i){var n=i(1),s=i(25);t.exports=function(t,e,i,r,o){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&r._id||this.pipeline.batchTexture(e,e.texture,e.texture.width,e.texture.height,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,!e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,e.texture.width,e.texture.height,s.getTintAppendFloatAlpha(e.tintTopLeft,e.alphaTopLeft),s.getTintAppendFloatAlpha(e.tintTopRight,e.alphaTopRight),s.getTintAppendFloatAlpha(e.tintBottomLeft,e.alphaBottomLeft),s.getTintAppendFloatAlpha(e.tintBottomRight,e.alphaBottomRight),0,0,r,o)}},function(t,e,i){var n=i(3),s=i(3);n=i(878),s=i(877),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){t.exports={DeathZone:i(432),EdgeZone:i(431),RandomZone:i(396)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.emitters.list;if(!(0===o.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=t.currentContext;if(a.save(),void 0!==r){var h=r.matrix;a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}for(var l=0;l>24&255)/255;if(!(x<=0)){var w=m.frame,b=.5*w.width,T=.5*w.height,S=w.canvasData,A=-b,C=-T,M=m.x-p,_=m.y-g;v&&(M|=0,_|=0),a.globalAlpha=x,a.save(),a.translate(M,_),a.rotate(m.rotation),a.scale(m.scaleX,m.scaleY),a.drawImage(w.source.image,S.sx,S.sy,S.sWidth,S.sHeight,A,C,S.dWidth,S.dHeight),a.restore()}}a.globalAlpha=f}}a.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(882),s=i(881),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(0),s=i(240),r=i(59),o=i(2),a=i(34),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){t.exports={GravityWell:i(435),Particle:i(434),ParticleEmitter:i(433),ParticleEmitterManager:i(227),Zones:i(880)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,l=e.displayCallback,u=s.scrollX*e.scrollFactorX,c=s.scrollY*e.scrollFactorY,d=e.fontData.chars,f=e.fontData.lineHeight,p=0,g=0,v=0,y=0,m=null,x=0,w=0,b=0,T=0,S=0,A=0,C=null,M=0,_=t.currentContext,E=e.frame.source.image,P=h.cutX,L=h.cutY,F=0,k=e.fontSize/e.fontData.size;if(t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,_.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,_.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),_.save(),void 0!==r){var R=r.matrix;_.transform(R[0],R[1],R[2],R[3],R[4],R[5])}_.translate(e.x,e.y),_.rotate(e.rotation),_.translate(-e.displayOriginX,-e.displayOriginY),_.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(_.save(),_.beginPath(),_.rect(0,0,e.cropWidth,e.cropHeight),_.clip());for(var O=t.config.roundPixels,B=0;B0&&e.cropHeight>0&&_.restore(),_.restore()}}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text.length;n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(887),s=i(886),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.list,a=e.localTransform;void 0===r?a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY):(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY));for(var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c0&&e.cameraFilter&s._id)){var o=e.getRenderList();t.setBlendMode(e.blendMode);var a=t.gameContext,h=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY;if(a.save(),void 0!==r){var u=r.matrix;a.transform(u[0],u[1],u[2],u[3],u[4],u[5])}for(var c=0;c0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(894),s=i(893),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s,r){var o=e.text,a=o.length;if(!(n.RENDER_MASK!==e.renderFlags||0===a||e.cameraFilter>0&&e.cameraFilter&s._id)){var h=e.frame,l=e.fontData.chars,u=e.fontData.lineHeight,c=e.letterSpacing,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,_=h.cutX,E=h.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var L=t.config.roundPixels,F=e.x-s.scrollX*e.scrollFactorX+e.frame.x,k=e.y-s.scrollY*e.scrollFactorY+e.frame.y;if(L&&(F|=0,k|=0),C.save(),void 0!==r){var R=r.matrix;C.transform(R[0],R[1],R[2],R[3],R[4],R[5])}C.translate(F,k),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var O=0;O0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s,r)}},function(t,e,i){var n=i(3),s=i(3);n=i(897),s=i(896),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(451);t.exports=function(t,e,i,s,r,o,a){var h=t.sys.textures.getFrame(i,s),l=t.sys.cache.xml.get(r);if(h&&l){var u=n(l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:u,texture:i,frame:s}),!0}return!1}},function(t,e,i){var n={DisplayList:i(481),GameObjectCreator:i(13),GameObjectFactory:i(11),UpdateList:i(453),Components:i(14),BuildGameObject:i(21),BuildGameObjectAnimation:i(118),GameObject:i(1),BitmapText:i(245),Blitter:i(244),Container:i(243),DynamicBitmapText:i(242),Graphics:i(107),Group:i(104),Image:i(66),Particles:i(885),PathFollower:i(395),RenderTexture:i(226),RetroFont:i(874),Sprite3D:i(143),Sprite:i(31),Text:i(102),TileSprite:i(225),Zone:i(150),Factories:{Blitter:i(868),Container:i(867),DynamicBitmapText:i(866),Graphics:i(387),Group:i(865),Image:i(386),Particles:i(864),PathFollower:i(863),RenderTexture:i(862),Sprite3D:i(861),Sprite:i(385),StaticBitmapText:i(860),Text:i(384),TileSprite:i(859),Zone:i(858)},Creators:{Blitter:i(857),Container:i(856),DynamicBitmapText:i(855),Graphics:i(383),Group:i(854),Image:i(382),Particles:i(853),RenderTexture:i(852),Sprite3D:i(851),Sprite:i(381),StaticBitmapText:i(850),Text:i(380),TileSprite:i(849),Zone:i(848)}};n.Mesh=i(138),n.Quad=i(224),n.Factories.Mesh=i(844),n.Factories.Quad=i(843),n.Creators.Mesh=i(842),n.Creators.Quad=i(841),n.Light=i(379),i(378),i(840),t.exports=n},function(t,e,i){t.exports={AddToDOM:i(122),DOMContentLoaded:i(263),ParseXML:i(262),RemoveFromDOM:i(261),RequestAnimationFrame:i(260)}},function(t,e,i){var n=i(525);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e>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(266),Pool:i(22),Smoothing:i(123),TouchAction:i(910),UserSelect:i(909)}},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(580),GetBottom:i(44),GetCenterX:i(87),GetCenterY:i(84),GetLeft:i(42),GetOffsetX:i(913),GetOffsetY:i(912),GetRight:i(40),GetTop:i(38),SetBottom:i(43),SetCenterX:i(86),SetCenterY:i(85),SetLeft:i(41),SetRight:i(39),SetTop:i(37)}},function(t,e,i){var n=i(40),s=i(38),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)-a),t}},function(t,e,i){var n=i(87),s=i(38),r=i(43),o=i(86);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(38),r=i(41),o=i(37);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(84),s=i(40),r=i(85),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(43),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(42),s=i(38),r=i(39),o=i(37);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(84),s=i(42),r=i(85),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(43),o=i(39);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(40),r=i(39),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(42),r=i(41),o=i(37);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)+a),t}},function(t,e,i){var n=i(44),s=i(87),r=i(86),o=i(37);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(926),BottomLeft:i(925),BottomRight:i(924),LeftBottom:i(923),LeftCenter:i(922),LeftTop:i(921),RightBottom:i(920),RightCenter:i(919),RightTop:i(918),TopCenter:i(917),TopLeft:i(916),TopRight:i(915)}},function(t,e,i){t.exports={BottomCenter:i(584),BottomLeft:i(583),BottomRight:i(582),Center:i(581),LeftCenter:i(579),QuickSet:i(585),RightCenter:i(578),TopCenter:i(577),TopLeft:i(576),TopRight:i(575)}},function(t,e,i){var n=i(291),s=i(16),r={In:i(928),To:i(927)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Align:i(929),Bounds:i(914),Canvas:i(911),Color:i(526),Masks:i(522)}},function(t,e,i){var n=i(0),s=i(6),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(535),r=i(533),o=i(11),a=i(532),h=i(931),l=i(531),u=i(12),c=i(529),d=i(6),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;i1)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=F,B=o.clamp(f.friction*k*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,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+R,0),R=T.normalImpulse-X}if(L*L>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(597),r=i(45);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(662),r=i(45);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(295),s=i(0),r=i(598),o=i(1),a=i(2),h=i(283),l=i(31),u=i(6),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(598),r=i(1),o=i(2),a=i(66),h=i(283),l=i(6),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(210),r=i(293),o=i(45),a=i(77),h=i(211);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 F=0;FA&&(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(324),r=i(1050),o=i(323),a=i(1049),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(663),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(324),s=i(1033),r=i(1032);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(1008),COLLIDES:i(324),CollisionMap:i(1007),Factory:i(1006),Image:i(1004),ImpactBody:i(1005),ImpactPhysics:i(1035),Sprite:i(1003),TYPE:i(323),World:i(1002)}},function(t,e,i){t.exports={Arcade:i(690),Impact:i(1051),Matter:i(1031)}},function(t,e,i){(function(e){i(596);var n=i(19),s=i(16),r={Actions:i(586),Animation:i(554),Cache:i(553),Cameras:i(943),Class:i(0),Create:i(939),Curves:i(933),Data:i(528),Display:i(930),DOM:i(901),EventEmitter:i(518),Game:i(517),GameObjects:i(900),Geom:i(377),Input:i(361),Loader:i(744),Math:i(733),Physics:i(1052),Renderer:i(660),Scene:i(179),Scenes:i(321),Sound:i(319),Structs:i(318),Textures:i(317),Tilemaps:i(655),Time:i(301),Tweens:i(299),Utils:i(606)};r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(204))}])}); \ No newline at end of file